nixpkgs/pkgs/applications/graphics/sxiv/default.nix

35 lines
898 B
Nix
Raw Normal View History

2021-01-15 16:21:58 +03:00
{ lib, stdenv, fetchFromGitHub, libXft, imlib2, giflib, libexif, conf ? null }:
2017-07-03 15:16:20 +03:00
2021-01-15 16:21:58 +03:00
with lib;
2013-05-24 12:21:34 +04:00
2016-01-03 23:36:47 +03:00
stdenv.mkDerivation rec {
2019-01-26 23:49:59 +03:00
pname = "sxiv";
2020-01-16 18:02:53 +03:00
version = "26";
2016-01-03 23:36:47 +03:00
src = fetchFromGitHub {
owner = "muennich";
2019-01-26 23:49:59 +03:00
repo = pname;
rev = "v${version}";
2020-01-16 18:02:53 +03:00
sha256 = "0xaawlfdy7b277m38mgg4423kd7p1ffn0dq4hciqs6ivbb3q9c4f";
2013-05-24 12:21:34 +04:00
};
2017-07-03 15:16:20 +03:00
configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
2018-02-24 13:27:26 +03:00
buildInputs = [ libXft imlib2 giflib libexif ];
2017-07-03 15:16:20 +03:00
2020-01-16 18:02:53 +03:00
makeFlags = [ "PREFIX=${placeholder "out"}" ];
postInstall = ''
2020-01-16 18:02:53 +03:00
install -Dt $out/share/applications sxiv.desktop
'';
2013-05-24 12:21:34 +04:00
meta = {
description = "Simple X Image Viewer";
homepage = "https://github.com/muennich/sxiv";
2021-01-15 16:21:58 +03:00
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = with maintainers; [ jfrankenau ];
2013-05-24 12:21:34 +04:00
};
}