2018-02-24 10:27:26 +00:00
|
|
|
{ stdenv, fetchFromGitHub, libXft, imlib2, giflib, libexif, conf ? null }:
|
2017-07-03 12:16:20 +00:00
|
|
|
|
|
|
|
with stdenv.lib;
|
2013-05-24 08:21:34 +00:00
|
|
|
|
2016-01-03 20:36:47 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-01-26 20:49:59 +00:00
|
|
|
pname = "sxiv";
|
|
|
|
version = "25";
|
2017-05-14 12:40:11 +00:00
|
|
|
|
2016-01-03 20:36:47 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "muennich";
|
2019-01-26 20:49:59 +00:00
|
|
|
repo = pname;
|
2017-05-14 12:40:11 +00:00
|
|
|
rev = "v${version}";
|
2019-01-26 20:49:59 +00:00
|
|
|
sha256 = "13s1lfar142hq1j7xld0ri616p4bqs57b17yr4d0b9a9w7liz4hp";
|
2013-05-24 08:21:34 +00:00
|
|
|
};
|
|
|
|
|
2014-11-03 23:01:03 +00:00
|
|
|
postUnpack = ''
|
|
|
|
substituteInPlace $sourceRoot/Makefile \
|
|
|
|
--replace /usr/local $out
|
|
|
|
'';
|
2013-05-24 08:21:34 +00:00
|
|
|
|
2017-07-03 12:16:20 +00:00
|
|
|
configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
|
|
|
|
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
|
|
|
|
|
2018-02-24 10:27:26 +00:00
|
|
|
buildInputs = [ libXft imlib2 giflib libexif ];
|
2017-07-03 12:16:20 +00:00
|
|
|
|
2017-10-30 16:16:43 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/applications/
|
|
|
|
cp -v sxiv.desktop $out/share/applications/
|
|
|
|
'';
|
|
|
|
|
2013-05-24 08:21:34 +00:00
|
|
|
meta = {
|
|
|
|
description = "Simple X Image Viewer";
|
2017-08-01 20:03:30 +00:00
|
|
|
homepage = https://github.com/muennich/sxiv;
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2013-05-24 08:21:34 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2017-07-03 12:16:20 +00:00
|
|
|
maintainers = with maintainers; [ jfrankenau fuuzetsu ];
|
2013-05-24 08:21:34 +00:00
|
|
|
};
|
|
|
|
}
|