nixpkgs/pkgs/tools/misc/ncdu/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
989 B
Nix
Raw Normal View History

{ lib
, stdenv
, fetchurl
, ncurses
, zig_0_11
, installShellFiles
2023-09-18 19:58:14 +00:00
, testers
, pie ? stdenv.isDarwin
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ncdu";
version = "2.3";
src = fetchurl {
url = "https://dev.yorhel.nl/download/ncdu-${finalAttrs.version}.tar.gz";
hash = "sha256-u84dHHDxJHZxvk6iE12MUs0ppwivXtYs7Np9xqgACjw=";
};
2022-07-21 04:45:49 +00:00
nativeBuildInputs = [
zig_0_11.hook
installShellFiles
2022-07-21 04:45:49 +00:00
];
buildInputs = [
ncurses
];
2022-10-21 09:24:12 +00:00
zigBuildFlags = lib.optional pie "-Dpie=true";
postInstall = ''
installManPage ncdu.1
'';
2023-09-18 19:58:14 +00:00
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};
meta = {
homepage = "https://dev.yorhel.nl/ncdu";
description = "Disk usage analyzer with an ncurses interface";
changelog = "https://dev.yorhel.nl/ncdu/changes2";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pSub rodrgz ];
inherit (zig_0_11.meta) platforms;
mainProgram = "ncdu";
};
})