depot/third_party/nixpkgs/pkgs/applications/graphics/sxiv/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

34 lines
892 B
Nix

{ lib, stdenv, fetchFromGitHub, libXft, imlib2, giflib, libexif, conf ? null }:
with 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 = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = with maintainers; [ h7x4 ];
};
}