Skip to content

Commit

Permalink
sxiv: Add support for custom config
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrankenau committed Jul 3, 2017
1 parent 01c3847 commit b424c43
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkgs/applications/graphics/sxiv/default.nix
@@ -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}";
Expand All @@ -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 ];
};
}

0 comments on commit b424c43

Please sign in to comment.