Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 56 lines 1.5 kB view raw
1{ stdenv, fetchFromGitHub, makeWrapper, gawk 2, makeFontsConf, freefont_ttf, gnuplot, perl, perlPackages 3}: 4 5let 6 7 fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; }; 8 9in 10 11perlPackages.buildPerlPackage rec { 12 pname = "feedgnuplot"; 13 version = "1.51"; 14 15 src = fetchFromGitHub { 16 owner = "dkogan"; 17 repo = "feedgnuplot"; 18 rev = "v${version}"; 19 sha256 = "0npk2l032cnmibjj5zf3ii09mpxciqn32lx6g5bal91bkxwn7r5i"; 20 }; 21 22 outputs = [ "out" ]; 23 24 nativeBuildInputs = [ makeWrapper gawk ]; 25 26 buildInputs = [ gnuplot perl ] 27 ++ (with perlPackages; [ ListMoreUtils IPCRun StringShellQuote ]); 28 29 # Fontconfig error: Cannot load default config file 30 FONTCONFIG_FILE = fontsConf; 31 32 postPatch = '' 33 patchShebangs . 34 ''; 35 36 # Tests require gnuplot 4.6.4 and are completely skipped with gnuplot 5. 37 doCheck = false; 38 39 postInstall = '' 40 wrapProgram $out/bin/feedgnuplot \ 41 --prefix "PATH" ":" "$PATH" \ 42 --prefix "PERL5LIB" ":" "$PERL5LIB" 43 install -D -m 444 -t $out/share/bash-completion/completions \ 44 completions/bash/feedgnuplot 45 install -D -m 444 -t $out/share/zsh/site-functions \ 46 completions/zsh/_feedgnuplot 47 ''; 48 49 meta = with stdenv.lib; { 50 description = "General purpose pipe-oriented plotting tool"; 51 homepage = "https://github.com/dkogan/feedgnuplot/"; 52 license = with licenses; [ artistic1 gpl1Plus ]; 53 platforms = platforms.unix; 54 maintainers = with maintainers; [ mnacamura ]; 55 }; 56}