nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 82 lines 1.6 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 makeWrapper, 6 libxt, 7 libxinerama, 8 libx11, 9 imlib2Full, 10 libjpeg, 11 libpng, 12 curl, 13 libexif, 14 jpegexiforient, 15 perl, 16 enableAutoreload ? !stdenv.hostPlatform.isDarwin, 17}: 18 19stdenv.mkDerivation (finalAttrs: { 20 pname = "feh"; 21 version = "3.11.2"; 22 23 src = fetchFromGitHub { 24 owner = "derf"; 25 repo = "feh"; 26 rev = finalAttrs.version; 27 hash = "sha256-bwp/hzkuwQTgPakE0zkNtBWrNUkVWt9btTD8MVx+Xq4="; 28 }; 29 30 outputs = [ 31 "out" 32 "man" 33 "doc" 34 ]; 35 36 nativeBuildInputs = [ makeWrapper ]; 37 38 buildInputs = [ 39 libxt 40 libx11 41 libxinerama 42 imlib2Full 43 libjpeg 44 libpng 45 curl 46 libexif 47 ]; 48 49 makeFlags = [ 50 "PREFIX=${placeholder "out"}" 51 "exif=1" 52 ] 53 ++ lib.optional stdenv.hostPlatform.isDarwin "verscmp=0" 54 ++ lib.optional enableAutoreload "inotify=1"; 55 56 installTargets = [ "install" ]; 57 postInstall = '' 58 wrapProgram "$out/bin/feh" --prefix PATH : "${ 59 lib.makeBinPath [ 60 libjpeg 61 jpegexiforient 62 ] 63 }" \ 64 --add-flags '--theme=feh' 65 ''; 66 67 nativeCheckInputs = lib.singleton (perl.withPackages (p: [ p.TestCommand ])); 68 doCheck = true; 69 70 meta = { 71 description = "Light-weight image viewer"; 72 homepage = "https://feh.finalrewind.org/"; 73 # released under a variant of the MIT license 74 # https://spdx.org/licenses/MIT-feh.html 75 license = lib.licenses.mit-feh; 76 maintainers = with lib.maintainers; [ 77 gepbird 78 ]; 79 platforms = lib.platforms.unix; 80 mainProgram = "feh"; 81 }; 82})