Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 70 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 cmake, 6 pkg-config, 7 zlib, 8 libpng, 9 libjpeg, 10 giflib, 11 libtiff, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "pslib"; 16 version = "0.4.8"; 17 18 src = fetchurl { 19 name = "${pname}-snixource-${version}.tar.gz"; 20 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; 21 sha256 = "sha256-gaWNvBLuUUy0o+HWCOyG6KmzxDrYCY6PV3WbA/jjH64="; 22 }; 23 24 nativeBuildInputs = [ 25 cmake 26 pkg-config 27 ]; 28 buildInputs = [ 29 zlib 30 libpng 31 libjpeg 32 giflib 33 libtiff 34 ]; 35 36 env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { 37 NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration"; 38 }; 39 40 doCheck = true; 41 42 outputs = [ 43 "out" 44 "dev" 45 "doc" 46 ]; 47 48 installPhase = '' 49 mkdir -p $out/lib 50 for path in *.dylib *.so *.so.* *.o *.o.*; do 51 mv $path $out/lib/ 52 done 53 mkdir -p $dev/include 54 mv ../include/libps $dev/include 55 if test -d nix-support; then 56 mv nix-support $dev 57 fi 58 mkdir -p $doc/share/doc/${pname} 59 cp -r ../doc/. $doc/share/doc/${pname} 60 ''; 61 62 meta = with lib; { 63 description = "C-library for generating multi page PostScript documents"; 64 homepage = "https://pslib.sourceforge.net/"; 65 changelog = "https://sourceforge.net/p/pslib/git/ci/master/tree/pslib/ChangeLog"; 66 license = licenses.gpl2; 67 maintainers = with maintainers; [ ShamrockLee ]; 68 platforms = platforms.unix; 69 }; 70}