Merge pull request #27090 from jfrankenau/config-sxiv

sxiv: Add support for custom config
This commit is contained in:
Mateusz Kowalczyk 2017-07-03 23:35:53 +01:00 committed by GitHub
commit c31d21c9b1

View File

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, libX11, imlib2, giflib, libexif }:
{ stdenv, fetchFromGitHub, libX11, imlib2, giflib, libexif, conf ? null }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "sxiv-${version}";
@ -16,12 +18,16 @@ stdenv.mkDerivation rec {
--replace /usr/local $out
'';
configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
buildInputs = [ libX11 imlib2 giflib libexif ];
meta = {
description = "Simple X Image Viewer";
homepage = "https://github.com/muennich/sxiv";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
maintainers = with maintainers; [ jfrankenau fuuzetsu ];
};
}