git.iko.soy/typeable/nixpkgs
on master help sign in
sxiv: Add support for custom config
commitb424c4346568701789b70604b40c389c9d535b1d authorJohannes Frankenau <johannes@frankenau.net> dateMon 3 Jul 2017, 14:16 (9 years ago) parent01c3847
1 file changed+8−2
pkgs/applications/graphics/sxiv/default.nix+8−2
pkgs/applications/graphics/sxiv/default.nix+8−2
@@ -1,4 +1,6 @@
1−{ stdenv, fetchFromGitHub, libX11, imlib2, giflib, libexif }:
1+{ stdenv, fetchFromGitHub, libX11, imlib2, giflib, libexif, conf ? null }:
2+
3+with stdenv.lib;
24
35stdenv.mkDerivation rec {
46 name = "sxiv-${version}";
@@ -16,12 +18,16 @@ stdenv.mkDerivation rec {
1618 --replace /usr/local $out
1719 '';
1820
21+ configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
22+ preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
23+
1924 buildInputs = [ libX11 imlib2 giflib libexif ];
25+
2026 meta = {
2127 description = "Simple X Image Viewer";
2228 homepage = "https://github.com/muennich/sxiv";
2329 license = stdenv.lib.licenses.gpl2Plus;
2430 platforms = stdenv.lib.platforms.linux;
25− maintainers = with stdenv.lib.maintainers; [ fuuzetsu ];
31+ maintainers = with maintainers; [ jfrankenau fuuzetsu ];
2632 };
2733}