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

acme.sh: use iproute on linux and netstat elsewhere #60258

Merged
merged 1 commit into from Apr 28, 2019

Conversation

thefloweringash
Copy link
Member

Motivation for this change

Make acme.sh usable on Darwin. Tested with #60257 to get socat.

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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 0 10.rebuild-linux: 0 labels Apr 26, 2019
@@ -16,7 +16,9 @@ stdenv.mkDerivation rec {
mkdir -p $out $out/bin $out/libexec
cp -R $src/* $_
makeWrapper $out/libexec/acme.sh $out/bin/acme.sh \
--prefix PATH : "${lib.makeBinPath [ socat openssl curl iproute ]}"
--prefix PATH : "${lib.makeBinPath (
[ socat openssl curl ] ++ lib.optional stdenv.isLinux iproute
Copy link
Member

Choose a reason for hiding this comment

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

Can you instead use "unixtools.netstat" here? This is provided for both linux and darwin.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looking at the original code, it prefers ss if available, and falls back to sniffing for netstat versions by parsing help strings. In this case I would prefer to provide ss via iproute if available, and netstat otherwise. (PR updated)

@thefloweringash thefloweringash changed the title acme.sh: restrict iproute to linux to fix darwin build acme.sh: use iproute on linux and netstat elsewhere Apr 27, 2019
@matthewbauer matthewbauer merged commit 072287b into NixOS:master Apr 28, 2019
@thefloweringash thefloweringash deleted the acme.sh-darwin branch May 1, 2019 16:36
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

2 participants