ncdu: use zigHook
Also, a cosmetic refactor: - Reorder parameter listing - Use rec-less, overlay-style overridable recursive attributes (in effect since NixOS#119942); - Remove nested with (according to https://nix.dev/recipes/best-practices#with-scopes) - Add `meta.changelog`
This commit is contained in:
@@ -1,32 +1,33 @@
|
||||
{ lib, stdenv, fetchurl, zig, ncurses }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, ncurses
|
||||
, zigHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ncdu";
|
||||
version = "2.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dev.yorhel.nl/download/${pname}-${version}.tar.gz";
|
||||
url = "https://dev.yorhel.nl/download/ncdu-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-kNkgAk51Ixi0aXds5X4Ds8cC1JMprZglruqzbDur+ZM=";
|
||||
};
|
||||
|
||||
XDG_CACHE_HOME="Cache"; # FIXME This should be set in stdenv
|
||||
|
||||
nativeBuildInputs = [
|
||||
zig
|
||||
zigHook
|
||||
];
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
buildInputs = [
|
||||
ncurses
|
||||
];
|
||||
|
||||
PREFIX = placeholder "out";
|
||||
|
||||
# Avoid CPU feature impurity, see https://github.com/NixOS/nixpkgs/issues/169461
|
||||
ZIG_FLAGS = "-Drelease-safe -Dcpu=baseline";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Disk usage analyzer with an ncurses interface";
|
||||
meta = {
|
||||
homepage = "https://dev.yorhel.nl/ncdu";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ pSub rodrgz ];
|
||||
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 (zigHook.meta) platforms;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -33990,7 +33990,9 @@ with pkgs;
|
||||
netcoredbg = callPackage ../development/tools/misc/netcoredbg { };
|
||||
|
||||
ncdu = callPackage ../tools/misc/ncdu {
|
||||
zig = buildPackages.zig_0_10;
|
||||
zigHook = zigHook.override {
|
||||
zig = buildPackages.zig_0_10;
|
||||
};
|
||||
};
|
||||
|
||||
ncdu_1 = callPackage ../tools/misc/ncdu/1.nix { };
|
||||
|
||||
Reference in New Issue
Block a user