[Nix-dev] Regex in manifest breaks nix-env

Jeffrey David Johnson jefdaj at gmail.com
Tue Mar 17 19:37:24 CET 2015


OK so there's another problem too, but this one is
my fault and not a bug. It apparently stopped working
more than a month ago:

nix-env --list-generations
  24   2015-02-05 09:05:12   (current)

But instead of looking into the problem,
I just tried again with sudo and it worked.
I assumed it was a permissions problem.
And since then I've done `nix-collect-garbage` to recover
hard drive space. So all the other generations are
installed as root:

sudo nix-env --list-generations
  86   2015-03-08 21:50:23   
  87   2015-03-11 13:23:29   
  88   2015-03-11 18:53:20   
  89   2015-03-13 00:50:41   
  90   2015-03-13 01:04:21   
  91   2015-03-16 13:59:56   
  92   2015-03-17 11:07:19   (current)

Can I move them to my regular user account by overwriting
some or all of the files with those in /root/.nix-profile?
I'm not worried about losing installed derivations beacuse
I just use the user profile for testing and have my
long-term package lists in a separate git repo.
Jeff

On Tue, 17 Mar 2015 18:26:26 +0100
Eelco Dolstra <eelco.dolstra at logicblox.com> wrote:

> Hi,
> 
> On 17/03/15 18:11, Jeffrey David Johnson wrote:
> 
> > Hi all! My nix-env commands recently stopped working. For example if I try
> > to `nix-env -q`, it says:
> > 
> > error: syntax error, unexpected $undefined, expecting '"', at "/nix/store/ar83fv0d68frfyifz2wl1dm97m6jvxnn-env-manifest.nix":1:153
> > 
> > The contents of `/nix/store/ar83fv0d68frfyifz2wl1dm97m6jvxnn-env-manifest.nix` are:
> > 
> > [ { meta = { description = "RDF database"; downloadPage = "http://archive.apache.org/dis  t/jena/binaries/"; downloadURLRegex = "apache-jena-.*[.]tar[.]gz$"; homepage = "http://j  ena.apache.org"; license = { fullName = "Apache License 2.0"; shortName = "asl20"; spdxI  d = "Apache-2.0"; url = "http://spdx.org/licenses/Apache-2.0"; }; maintainers = [ "Micha  el Raskin <7c6f434c at mail.ru>" ]; platforms = [ "i686-linux" "x86_64-linux" "armv5tel-lin  ux" "armv6l-linux" "armv7l-linux" "mips64el-linux" ]; position = "/nix/store/75d9rrzyal2  7mn3fdwc060yrbhnyjihi-nixos-14.12.374.61adf9e/nixos/nixpkgs/pkgs/servers/nosql/apache-je  na/binary.nix:29"; updateWalker = true; version = "2.12.1"; }; name = "apache-jena-2.12.  1"; out = { outPath = "/nix/store/3pl4jn0l4wx434g8vgv1assymvg7card-apache-jena-2.12.1";   }; outPath = "/nix/store/3pl4jn0l4wx434g8vgv1assymvg7card-apache-jena-2.12.1"; outputs =   [ "out" ]; system = "x86_64-linux"; type = "derivation"; } ]
> > 
> > So the offending part seems to be `downloadURLRegex = "apache-jena-.*[.]tar[.]gz$";`.
> > Is the package broken for including a regex? 
> 
> Looks like a bug in the manifest generation, since the '$' should be escaped.
> 
> > And how do I remove/fix it without
> > parsing that?
> 
> Please try "nix-env --rollback" to go back to the most recent non-corrupt version.
> 
> -- 
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list