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-review: 0.4.0 -> 0.5.0 #45267

Merged
merged 1 commit into from Aug 17, 2018
Merged

nix-review: 0.4.0 -> 0.5.0 #45267

merged 1 commit into from Aug 17, 2018

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Aug 17, 2018

Motivation for this change

In case you review @r-ryantm pull requests it is now possible to use the cachnix cache by using the --checkout option:

$ nix-review pr --checkout commit 44323
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

]}
'';
makeWrapperArgs = [
"--prefix" "PATH" ":" "${lib.makeBinPath [ nix git ]}"
Copy link
Contributor

@danbst danbst Aug 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why can't those be detected from buildInputs or nativeBuildInputs by make script?

Copy link
Member Author

@Mic92 Mic92 Aug 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a setuptools project, there is no way to detect from there. Also it would be wrong to capture the PATH at build time with respect to cross compilation. A hack would be to add it to propagatedBuildInputs which works because of the way buildPythonPackage works. But this is also incorrect because it is a runtime dependency not a build time dependency.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:(
I see this is common pattern:

$ rg makeBin $(rg buildPython . -l)
misc/lollypop-portal/default.nix
49:      --prefix PATH : "${stdenv.lib.makeBinPath [ easytag kid3 ]}"

applications/video/gnomecast/default.nix
20:    gappsWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ ffmpeg ]})

applications/misc/kitty/default.nix
46:    wrapProgram "$out/bin/kitty" --prefix PATH : "$out/bin:${stdenv.lib.makeBinPath [ imagemagick xsel ]}"

applications/virtualization/virt-manager/default.nix
52:    gappsWrapperArgs+=(--prefix PATH : "${makeBinPath [ cpio e2fsprogs file findutils gzip ]}")

development/tools/vcstool/default.nix
18:  makeWrapperArgs = ["--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ git bazaar subversion ]}"];

tools/X11/xpra/default.nix
64:      --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux pulseaudio ]}
72:  #  sed -i '4iexport PATH=${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}\${PATH:+:}\$PATH' $out/bin/xpra

tools/X11/xpra/gtk3.nix
58:      --prefix PATH : ${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}
67:  #  sed -i '4iexport PATH=${stdenv.lib.makeBinPath [ getopt xorgserver xauth which utillinux ]}\${PATH:+:}\$PATH' $out/bin/xpra

tools/backup/duplicity/default.nix
24:      --prefix PATH : "${stdenv.lib.makeBinPath [ gnupg ncftp rsync ]}"

tools/graphics/pywal/default.nix
15:  makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ imagemagick feh ]}" ];

tools/text/invoice2data/default.nix
12:  makeWrapperArgs = ["--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ imagemagick xpdf tesseract ]}" ];

tools/package-management/nix-review/default.nix
23:    wrapProgram $out/bin/nix-review --prefix PATH : ${stdenv.lib.makeBinPath [

tools/misc/youtube-dl/default.nix
38:    in [ ''--prefix PATH : "${lib.makeBinPath packagesToBinPath}"'' ];

tools/compression/dtrx/default.nix
9:  archivers = lib.makeBinPath ([ gnutar lhasa rpm binutils cpio gzip p7zip cabextract unshield ]

applications/networking/mailreaders/mailpile/default.nix
35:      --prefix PATH ":" "${stdenv.lib.makeBinPath [ gnupg1orig openssl ]}" \

applications/version-management/git-and-tools/git-big-picture/default.nix
20:      --prefix PATH ":" ${ stdenv.lib.makeBinPath buildInputs  }

development/tools/misc/gdbgui/default.nix
23:      --prefix PATH : ${stdenv.lib.makeBinPath [ gdb ]}

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: nix-review

Partial log (click to expand)

$ git worktree prune
$ git fetch --force https://github.com/NixOS/nixpkgs master:refs/nix-review/0 pull/1/head:refs/nix-review/1
$ git worktree add ./.review/pr-1 hash1
$ git merge --no-commit hash2
Building in /build/nox-review-j6s00vlq: pong3d
$ nix-shell --no-out-link --keep-going --max-jobs 2 --option build-use-sandbox true --run true --builders ssh://joerg@10.243.29.170 aarch64-linux -p pong3d
https://github.com/NixOS/nixpkgs/pull/1
$ nix-shell -p pong3d
$ git worktree prune
/nix/store/n184fj2fx1fy1gqjwj9hpzkfk4mkhmmd-nix-review-0.5.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: nix-review

Partial log (click to expand)

$ git worktree prune
$ git fetch --force https://github.com/NixOS/nixpkgs master:refs/nix-review/0 pull/1/head:refs/nix-review/1
$ git worktree add ./.review/pr-1 hash1
$ git merge --no-commit hash2
Building in /private/tmp/nix-build-nix-review-0.5.0.drv-0/nox-review-hq9q3pnm: pong3d
$ nix-shell --no-out-link --keep-going --max-jobs 8 --option build-use-sandbox true --run true --builders ssh://joerg@10.243.29.170 aarch64-linux -p pong3d
https://github.com/NixOS/nixpkgs/pull/1
$ nix-shell -p pong3d
$ git worktree prune
/nix/store/r1lr2krp9x1mmi7cb2izqkcjwcxc3xpg-nix-review-0.5.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: nix-review

Partial log (click to expand)

$ git worktree prune
$ git fetch --force https://github.com/NixOS/nixpkgs master:refs/nix-review/0 pull/1/head:refs/nix-review/1
$ git worktree add ./.review/pr-1 hash1
$ git merge --no-commit hash2
Building in /build/nox-review-zlon61sv: pong3d
$ nix-shell --no-out-link --keep-going --max-jobs 96 --option build-use-sandbox true --run true --builders ssh://joerg@10.243.29.170 aarch64-linux -p pong3d
https://github.com/NixOS/nixpkgs/pull/1
$ nix-shell -p pong3d
$ git worktree prune
/nix/store/69skbsgxkd6qxdmlxn3a4qvilc9zh5nw-nix-review-0.5.0

@xeji xeji merged commit fb8d192 into NixOS:master Aug 17, 2018
@Mic92 Mic92 deleted the nix-review branch August 17, 2018 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants