Skip to content

Add Nix flake definition for reproducible builds#265

Open
josephvoss wants to merge 1 commit intoDeusData:mainfrom
josephvoss:push-pwvtvsvklvtz
Open

Add Nix flake definition for reproducible builds#265
josephvoss wants to merge 1 commit intoDeusData:mainfrom
josephvoss:push-pwvtvsvklvtz

Conversation

@josephvoss
Copy link
Copy Markdown

Adds flake.nix to define how this package should be built on systems running nix. Also commit the flake.lock file to pin the specific dependencies at build time.

By default support aarch64 and x86_64 for macos and linux. Run the Make command directly because cc on Nix systems is a wrapper file and not a binary directly, so the file check in scripts/build.sh fails to identify the host architecture correctly.

Include lib2git as an optional dev shell dependency since it's detected by pkg-config in the build script to link to lib2git if it exists at build time.

Adds `flake.nix` to define how this package should be built on systems
running [nix][nix-link]. Also commit the `flake.lock` file to pin the
specific dependencies at build time.

By default support aarch64 and x86_64 for macos and linux. Run the Make
command directly because `cc` on Nix systems is a wrapper file and not a
binary directly, so the `file` check in `scripts/build.sh` fails to
identify the host architecture correctly.

Include lib2git as an optional dev shell dependency since it's detected
by `pkg-config` in the build script to link to `lib2git` if it exists at
build time.

[nix-link]: https://nixos.org/
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

Successfully merging this pull request may close these issues.

1 participant