nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

analog: use nixpkgs libraries (png, jpeg, zlib, bz2)

This also fixes darwin build that failed when building in-tree zlib and
libpng.

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>

+15 -1
+15 -1
pkgs/by-name/an/analog/package.nix
··· 2 2 stdenv, 3 3 lib, 4 4 fetchFromGitHub, 5 + bzip2, 6 + gd, 7 + libjpeg, 8 + libpng, 5 9 }: 6 10 7 11 stdenv.mkDerivation rec { ··· 19 15 sha256 = "sha256-NCturEibnpl6+paUZezksHzP33WtAzfIolvBLeEHXjY="; 20 16 }; 21 17 18 + buildInputs = [ 19 + bzip2 20 + gd 21 + libjpeg 22 + libpng 23 + ]; 24 + 22 25 postPatch = '' 23 26 sed -i src/anlghead.h \ 24 27 -e "s|#define DEFAULTCONFIGFILE .*|#define DEFAULTCONFIGFILE \"$out/etc/analog.cfg\"|g" \ 25 28 -e "s|#define LANGDIR .*|#define LANGDIR \"$out/share/${pname}/lang/\"|g" 26 - substituteInPlace src/Makefile --replace "gcc" "${stdenv.cc.targetPrefix}cc" 29 + substituteInPlace src/Makefile \ 30 + --replace-fail "gcc" "${stdenv.cc.targetPrefix}cc" \ 31 + --replace-fail "LIBS = -lm" "LIBS = -lm -lpng -lgd -ljpeg -lz -lbz2" \ 32 + --replace-fail "DEFS =" "DEFS = -DHAVE_GD -DHAVE_ZLIB -DHAVE_BZLIB" 27 33 ''; 28 34 29 35 installPhase = ''