actions / runner-images

GitHub Actions runner images
MIT License
10.11k stars 3.04k forks source link

Update/Add nix package manager #7066

Closed koozz closed 1 year ago

koozz commented 1 year ago

Tool name

nix

Tool license

LGPL-2.1

Add or update?

Desired version

2.13.2 (current latest)

Approximate size

No response

Brief description of tool

The Nix package manager seamlessly allows multiple versions of libraries to be used concurrently or even different versions per shell.

Packages are download into the nix-store on disk on demand and symlinked into the new shell. This will not alter the global environment and can be extremely valuable in building reproducible builds.

Nix provides developers with a complete and consistent development environment. Stop worrying how to install dependencies for your project.

-- NixOS site

Using a nix-shell to build software or writing scripts with the nix-shell shebang will make it work for everyone who has Nix installed. Other ways of leveraging Nix would be to be able to instantly build projects containing a flake.nix file.

Another option would be to support a NixOS runner image, but that would need all the tools already installed on the ubuntu-latest and other images.

URL for tool's homepage

https://nixos.org

Provide a basic test case to validate the tool's functionality.

nix-shell -p cowsay --run "cowsay Nix works fine!"

Platforms where you need the tool

Runner images where you need the tool

Can this tool be installed during the build?

sh <(curl -L https://nixos.org/nix/install) --daemon

Tool installation time in runtime

In the order of minutes, have not timed a clean install (yet).

Are you willing to submit a PR?

Sure, though I would need to work my way around PowerShell I see, not my favorite shell scripting.

ddobranic commented 1 year ago

@koozz, thank you very much for proposal to include this interesting tool. at this point we would not like to preinstall it on our images since we already have a few, but we will reconsider in the future.

dzmitry-lahoda commented 1 month ago

just checking, 1.5 year passed. any reconsiderations?

previous asks

https://github.com/actions/runner-images/issues/1579

https://github.com/actions/runner-images/issues/376

dzmitry-lahoda commented 1 month ago

@koozz for you request, nix does does not work on Windows, only on *nix derived systems.