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
notary: fix build #39684
notary: fix build #39684
Conversation
Success on x86_64-linux (full log) Attempted: notary Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: notary Partial log (click to expand)
|
This builds fine but your patches have a side effect:
Now this isn't crucial but if it would be great if you could at least patch the version number in there somehow (users probably don't care about the git commit anyway). |
yeah you're absolutely right, I guess this is because |
The package is broken on master for some time now: https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.notary.x86_64-linux/all The main reason for the breackage is that the `Makefile` script attempts to retrieve the latest git commit by using `git rev-parse` which breaks as `git` is not in the build environment. This could be fixed by using `?=` rather than `:=` for the `GITCOMMIT` variable in the `make` script to easily override `GITCOMMIT` in the `buildPhase`. See the Hydra logs for reference: https://nix-cache.s3.amazonaws.com/log/ib4qp8h4r8d830ra4fah38l7ybb82gp7-notary-0.6.0.drv Furthermore some refactoring was applied: * Activated the test suite for `cmd/notary` to confirm the basic functionality when building for NixOS. * Added {pre,post} hooks for `{build,install}Phase` * Added myself as maintainer to have more people available in case of further breakage.
@xeji thanks for your feedback - I fixed the problem! |
Success on x86_64-linux (full log) Attempted: notary Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: notary Partial log (click to expand)
|
Great, thank you! |
Motivation for this change
The package is broken on master for some time now:
https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.notary.x86_64-linux/all
The main reason for the breackage is that the
Makefile
script attemptsto retrieve the latest git commit by using
git rev-parse
which breaksas
git
is not in the build environment. This could be fixed by using?=
rather than:=
for theGITCOMMIT
variable in themake
scriptto easily override
GITCOMMIT
in thebuildPhase
.See the Hydra logs for reference:
https://nix-cache.s3.amazonaws.com/log/ib4qp8h4r8d830ra4fah38l7ybb82gp7-notary-0.6.0.drv
Furthermore some refactoring was applied:
Activated the test suite for
cmd/notary
to confirm the basicfunctionality when building for NixOS.
Added {pre,post} hooks for
{build,install}Phase
Added myself as maintainer to have more people available in case of
further breakage.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)