depot/third_party/nixpkgs/pkgs/applications/graphics/sxiv/default.nix
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

34 lines
914 B
Nix

{ stdenv, fetchFromGitHub, libXft, imlib2, giflib, libexif, conf ? null }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "sxiv";
version = "26";
src = fetchFromGitHub {
owner = "muennich";
repo = pname;
rev = "v${version}";
sha256 = "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f";
};
configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
buildInputs = [ libXft imlib2 giflib libexif ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
postInstall = ''
install -Dt $out/share/applications sxiv.desktop
'';
meta = {
description = "Simple X Image Viewer";
homepage = "https://github.com/muennich/sxiv";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.linux;
maintainers = with maintainers; [ jfrankenau ];
};
}