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