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

cachix-action does not produce the same drv path as archive tarball #179

Closed
ryantm opened this issue Apr 5, 2020 · 4 comments
Closed

cachix-action does not produce the same drv path as archive tarball #179

ryantm opened this issue Apr 5, 2020 · 4 comments

Comments

@ryantm
Copy link
Collaborator

ryantm commented Apr 5, 2020

$ nix-instantiate https://github.com/ryantm/nixpkgs-update/archive/19de4c7ead3189717be6e96611aca161142f5ec3.tar.gz
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/p2mwzzxh3y6vhwx91kj7jbzqr15xz619-nixpkgs-update-0.2.0.drv

but

https://github.com/ryantm/nixpkgs-update/runs/561492466

has

/nix/store/8qvwc5f6adg7yvvkrvm4hfzmhhamkya1-nixpkgs-update-0.2.0
@ryantm
Copy link
Collaborator Author

ryantm commented Apr 5, 2020

Maybe this is some good news but even just fetching master vs the specific commit which is master is not reproducible (this is after clearing out my ~/.cache/nix/tarballs dir):

$ nix-instantiate https://github.com/ryantm/nixpkgs-update/archive/master.tar.gz
unpacking 'https://github.com/ryantm/nixpkgs-update/archive/master.tar.gz'...
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/ywgvk8v7m48z6vxlfljl4pv2r3w92na7-nixpkgs-update-0.2.0.drv
$ nix-instantiate https://github.com/ryantm/nixpkgs-update/archive/19de4c7ead3189717be6e96611aca161142f5ec3.tar.gz
unpacking 'https://github.com/ryantm/nixpkgs-update/archive/19de4c7ead3189717be6e96611aca161142f5ec3.tar.gz'...
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/p2mwzzxh3y6vhwx91kj7jbzqr15xz619-nixpkgs-update-0.2.0.drv

@ryantm
Copy link
Collaborator Author

ryantm commented Apr 5, 2020

$ nix-diff /nix/store/ywgvk8v7m48z6vxlfljl4pv2r3w92na7-nixpkgs-update-0.2.0.drv /nix/store/p2mwzzxh3y6vhwx91kj7jbzqr15xz619-nixpkgs-update-0.2.0.drv
- /nix/store/ywgvk8v7m48z6vxlfljl4pv2r3w92na7-nixpkgs-update-0.2.0.drv:{out}
+ /nix/store/p2mwzzxh3y6vhwx91kj7jbzqr15xz619-nixpkgs-update-0.2.0.drv:{out}
• The set of input sources do not match:
    - /nix/store/396py519hv9cdx4ifxnavc83gyh5sd13-1xdd9r6bjz4iw4krzd3h3p4dg27c7z6a-master.tar.gz
    + /nix/store/6ihqic1lmp1cbj8gjrc9slgdmhydc10w-8fnb57phjdqkxacv48zbvrmz3q7lps6d-19de4c7ead3189717be6e96611aca161142f5ec3.tar.gz
• The environments do not match:
    src=''
        /nix/store/396ihqic1lmpy51cbj8gjrc9slgdmhv9cydx4ic10w-8fxnb57phjdqkxavcv48zbvrmz3gyh5q7lps6d13-1xdd9r6bjz4iw4krzd3h3pe4c7eadg231897c17zbe6e96611a-mcast161142f5erc3.tar.gz
    ''
$ diff -r /nix/store/396py519hv9cdx4ifxnavc83gyh5sd13-1xdd9r6bjz4iw4krzd3h3p4dg27c7z6a-master.tar.gz /nix/store/6ihqic1lmp1cbj8gjrc9slgdmhydc10w-8fnb57phjdqkxac\
v48zbvrmz3q7lps6d-19de4c7ead3189717be6e96611aca161142f5ec3.tar.gz


@ryantm
Copy link
Collaborator Author

ryantm commented Apr 5, 2020

Using builtins.path as suggested by domenkozar fixed the problem where the download from master vs the hash archive were different.

Unfortunately, the cachix-action build is still different. Here is nix-instantiate on my computer:

$ nix-instantiate https://github.com/ryantm/nixpkgs-update/archive/f051b6638ad2b890d501dbfb79900ff14051165d.tar.gz
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/3y44p985lwsjj25b19nsj94sjmz5hr8p-nixpkgs-update-0.2.0.drv

This drv has an out path of

/nix/store/91lrnlnns9pw0vssj9xcdp7c9z2g74yj-nixpkgs-update-0.2.0

The cachix-action log says the result path is:

  /nix/store/mz066jd34cpddlsndwdh3w3l0pkrnl67-nixpkgs-update-0.2.0

@ryantm
Copy link
Collaborator Author

ryantm commented Apr 5, 2020

Solved! cachix/cachix-action#36 among other things changed.

@ryantm ryantm closed this as completed Apr 5, 2020
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