Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 47 lines 964 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 libXft, 6 imlib2, 7 giflib, 8 libexif, 9 conf ? null, 10}: 11 12stdenv.mkDerivation rec { 13 pname = "sxiv"; 14 version = "26"; 15 16 src = fetchFromGitHub { 17 owner = "muennich"; 18 repo = pname; 19 rev = "v${version}"; 20 sha256 = "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f"; 21 }; 22 23 configFile = lib.optionalString (conf != null) (builtins.toFile "config.def.h" conf); 24 preBuild = lib.optionalString (conf != null) "cp ${configFile} config.def.h"; 25 26 buildInputs = [ 27 libXft 28 imlib2 29 giflib 30 libexif 31 ]; 32 33 makeFlags = [ "PREFIX=${placeholder "out"}" ]; 34 35 postInstall = '' 36 install -Dt $out/share/applications sxiv.desktop 37 ''; 38 39 meta = with lib; { 40 description = "Simple X Image Viewer"; 41 homepage = "https://github.com/muennich/sxiv"; 42 license = lib.licenses.gpl2Plus; 43 platforms = lib.platforms.linux; 44 maintainers = with maintainers; [ h7x4 ]; 45 mainProgram = "sxiv"; 46 }; 47}