From ars.seroka at gmail.com Wed Apr 1 01:10:59 2015 From: ars.seroka at gmail.com (Arseniy Seroka) Date: Wed, 1 Apr 2015 02:10:59 +0300 Subject: [Nix-dev] Overriding all pkgs Message-ID: Hello! How can I override all pkgs? I want to do smth like: my_pkgs = map (a: a // {doCHeck = false;}) pkgs.perlPackages -- Sincerely, Arseniy Seroka -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150401/5d342336/attachment.html From colin at wiresong.com Wed Apr 1 07:06:40 2015 From: colin at wiresong.com (Colin Putney) Date: Tue, 31 Mar 2015 22:06:40 -0700 Subject: [Nix-dev] Overriding a node package In-Reply-To: References: Message-ID: This happens when you have dependencies in package.json that are not supplied by the dependencies passed to buildNodePackage. The build process involves running npm, which will read the package.json file and attempt to download and install any missing dependencies. That introduces an impurity to the nix build, so buildNodePackage runs npm with --registry example.com, which causes the download to fail with the sort of error you encountered. Once you've got a nix expression that properly supplies all the necessary dependencies, npm will not attempt any downloads and the build will succeed. Hope this helps, Colin On Mon, Mar 9, 2015 at 6:38 AM, Kirill Elagin wrote: > I have a package (`pkgs.keybase-node-client` to be precise) which is > generated by `nodePackages.buildNodePackage`. I want to install it from my > local git repo. > > I have no idea how node stuff works in nixpkgs (and not in nixpkgs, > actually), so I tried the obvious thing: > > ~~~~ > packageOverrides = pkgs_: { > keybase-node-client = lib.overrideDerivation pkgs_.keybase-node-client > (drv: { > src = fetchgit { > url = "/home/kirrun/proj/keybase/node-client"; > <...> > }; > }); > }; > ~~~~ > > but this gives me a super-weird error when I try to install it: > > ~~~~ > replacing old ?keybase-node-client-0.7.7? > installing ?keybase-node-client-0.7.7? > these derivations will be built: > /nix/store/qsdsxcvnmn6hxs4kpi2mymmplwjq5kig-keybase-node-client-0.7.7.drv > building path(s) > ?/nix/store/16pd9zjj1dh9pc2lpij5p5xqji0b88ag-keybase-node-client-0.7.7? > building > /nix/store/16pd9zjj1dh9pc2lpij5p5xqji0b88ag-keybase-node-client-0.7.7 > unpacking sources > unpacking source archive > /nix/store/m33g6lw3dg6455bqfnshhn73rn8710yz-node-client-7888c0d > source root is node-client-7888c0d > patching sources > configuring > 'node_modules/iced-coffee-script' -> > '/nix/store/jhqn9ph542b8fc8ig8akq22sphbpi2ff-iced-coffee-script-1.7.1-g/lib/node_modules/iced-coffee-script' > <... (more lines like that) ...> > 'node_modules/request' -> > '/nix/store/56b058k267wsf5nhb9n7cw89gi4l90km-node-request-2.30.0/lib/node_modules/request' > building > npm ERR! registry error parsing json > npm ERR! SyntaxError: Unexpected token < > npm ERR! > npm ERR! > npm ERR! > npm ERR! Example Domain > npm ERR! > npm ERR! > npm ERR! > npm ERR! > npm ERR!