2017-07-03 14:16:20 +02:00
|
|
|
{ stdenv, fetchFromGitHub, libX11, imlib2, giflib, libexif, conf ? null }:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
2013-05-24 10:21:34 +02:00
|
|
|
|
2016-01-03 21:36:47 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "sxiv-${version}";
|
2017-05-14 14:40:11 +02:00
|
|
|
version = "1.3.2";
|
|
|
|
|
2016-01-03 21:36:47 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "muennich";
|
|
|
|
repo = "sxiv";
|
2017-05-14 14:40:11 +02:00
|
|
|
rev = "v${version}";
|
2016-01-03 21:36:47 +01:00
|
|
|
sha256 = "1f4gz1qjhb44bbb3q5fqk439zyipkwnr19zhg89yq2pgmzzzqr2h";
|
2013-05-24 10:21:34 +02:00
|
|
|
};
|
|
|
|
|
2014-11-04 00:01:03 +01:00
|
|
|
postUnpack = ''
|
|
|
|
substituteInPlace $sourceRoot/Makefile \
|
|
|
|
--replace /usr/local $out
|
|
|
|
'';
|
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";
|
|
|
|
|
2014-11-04 00:01:03 +01:00
|
|
|
buildInputs = [ libX11 imlib2 giflib libexif ];
|
2017-07-03 14:16:20 +02:00
|
|
|
|
2017-10-30 17:16:43 +01:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications/
|
|
|
|
cp -v sxiv.desktop $out/share/applications/
|
|
|
|
'';
|
|
|
|
|
2013-05-24 10:21:34 +02:00
|
|
|
meta = {
|
|
|
|
description = "Simple X Image Viewer";
|
2017-08-01 22:03:30 +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;
|
2017-07-03 14:16:20 +02:00
|
|
|
maintainers = with maintainers; [ jfrankenau fuuzetsu ];
|
2013-05-24 10:21:34 +02:00
|
|
|
};
|
|
|
|
}
|