override.nix 755 B

123456789101112131415161718192021222324
  1. pkgs: attrs: with pkgs; rec {
  2. version = "1.6.40";
  3. src = fetchFromGitHub {
  4. owner = "pnggroup";
  5. repo = "libpng";
  6. rev = "v${version}";
  7. hash = "sha256-Rad7Y5Z9PUCipBTQcB7LEP8fIVTG3JsnMeknUkZ/rRg=";
  8. };
  9. # nixpkgs use a patch from libpng-apng project for getting A(nimated) PNG support.
  10. # While libpng-apng project patch is functionally equivalent to apng one,
  11. # the latter seems to provide somewhat better code.
  12. #
  13. # The sha256 checksum of the patch has to be updated upon libpng version update.
  14. patch_src = fetchurl {
  15. url = "mirror://sourceforge/apng/libpng-${version}-apng.patch.gz";
  16. hash = "sha256-esYjxN5hBg8Uue6AOAowulcB22U7rnQz2TjLM0+w+0w=";
  17. };
  18. postPatch = ''
  19. gunzip < ${patch_src} | patch -Np0
  20. '';
  21. }