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

sha mismatches for git dependencies #7

Closed
gilligan opened this issue Jun 29, 2016 · 2 comments
Closed

sha mismatches for git dependencies #7

gilligan opened this issue Jun 29, 2016 · 2 comments

Comments

@gilligan
Copy link

Specifying a dependency from github leads to sha mismatch errors:

deps.json:

[
    { "react-autosuggest": "holidaycheck/react-autosuggest#43074a439d26243ea07110f0c5752a6fc8aebe4d" }
]

build output:

$ nix-build 
these derivations will be built:
  /nix/store/pklnc1c1sk9b5irqm9acxpx3w9nmf7zn-react-autosuggest-43074a4.drv
  /nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv
building path(s) ‘/nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4’
exporting git://github.com/holidaycheck/react-autosuggest (rev 43074a439d26243ea07110f0c5752a6fc8aebe4d) into /nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4
Initialized empty Git repository in /nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4/.git/
remote: Counting objects: 102, done.        
remote: Compressing objects: 100% (95/95), done.        
remote: Total 102 (delta 15), reused 51 (delta 4), pack-reused 0        
Receiving objects: 100% (102/102), 106.99 KiB | 0 bytes/s, done.
Resolving deltas: 100% (15/15), done.
From git://github.com/holidaycheck/react-autosuggest
 * branch            HEAD       -> FETCH_HEAD
Switched to a new branch 'fetchgit'
removing `.git'...
output path ‘/nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4’ has r:sha256 hash ‘08n29gzi6gky8zmwlszrw3bccwn6v27lgab3x39p20r9k8mbfgax’ when ‘04fmxsn8irsjhc2fv4kllj50v173vhjwi7ll770f53p1mrlv5kcr’ was expected
cannot build derivation ‘/nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv’ failed

After fixing the checksum in node-packages.nix everything works just fine.$ nix-build
these derivations will be built:
/nix/store/pklnc1c1sk9b5irqm9acxpx3w9nmf7zn-react-autosuggest-43074a4.drv
/nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv
building path(s) ‘/nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4’
exporting git://github.com/holidaycheck/react-autosuggest (rev 43074a439d26243ea07110f0c5752a6fc8aebe4d) into /nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4
Initialized empty Git repository in /nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4/.git/
remote: Counting objects: 102, done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 102 (delta 15), reused 51 (delta 4), pack-reused 0
Receiving objects: 100% (102/102), 106.99 KiB | 0 bytes/s, done.
Resolving deltas: 100% (15/15), done.
From git://github.com/holidaycheck/react-autosuggest

  • branch HEAD -> FETCH_HEAD
    Switched to a new branch 'fetchgit'
    removing `.git'...
    output path ‘/nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4’ has r:sha256 hash ‘08n29gzi6gky8zmwlszrw3bccwn6v27lgab3x39p20r9k8mbfgax’ when ‘04fmxsn8irsjhc2fv4kllj50v173vhjwi7ll770f53p1mrlv5kcr’ was expected
    cannot build derivation ‘/nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv’: 1 dependencies couldn't be built
    error: build of ‘/nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv’ failed
    $ nix-build
    these derivations will be built:
    /nix/store/pklnc1c1sk9b5irqm9acxpx3w9nmf7zn-react-autosuggest-43074a4.drv
    /nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv
    building path(s) ‘/nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4’
    exporting git://github.com/holidaycheck/react-autosuggest (rev 43074a439d26243ea07110f0c5752a6fc8aebe4d) into /nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4
    Initialized empty Git repository in /nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4/.git/
    remote: Counting objects: 102, done.
    remote: Compressing objects: 100% (95/95), done.
    remote: Total 102 (delta 15), reused 51 (delta 4), pack-reused 0
    Receiving objects: 100% (102/102), 106.99 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (15/15), done.
    From git://github.com/holidaycheck/react-autosuggest
  • branch HEAD -> FETCH_HEAD
    Switched to a new branch 'fetchgit'
    removing `.git'...
    output path ‘/nix/store/5ccj2q9j8zk6ink6pmms6lyqwb66vs6a-react-autosuggest-43074a4’ has r:sha256 hash ‘08n29gzi6gky8zmwlszrw3bccwn6v27lgab3x39p20r9k8mbfgax’ when ‘04fmxsn8irsjhc2fv4kllj50v173vhjwi7ll770f53p1mrlv5kcr’ was expected
    cannot build derivation ‘/nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv’: 1 dependencies couldn't be built
    error: build of ‘/nix/store/6wa7fc07y3pdwzlz999h6cb54xqb148f-node-react-autosuggest-3.7.4.drv’ failed
@svanderburg
Copy link
Owner

svanderburg commented Aug 30, 2016

I have created a branch: fetchgit_fix that should solve the problem. Now that the 16.09 release of Nixpkgs comes close, this should become the default.

To try it, use this branch: https://github.com/svanderburg/node2nix/tree/fetchgit_fix

Install the development version with:

nix-env -f release.nix -iA package.x86_64-linux

Note that this branch of node2nix is incompatible with the latest stable version of Nixpkgs (version 16.03). It only works with master (future 16.09)

@svanderburg
Copy link
Owner

This has been fixed in the 1.0.1 release

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