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

nix: validate checksums #2066

Closed
Tracked by #875
viceice opened this issue Jan 29, 2024 · 5 comments · Fixed by #3087
Closed
Tracked by #875

nix: validate checksums #2066

viceice opened this issue Jan 29, 2024 · 5 comments · Fixed by #3087
Labels
priority-2-important User-visible bugs or very important features status:ready Ready to start implementation tool/nix type:feature Feature (new functionality)

Comments

@viceice
Copy link
Member

viceice commented Jan 29, 2024

@viceice viceice changed the title nix (no checksums) nix: validate checksums Jan 29, 2024
@viceice viceice added type:feature Feature (new functionality) priority-2-important User-visible bugs or very important features status:ready Ready to start implementation tool/nix labels Jan 29, 2024
@sandydoo
Copy link
Contributor

sandydoo commented Aug 7, 2024

I tried porting the installer to typescript yesterday and I few things came up that I thought were worth relaying here:

  1. https://releases.nixos.org/?prefix=nix/ uses javascript to list an S3 bucket. We could list the bucket directly instead (https://nix-releases.s3.amazonaws.com/?delimiter=/&prefix=nix/) and parse the XML to fetch the latest version.

  2. Unlike the static build on Hydra, the releases are not statically compiled. I imagine the binary is linked to the store paths that ship with the release tar.

  3. We could run the install script that ships with the tarball to set this all up. Unfortunately, it doesn't support being run as root. It needs another user and access to sudo.

    We might be able to get it to work as root though. It's a pretty short script. Or, if a fully working installation isn't necessary, we can manually replicate the required steps.

    There is an alternative installer https://github.com/DeterminateSystems/nix-installer. It's far more robust, supports specifying the exact version of Nix to install, and officially supports docker containers. However, it's important to note that it is unofficial and is maintained by third-party company.

@viceice
Copy link
Member Author

viceice commented Aug 8, 2024

I'm thinking about building our own static nix build. do you know an easy way to build this with an docker image?

@sandydoo
Copy link
Contributor

sandydoo commented Aug 8, 2024

I suppose the easiest way would be to use the nixos/nix container, checkout the nix repo by tag, and run nix build .#nix-static.

@viceice
Copy link
Member Author

viceice commented Aug 9, 2024

@viceice
Copy link
Member Author

viceice commented Aug 9, 2024

@sandydoo after #3087 is merged it should be easier to port to typescript 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-2-important User-visible bugs or very important features status:ready Ready to start implementation tool/nix type:feature Feature (new functionality)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants