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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cntlm: add support for darwin #43993

Merged
merged 1 commit into from Jul 25, 2018
Merged

cntlm: add support for darwin #43993

merged 1 commit into from Jul 25, 2018

Conversation

carlosdagos
Copy link
Member

Motivation for this change

Hi all,

This adds Darwin support to cntlm 馃槃

Thanks

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.

@Mic92
Copy link
Member

Mic92 commented Jul 23, 2018

@GrahamcOfBorg build cntlm

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: cntlm

Partial log (click to expand)

7 warnings generated.
Linking cntlm
installing
post-installation fixup
moving /nix/store/sm49n7rsxmhvg7dms0y2c5dhwkzqwg3x-cntlm-0.92.3/man to /nix/store/sm49n7rsxmhvg7dms0y2c5dhwkzqwg3x-cntlm-0.92.3/share/man
gzipping man pages under /nix/store/sm49n7rsxmhvg7dms0y2c5dhwkzqwg3x-cntlm-0.92.3/share/man/
strip is /nix/store/qvj6bdvy7vdaxi3my0nq8ghf14njh8wk-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/sm49n7rsxmhvg7dms0y2c5dhwkzqwg3x-cntlm-0.92.3/bin
patching script interpreter paths in /nix/store/sm49n7rsxmhvg7dms0y2c5dhwkzqwg3x-cntlm-0.92.3
/nix/store/sm49n7rsxmhvg7dms0y2c5dhwkzqwg3x-cntlm-0.92.3

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: cntlm

Partial log (click to expand)

post-installation fixup
moving /nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3/man to /nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3/share/man
shrinking RPATHs of ELF executables and libraries in /nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3
shrinking /nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3/bin/cntlm
gzipping man pages under /nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3/share/man/
strip is /nix/store/fzsyclvxz1p2ia83caniy93v8cwarg0j-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3/bin
patching script interpreter paths in /nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3
checking for references to /build in /nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3...
/nix/store/9c2g0b0sn76186bjigvx7ii14bf1bgzj-cntlm-0.92.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: cntlm

Partial log (click to expand)

post-installation fixup
moving /nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3/man to /nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3/share/man
shrinking RPATHs of ELF executables and libraries in /nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3
shrinking /nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3/bin/cntlm
gzipping man pages under /nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3/share/man/
strip is /nix/store/h0nc84ybvb8g724fwysvcghh1675wjli-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3/bin
patching script interpreter paths in /nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3
checking for references to /build in /nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3...
/nix/store/x22dqq64yp17mf659fs0dvbf4140rr4l-cntlm-0.92.3

CXX = "clang++";
CC = "clang";
CPP = "clang -E";
CXXCPP = "clang++ -E";
Copy link
Member

@Mic92 Mic92 Jul 23, 2018

Choose a reason for hiding this comment

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

Should CXX/CC not be set by default? If CPP = "cpp"; CXXCPP = "cpp"; also works the platform condition could be removed.
cc @LnL7

Copy link
Member

Choose a reason for hiding this comment

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

The CPP variants are not, the others are set by default yes.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the best is do as @Mic92 points out and remove the platform condition. Thanks for reviewing!

@@ -11,6 +11,11 @@ stdenv.mkDerivation rec {

buildInputs = [ which ];

preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
sed -e 's/gcc/clang/' Makefile > Makefile.clang
Copy link
Member

Choose a reason for hiding this comment

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

Note that makeFlags=["CC=cc"]; also should override the compiler. I am not sure if this applies here.

Copy link
Member

Choose a reason for hiding this comment

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

Is this required in the presence of? https://github.com/framon/cntlm/blob/master/configure#L48

Copy link
Member Author

Choose a reason for hiding this comment

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

Will look into the configure script @Mic92, thanks for pointing it out :)

I tried makeFlags=["CC=cc"]; but that didn't work. I think it's because the configure script is somehow unsetting the CC env var.

@carlosdagos
Copy link
Member Author

Cleaned it up a little bit, @Mic92. Check it out when you get a chance :) Thanks!

@LnL7 LnL7 merged commit 7cc5624 into NixOS:master Jul 25, 2018
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