3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/graphics/sxiv/default.nix

39 lines
1,017 B
Nix
Raw Normal View History

2018-02-24 10:27:26 +00:00
{ stdenv, fetchFromGitHub, libXft, imlib2, giflib, libexif, conf ? null }:
2017-07-03 13:16:20 +01:00
with stdenv.lib;
2013-05-24 09:21:34 +01:00
2016-01-03 20:36:47 +00:00
stdenv.mkDerivation rec {
name = "sxiv-${version}";
2018-02-24 10:27:26 +00:00
version = "24";
2016-01-03 20:36:47 +00:00
src = fetchFromGitHub {
owner = "muennich";
repo = "sxiv";
rev = "v${version}";
2018-02-24 10:27:26 +00:00
sha256 = "020n1bdxbzqncprh8a4rnjzc4frp335yxbqh5w6dr970f7n5qm8d";
2013-05-24 09:21:34 +01:00
};
postUnpack = ''
substituteInPlace $sourceRoot/Makefile \
--replace /usr/local $out
'';
2013-05-24 09:21:34 +01:00
2017-07-03 13:16:20 +01: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 13:16:20 +01:00
postInstall = ''
mkdir -p $out/share/applications/
cp -v sxiv.desktop $out/share/applications/
'';
2013-05-24 09:21:34 +01:00
meta = {
description = "Simple X Image Viewer";
homepage = https://github.com/muennich/sxiv;
license = stdenv.lib.licenses.gpl2Plus;
2013-05-24 09:21:34 +01:00
platforms = stdenv.lib.platforms.linux;
2017-07-03 13:16:20 +01:00
maintainers = with maintainers; [ jfrankenau fuuzetsu ];
2013-05-24 09:21:34 +01:00
};
}