2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchgit, ncurses, conf ? null }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "noice";
|
|
|
|
version = "0.8";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.2f30.org/noice.git";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "0975j4m93s9a21pazwdzn4gqhkngwq7q6ghp0q8a75r6c4fb7aar";
|
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
# Add support for ncurses-6.3. Can be dropped with 0.9 release.
|
|
|
|
# Fixed upstream at: https://git.2f30.org/noice/commit/53c35e6b340b7c135038e00057a198f03cb7d7cf.html
|
|
|
|
substituteInPlace noice.c --replace 'printw(str);' 'printw("%s", str);'
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configFile = optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
|
|
|
|
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
|
|
|
|
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
|
|
|
|
buildFlags = [ "LDLIBS=-lncurses" ];
|
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Small ncurses-based file browser";
|
|
|
|
homepage = "https://git.2f30.org/noice/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.all;
|
2024-01-02 11:29:13 +00:00
|
|
|
maintainers = with maintainers; [ iogamaster ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "noice";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|