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

wireguard-tools: clean up, wrap w/ wireguard-go on Darwin #40907

Merged

Conversation

lukateras
Copy link
Member

@kirelagin @zx2c4

Cleans up derivation (consolidates some things), also note that systemd unit is now built unconditionally (it is just a text file anyway). On Darwin, wg and wg-quick are wrapped together with wireguard-go.

@GrahamcOfBorg GrahamcOfBorg added the 6.topic: darwin Running or building packages on Darwin label May 22, 2018
'';

meta = with stdenv.lib; {
homepage = https://www.wireguard.com/;
downloadPage = https://git.zx2c4.com/WireGuard/refs/;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this line removed from wireguard-tools.nix but kept in wireguard.nix?

Copy link
Member Author

Choose a reason for hiding this comment

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

Didn't mean to remove. You noticed faster than I could amend :-)

@lukateras lukateras force-pushed the 20180522.041617/wireguard-tools-cleanup branch from e324de6 to e9e044a Compare May 22, 2018 01:24
"DESTDIR=$(out)"
"PREFIX=/"
"-C" "tools"
"WITH_BASHCOMPLETION=yes"
"WITH_SYSTEMDUNITS=yes"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not keep the useSystemd mark in here? It's indeed really useless on macOS.

Copy link
Member Author

@lukateras lukateras May 22, 2018

Choose a reason for hiding this comment

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

Smaller variability helps package maintenance. In this case, useSystemd required conditional patch in postFixup phase. Given that it's just a text file, it seems to be easier to copy and patch anyway than to decide based on platform.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: wireguard-tools

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519
shrinking /nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519/bin/wg
gzipping man pages under /nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519/share/man/
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519/lib  /nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519/bin
patching script interpreter paths in /nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519
/nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519/bin/wg-quick: interpreter directive changed from "/bin/bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519...
/nix/store/70zharrb5mrbxlwwc3paixlxq624rsy2-wireguard-tools-0.0.20180519

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: wireguard-tools

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519
shrinking /nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519/bin/wg
gzipping man pages under /nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519/share/man/
strip is /nix/store/jk6j4lh9v5mvjdbdc35sj0zffhhf6s56-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519/lib  /nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519/bin
patching script interpreter paths in /nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519
/nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519/bin/wg-quick: interpreter directive changed from "/bin/bash" to "/nix/store/l4w7xwjy2nmk31fl5kgyy7gg8z7l9n8z-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519...
/nix/store/qgxxi2q4lh2md0nljml7nb95j4v92lp1-wireguard-tools-0.0.20180519

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: wireguard-tools

Partial log (click to expand)

install: creating directory '/nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519//lib/systemd'
install: creating directory '/nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519//lib/systemd/system'
'systemd/wg-quick@.service' -> '/nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519//lib/systemd/system/wg-quick@.service'
post-installation fixup
gzipping man pages under /nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519/share/man/
strip is /nix/store/kdff2gim6417493yha769kh00n63lnrw-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519/lib  /nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519/bin
patching script interpreter paths in /nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519
/nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519/bin/wg-quick: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/r8bx3qf1bpncb14i9gzma4vr089pc3pv-bash-4.4-p19/bin/bash"
/nix/store/hkl3zlzxya4g15hscqf77fi10g4x4c5d-wireguard-tools-0.0.20180519

@lukateras lukateras merged commit 5cd1e34 into NixOS:master May 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants