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

stack2nix's nix version can be incompatible with the system nix version #129

Closed
nh2 opened this issue Sep 12, 2018 · 2 comments
Closed

stack2nix's nix version can be incompatible with the system nix version #129

nh2 opened this issue Sep 12, 2018 · 2 comments

Comments

@nh2
Copy link
Member

nh2 commented Sep 12, 2018

Using stack2nix 0.2.

When trying to clone a git: extra-dep, I get:

error: current Nix store schema is version 10, but I only support 7

I think this is because on my system I use nix 2.0, while strace reveals that stack2nix is invoking nix-1.11.4.

Shouldn't stack2nix use my system's nix instead?

@nh2
Copy link
Member Author

nh2 commented Sep 12, 2018

Uh, turns out it's this:

% which nix-prefetch-git 
/home/niklas/.nix-profile/bin/nix-prefetch-git
% cat /home/niklas/.nix-profile/bin/nix-prefetch-git
#! /nix/store/mgdm9y2lhmyb74wwa42qhcl633vbwn26-bash-4.3-p46/bin/bash -e
export PATH=/nix/store/d7ad39clh5igyjikdraq758f19544p2v-git-2.10.1/bin${PATH:+:}$PATH
export PATH=/nix/store/d50cibb81mw35gy3dvbd7aa2wr76f97g-coreutils-8.25/bin${PATH:+:}$PATH
export PATH=/nix/store/2sspjgd4y45cagzsaqq6b5r60ypb38kp-gnused-4.2.2/bin${PATH:+:}$PATH
export PATH=/nix/store/122kpq5bl3r99l3cvmcryl48vlb48m48-nix-1.11.4/bin${PATH:+:}$PATH
export HOME=":"
exec -a "$0" /nix/store/f0izy52dlycxkqfgvxr44qbqvz2mb45f-nix-prefetch-git/bin/.nix-prefetch-git-wrapped "${extraFlagsArray[@]}" "$@"

Looks like nix-prefetch-git is out of date and uses old nix? How can that be?

@nh2
Copy link
Member Author

nh2 commented Sep 12, 2018

Fixed it by doing:

% ls -lah /home/niklas/.nix-profile/bin/nix-prefetch-git
lrwxrwxrwx 1 niklas niklas 85 Jan  1  1970 /home/niklas/.nix-profile/bin/nix-prefetch-git -> /nix/store/wk47vkfx515z0qrhy8ripwly6chw3r7i-nix-prefetch-scripts/bin/nix-prefetch-git*
% nix-env --uninstall /nix/store/wk47vkfx515z0qrhy8ripwly6chw3r7i-nix-prefetch-scripts
% nix-env -iA nixpkgs.nix-prefetch-git
% cat $(which nix-prefetch-git)
#! /nix/store/lw7xaqhakk0i1c631m3cvac3x4lc5gr5-bash-4.4-p12/bin/bash -e
export PATH='/nix/store/i1jdv6w0nd3lpv1nvg6hwlif34xqb0nl-git-2.16.4/bin:/nix/store/920k63py2w97xpfyb5ps9l6wbidvzfjz-coreutils-8.29/bin:/nix/store/wkgszaq2dkc4asapcbx6ypd7xdnzad9f-gnused-4.4/bin:/nix/store/ik6b9k2kxvzhpsw4nbjgrh4fbywprvh6-nix-2.0.4/bin'${PATH:+':'}$PATH
export HOME='/homeless-shelter'
exec -a "$0" "/nix/store/wcnw1zz7p1v5daf0xghdbx5v7di7g31h-nix-prefetch-git/bin/.nix-prefetch-git-wrapped"  "${extraFlagsArray[@]}" "$@"

So it's not stack2nix's fault after all.

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

1 participant