depot/third_party/nixpkgs/pkgs/tools/misc/ncdu/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

48 lines
974 B
Nix

{ lib
, stdenv
, fetchurl
, ncurses
, zig
, installShellFiles
, testers
, pie ? stdenv.isDarwin
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ncdu";
version = "2.5";
src = fetchurl {
url = "https://dev.yorhel.nl/download/ncdu-${finalAttrs.version}.tar.gz";
hash = "sha256-f0neJQJKurGvH/IrO4VCwNFY4Bj+DpYHT9lLDh5tMaU=";
};
nativeBuildInputs = [
zig.hook
installShellFiles
];
buildInputs = [
ncurses
];
zigBuildFlags = lib.optional pie "-Dpie=true";
postInstall = ''
installManPage ncdu.1
'';
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.meta) platforms;
mainProgram = "ncdu";
};
})