Skip to content

Commit f5871d0

Browse files
committed
ncdu_1: modernize
1 parent 1b71ecc commit f5871d0

File tree

1 file changed

+11
-7
lines changed
  • pkgs/tools/misc/ncdu

1 file changed

+11
-7
lines changed

pkgs/tools/misc/ncdu/1.nix

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@
44
fetchurl,
55
pkg-config,
66
ncurses,
7+
versionCheckHook,
78
}:
89

9-
stdenv.mkDerivation rec {
10+
stdenv.mkDerivation (finalAttrs: {
1011
pname = "ncdu";
1112
version = "1.22";
1213

1314
src = fetchurl {
14-
url = "https://dev.yorhel.nl/download/${pname}-${version}.tar.gz";
15+
url = "https://dev.yorhel.nl/download/ncdu-${finalAttrs.version}.tar.gz";
1516
sha256 = "sha256-CtbAltwE1RIFgRBHYMAbj06X1BkdbJ73llT6PGkaF2s=";
1617
};
1718

1819
nativeBuildInputs = [ pkg-config ];
1920

2021
buildInputs = [ ncurses ];
2122

22-
meta = with lib; {
23+
nativeInstallCheckInputs = [ versionCheckHook ];
24+
doInstallCheck = true;
25+
26+
meta = {
2327
description = "Disk usage analyzer with an ncurses interface";
2428
homepage = "https://dev.yorhel.nl/ncdu";
25-
license = licenses.mit;
26-
platforms = platforms.all;
27-
maintainers = with maintainers; [ pSub ];
29+
license = lib.licenses.mit;
30+
platforms = lib.platforms.all;
31+
maintainers = with lib.maintainers; [ pSub ];
2832
mainProgram = "ncdu";
2933
};
30-
}
34+
})

0 commit comments

Comments
 (0)