sxiv: Add support for custom config
This commit is contained in:
parent
01c3847b9c
commit
b424c43465
|
@ -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 ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue