Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 66 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 autoreconfHook, 7 gettext, 8 perl, 9 pkg-config, 10 libxml2, 11 pango, 12 cairo, 13 groff, 14 tcl, 15}: 16 17perl.pkgs.toPerlModule ( 18 stdenv.mkDerivation rec { 19 pname = "rrdtool"; 20 version = "1.9.0"; 21 22 src = fetchFromGitHub { 23 owner = "oetiker"; 24 repo = "rrdtool-1.x"; 25 rev = "v${version}"; 26 hash = "sha256-CPbSu1mosNlfj2nqiNVH14a5C5njkfvJM8ix3X3aP8E="; 27 }; 28 29 # Fix darwin build 30 patches = lib.optional stdenv.hostPlatform.isDarwin (fetchpatch { 31 url = "https://github.com/oetiker/rrdtool-1.x/pull/1262.patch"; 32 hash = "sha256-aP0rmDlILn6VC8Tg7HpRXbxL9+KD/PRTbXnbQ7HgPEg="; 33 }); 34 35 nativeBuildInputs = [ 36 pkg-config 37 autoreconfHook 38 ]; 39 40 buildInputs = [ 41 gettext 42 perl 43 libxml2 44 pango 45 cairo 46 groff 47 ] 48 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 49 tcl 50 ]; 51 52 postInstall = '' 53 # for munin and rrdtool support 54 mkdir -p $out/${perl.libPrefix} 55 mv $out/lib/perl/5* $out/${perl.libPrefix} 56 ''; 57 58 meta = with lib; { 59 homepage = "https://oss.oetiker.ch/rrdtool/"; 60 description = "High performance logging in Round Robin Databases"; 61 license = licenses.gpl2Only; 62 platforms = platforms.linux ++ platforms.darwin; 63 maintainers = with maintainers; [ pSub ]; 64 }; 65 } 66)