Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current "master" version does not compile #10

Closed
peti opened this issue May 22, 2017 · 6 comments
Closed

Current "master" version does not compile #10

peti opened this issue May 22, 2017 · 6 comments
Assignees

Comments

@peti
Copy link

peti commented May 22, 2017

/tmp/nix-index $ git log -1
commit 3bbaff8021b0e4a764896461c1d47ab573785ff3 (HEAD -> master, origin/master, origin/HEAD)
Merge: ddd29a0 b90d881
Author: Benno Fünfstück <benno.fuenfstueck@gmail.com>
Date:   Mon May 15 20:24:52 2017 +0200

    Merge pull request #8 from matthewbauer/master
    
    Add NIX_AUTO_RUN/NIX_AUTO_INSTALL handling
/tmp/nix-index $ nix-env -i -f .
installing ‘nix-index-0.1.0’
these derivations will be built:
  /nix/store/3alkd5dj293la2iz9vb8hnm8n084p8xs-nix-index-0.1.0.drv
building path(s) ‘/nix/store/szdnknj3vzjvmjb2fx5msiqxbwaj49yc-nix-index-0.1.0’
unpacking sources
unpacking source archive /nix/store/h20f2lx9gka5l7vanjbla05iapa56rrw-nix-index
source root is nix-index
Using cargo deps from /nix/store/2s5nq057hrf6jswsfw1z09cvvv0azdfg-nix-index-0.1.0-fetch
Using indexHash '-ba82b75dd6681d6f'
Using rust registry from /nix/store/r9yy989430rq9jjvg18wzz2nvxjj1mkr-rustRegistry-2017-04-13-5758a92
warning: custom registry support via the `registry.index` configuration is being removed, this functionality will not work in the future
    Updating git repository `https://github.com/hyperium/hyper`
warning: spurious network error (2 tries remaining): [12/-1] curl error: Couldn't resolve host 'github.com'

warning: spurious network error (1 tries remaining): [12/-1] curl error: Couldn't resolve host 'github.com'

error: failed to load source for a dependency on `hyper`

Caused by:
  Unable to update https://github.com/hyperium/hyper#f05a58a1

Caused by:
  failed to fetch into /tmp/nix-build-nix-index-0.1.0.drv-0/deps/git/db/hyper-817b53a166fc1c58

To learn more, run the command again with --verbose.
builder for ‘/nix/store/3alkd5dj293la2iz9vb8hnm8n084p8xs-nix-index-0.1.0.drv’ failed with exit code 101
error: build of ‘/nix/store/3alkd5dj293la2iz9vb8hnm8n084p8xs-nix-index-0.1.0.drv’ failed
@bennofs bennofs self-assigned this May 22, 2017
@bennofs
Copy link
Collaborator

bennofs commented May 22, 2017

This looks like a bug in our rust packaging in nixpkgs. It will probably work if you turn of sandboxed builds (duh).

I'm not quite sure if this is supposed to work with sandboxing turned on, I will need to investigate this more.

In the end, I'm waiting for rust-lang/cargo#3992 to get merged so we can switch to using cargo-vendor for our rust infra, which should solve these issues.

@bennofs
Copy link
Collaborator

bennofs commented May 23, 2017

Oh, I think I fixed this issue in NixOS/nixpkgs@19d3cf8. @peti, can you try if it works when you update nixpkgsRev in default.nix to that revision?

Edit: that probably also requires you to update the depsSha256.

@peti
Copy link
Author

peti commented May 23, 2017

The build succeeds after the following changes:

--- a/default.nix
+++ b/default.nix
@@ -1,5 +1,5 @@
 let
-  nixpkgsRev = "bd78749d3387f84d4f70dada335df04479f8170c";
+  nixpkgsRev = "19d3cf81d3436a6600f261579b55b9132a6ca8fb";
   defaultNixpkgs = builtins.fetchTarball "github.com/NixOS/nixpkgs/archive/${nixpkgsRev}.tar.gz";
 in
 { nixpkgs ? defaultNixpkgs }:
@@ -11,7 +11,7 @@ buildRustPackage rec {
   version = "0.1.0";
 
   src = builtins.filterSource (name: type: !lib.hasPrefix "target" (baseNameOf name) && !lib.hasPrefix "result" (baseNameOf name) && name != ".git") ./.;
-  depsSha256 = "1sjm5aw456wqdyzf6zw71is2acs7534j083qr9mbsra3d2qqxrqj";
+  depsSha256 = "1a64vjy1aar3jsnp034vg9pk94ikfbyl19sqfb89ydpiaq7wjjfn";
   buildInputs = [pkgconfig openssl curl];
 
   postInstall = ''
~~~

@peti
Copy link
Author

peti commented May 23, 2017

Unfortunately, the indexing process itself won't succeed (with current nixos-unstable):

$ nix-index -r 20 -f /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
+ querying available packages
error: fetching the file listing for store path '/nix/store/ff9l3n2qwr75wna45lwg68r5hyd2wfiy-preliminaries-0.1.6.0' failed
caused by: request GET 'http://cache.nixos.org/ff9l3n2qwr75wna45lwg68r5hyd2wfiy.ls.xz' failed with HTTP error 500 Internal Server Error

That's a different issue, I suppose. It would be nice, though, of nix-index would simply skip that "broken" package instead of aborting the entire process.

@bennofs
Copy link
Collaborator

bennofs commented May 23, 2017

@peti Try again in some minutes. #11

I get a different hash when I try to build with the new nixpkgs rev. Maybe that was why I didn't push that commit earlier? I need to set up the nix-daemon on my laptop so that I can test sandboxing.

Not aborting the whole process seems like a good idea.

@peti
Copy link
Author

peti commented May 23, 2017

I tried again, and now it worked just fine! Thank you very much for your help.

@peti peti closed this as completed May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants