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

grepcidr: Init at 2.0 #38685

Merged
merged 1 commit into from Apr 20, 2018
Merged

grepcidr: Init at 2.0 #38685

merged 1 commit into from Apr 20, 2018

Conversation

fadenb
Copy link
Contributor

@fadenb fadenb commented Apr 10, 2018

Motivation for this change

grepcidr was not available on NixOS: http://www.pc-tools.net/unix/grepcidr/

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.


installPhase = ''
mkdir -p $out/bin
cp grepcidr $out/bin/
Copy link
Member

Choose a reason for hiding this comment

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

Please use the default installPhase. You'll probably have to set something like

installFlags = [ "PREFIX=$out" ];

Copy link
Member

Choose a reason for hiding this comment

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

checked the makefile. installFlags = [ "PREFIX=$(out)" ]; should work.

version = "2.0";

src = fetchurl {
url = "http://www.pc-tools.net/files/unix/grepcidr-${version}.tar.gz";
Copy link
Member

Choose a reason for hiding this comment

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

grepcidr-${version} can be replaced by ${name}

@dotlambda
Copy link
Member

@GrahamcOfBorg build grepcidr

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: grepcidr

Partial log (click to expand)

install -m 0644 grepcidr.1 /nix/store/v16gh3p117jdr7f6dwv0r9az5nsslhy1-grepcidr-2.0/share/man/man1/grepcidr.1
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/v16gh3p117jdr7f6dwv0r9az5nsslhy1-grepcidr-2.0
shrinking /nix/store/v16gh3p117jdr7f6dwv0r9az5nsslhy1-grepcidr-2.0/bin/grepcidr
gzipping man pages under /nix/store/v16gh3p117jdr7f6dwv0r9az5nsslhy1-grepcidr-2.0/share/man/
strip is /nix/store/j7d4mr0ikv974ig7yzhknpsq288js4bs-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/v16gh3p117jdr7f6dwv0r9az5nsslhy1-grepcidr-2.0/bin
patching script interpreter paths in /nix/store/v16gh3p117jdr7f6dwv0r9az5nsslhy1-grepcidr-2.0
checking for references to /build in /nix/store/v16gh3p117jdr7f6dwv0r9az5nsslhy1-grepcidr-2.0...
/nix/store/v16gh3p117jdr7f6dwv0r9az5nsslhy1-grepcidr-2.0

description = "Filter IPv4 and IPv6 addresses matching CIDR patterns";
homepage = http://www.pc-tools.net/unix/grepcidr/;
license = licenses.gpl3;
platforms = platforms.unix;
Copy link
Member

Choose a reason for hiding this comment

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

Did you test this on macOS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dotlambda yes, tested and working with:

  • system: "x86_64-darwin"
  • host os: Darwin 16.7.0, macOS 10.12.6
  • multi-user?: yes
  • sandbox: no

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: grepcidr

Partial log (click to expand)

install -m 0644 grepcidr.1 /nix/store/ii2b0w1pmqri4g1k3s8q0r69nmkj0lm0-grepcidr-2.0/share/man/man1/grepcidr.1
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ii2b0w1pmqri4g1k3s8q0r69nmkj0lm0-grepcidr-2.0
shrinking /nix/store/ii2b0w1pmqri4g1k3s8q0r69nmkj0lm0-grepcidr-2.0/bin/grepcidr
gzipping man pages under /nix/store/ii2b0w1pmqri4g1k3s8q0r69nmkj0lm0-grepcidr-2.0/share/man/
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ii2b0w1pmqri4g1k3s8q0r69nmkj0lm0-grepcidr-2.0/bin
patching script interpreter paths in /nix/store/ii2b0w1pmqri4g1k3s8q0r69nmkj0lm0-grepcidr-2.0
checking for references to /build in /nix/store/ii2b0w1pmqri4g1k3s8q0r69nmkj0lm0-grepcidr-2.0...
/nix/store/ii2b0w1pmqri4g1k3s8q0r69nmkj0lm0-grepcidr-2.0

@dotlambda dotlambda merged commit 2d44db5 into NixOS:master Apr 20, 2018
@fadenb fadenb deleted the grepcidr branch April 20, 2018 13:41
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