2023-07-24 00:28:46 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, ncurses
|
2024-04-27 11:05:08 +00:00
|
|
|
, zig
|
2023-08-05 19:30:00 +00:00
|
|
|
, installShellFiles
|
2023-09-18 19:58:14 +00:00
|
|
|
, testers
|
2023-08-17 08:41:27 +00:00
|
|
|
, pie ? stdenv.isDarwin
|
2023-07-24 00:28:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "ncdu";
|
2024-04-27 11:05:08 +00:00
|
|
|
version = "2.4";
|
2012-08-22 07:59:01 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-07-24 00:28:46 +00:00
|
|
|
url = "https://dev.yorhel.nl/download/ncdu-${finalAttrs.version}.tar.gz";
|
2024-04-27 11:05:08 +00:00
|
|
|
hash = "sha256-Sj0AAjCc9qfOp5GTjayb7N7OTVKdDW3I2RtztOaFVQk=";
|
2012-08-22 07:59:01 +00:00
|
|
|
};
|
|
|
|
|
2022-07-21 04:45:49 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-27 11:05:08 +00:00
|
|
|
zig.hook
|
2023-08-05 19:30:00 +00:00
|
|
|
installShellFiles
|
2022-07-21 04:45:49 +00:00
|
|
|
];
|
|
|
|
|
2023-07-24 00:28:46 +00:00
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
|
|
|
];
|
2022-10-21 09:24:12 +00:00
|
|
|
|
2023-08-17 08:41:27 +00:00
|
|
|
zigBuildFlags = lib.optional pie "-Dpie=true";
|
|
|
|
|
2023-08-05 19:30:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage ncdu.1
|
|
|
|
'';
|
|
|
|
|
2023-09-18 19:58:14 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
|
2023-07-24 00:28:46 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://dev.yorhel.nl/ncdu";
|
2023-07-24 00:28:46 +00:00
|
|
|
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 ];
|
2024-04-27 11:05:08 +00:00
|
|
|
inherit (zig.meta) platforms;
|
2023-08-05 19:30:00 +00:00
|
|
|
mainProgram = "ncdu";
|
2012-08-22 07:59:01 +00:00
|
|
|
};
|
2023-07-24 00:28:46 +00:00
|
|
|
})
|