Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 cmake, 6 pkg-config, 7 enableWX ? false, 8 wxGTK32, 9 enableXWin ? false, 10 xorg, 11 enablePNG ? false, 12 cairo, 13 pango, 14}: 15 16stdenv.mkDerivation rec { 17 pname = "plplot"; 18 version = "5.15.0"; 19 20 src = fetchurl { 21 url = "mirror://sourceforge/project/${pname}/${pname}/${version}%20Source/${pname}-${version}.tar.gz"; 22 sha256 = "0ywccb6bs1389zjfmc9zwdvdsvlpm7vg957whh6b5a96yvcf8bdr"; 23 }; 24 25 nativeBuildInputs = [ 26 cmake 27 pkg-config 28 ]; 29 30 buildInputs = 31 lib.optional enableWX wxGTK32 32 ++ lib.optional enableXWin xorg.libX11 33 ++ lib.optionals enablePNG [ 34 cairo 35 pango 36 ]; 37 38 passthru = { 39 inherit (xorg) libX11; 40 inherit 41 enableWX 42 enableXWin 43 ; 44 }; 45 46 cmakeFlags = [ 47 "-DBUILD_TEST=ON" 48 ]; 49 50 doCheck = true; 51 52 meta = with lib; { 53 description = "Cross-platform scientific graphics plotting library"; 54 mainProgram = "pltek"; 55 homepage = "https://plplot.org"; 56 maintainers = with maintainers; [ bcdarwin ]; 57 platforms = platforms.unix; 58 license = licenses.lgpl2; 59 }; 60}