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