mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
37 lines
1.1 KiB
Nix
37 lines
1.1 KiB
Nix
{ lib, stdenv, fetchgit, ncurses, conf ? null }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "noice";
|
|
version = "0.8";
|
|
|
|
src = fetchgit {
|
|
url = "git://git.2f30.org/noice.git";
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "0975j4m93s9a21pazwdzn4gqhkngwq7q6ghp0q8a75r6c4fb7aar";
|
|
};
|
|
|
|
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);'
|
|
'';
|
|
|
|
configFile = lib.optionalString (conf!=null) (builtins.toFile "config.def.h" conf);
|
|
preBuild = lib.optionalString (conf!=null) "cp ${configFile} config.def.h";
|
|
|
|
buildInputs = [ ncurses ];
|
|
|
|
buildFlags = [ "LDLIBS=-lncurses" ];
|
|
|
|
installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
|
|
|
|
meta = with lib; {
|
|
description = "Small ncurses-based file browser";
|
|
homepage = "https://git.2f30.org/noice/";
|
|
license = licenses.bsd2;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ iogamaster ];
|
|
mainProgram = "noice";
|
|
};
|
|
}
|