1 { lib, stdenv, fetchgit, ncurses, conf ? null }:
3 stdenv.mkDerivation rec {
8 url = "git://git.2f30.org/noice.git";
9 rev = "refs/tags/v${version}";
10 sha256 = "0975j4m93s9a21pazwdzn4gqhkngwq7q6ghp0q8a75r6c4fb7aar";
14 # Add support for ncurses-6.3. Can be dropped with 0.9 release.
15 # Fixed upstream at: https://git.2f30.org/noice/commit/53c35e6b340b7c135038e00057a198f03cb7d7cf.html
16 substituteInPlace noice.c --replace 'printw(str);' 'printw("%s", str);'
19 configFile = lib.optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
20 preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.def.h";
22 buildInputs = [ ncurses ];
24 buildFlags = [ "LDLIBS=-lncurses" ];
26 installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
29 description = "Small ncurses-based file browser";
30 homepage = "https://git.2f30.org/noice/";
31 license = licenses.bsd2;
32 platforms = platforms.all;
33 maintainers = with maintainers; [ iogamaster ];
34 mainProgram = "noice";