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

netpbm: 10.82.01 → 10.89.1 #81063

Merged
merged 10 commits into from Mar 2, 2020
Merged

netpbm: 10.82.01 → 10.89.1 #81063

merged 10 commits into from Mar 2, 2020

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Feb 25, 2020

Motivation for this change

https://sourceforge.net/p/netpbm/code/3735/tree//advanced/doc/HISTORY

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size: 95.9M → 103.0M (31.7M just ${!outputLib})
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

pkgs/tools/graphics/netpbm/default.nix Outdated Show resolved Hide resolved
pkgs/tools/graphics/netpbm/default.nix Outdated Show resolved Hide resolved
pkgs/tools/graphics/netpbm/default.nix Outdated Show resolved Hide resolved
pkgs/tools/graphics/netpbm/default.nix Outdated Show resolved Hide resolved
@@ -59,12 +97,18 @@ stdenv.mkDerivation {
for prog in ppmquant; do
wrapProgram "$out/bin/$prog" --prefix PATH : "$out/bin"
done

moveToOutput bin "''${!outputBin}"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a better way?


# h remembers if we found the pattern; on the last line, if a pattern was previously found, we exit with 1
# https://stackoverflow.com/a/12145797/160386
sed -i "$nixFile" -re '/(\brev\b\s*=\s*)"'"$oldRev"'"/{ s||\1"'"$latestRev"'"|; h }; ${x; /./{x; q1}; x}' && die "Unable to update revision."
Copy link
Contributor Author

Choose a reason for hiding this comment

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

${x; /./{x; q1}; x} is ugly, I would prefer ${x; /./{x; t}; x; q1} but that seems to swap holding space odd number of times.

* Format with nixpkgs-fmt
* Move build tools to nativeBuildInputs
* Clarify license
The build script check whether JPEGLIB and ZLIB are not set to NONE.
We did not set the latter as pkg-config handles zlib requirement
for libpng dependency and the comment in config.mk only talks about
zlib being needed for libpng.

Since libtiff only needs libz for static linking, we turn TIFFLIB_NEEDS_ZLIB
off instead of pointlessly setting ZLIB value.

Closes: #75156
* Append to config.mk instead of substituting
* Remove unused path substitution (rgbpaths.patch was deleted in f6c2898)
* -lz in LDFLAGS does not seem to be necessary
* Touching the file (introduced in 4dd9507) does not seem to be necessary.
It was disabled in abd3c24 but it no longer seems to fail.
We did that in the past with rgbpaths.patch in the past but it was eventually removed. This fixes the regression.
@jtojnar jtojnar requested a review from andir March 1, 2020 15:20
@jtojnar jtojnar merged commit f27031f into master Mar 2, 2020
@jtojnar jtojnar deleted the netpbm branch March 2, 2020 18:26
@sikmir
Copy link
Member

sikmir commented Mar 3, 2020

@jtojnar doesn't work for me:

$ /nix/store/jbv7bjcxd1m6xn7hfdymsj173hpbnqa1-netpbm-10.89.1-bin/bin/ppmquant --version
/nix/store/jbv7bjcxd1m6xn7hfdymsj173hpbnqa1-netpbm-10.89.1-bin/bin/ppmquant: line 3: /nix/store/an59sy7q8c83qbfsih1g722z1apx9pni-netpbm-10.89.1/bin/.ppmquant-wrapped: No such file or directory

@jtojnar
Copy link
Contributor Author

jtojnar commented Mar 3, 2020

@sikmir sorry about that, fixed in 1459b34

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.

netpbm does not install libnetpbm.so symlink
2 participants