diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-07-23 21:28:46 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-05 11:10:50 +0000 |
commit | 29b89132fb4fa7a21785478cd5c83fe343b00a01 (patch) | |
tree | 535104875aae468672d53abd19bfc645081a2a55 /pkgs/tools | |
parent | d695b7ef5b3fbd6d56630d58d819d54f1dcc8dfe (diff) | |
download | nixlib-29b89132fb4fa7a21785478cd5c83fe343b00a01.tar nixlib-29b89132fb4fa7a21785478cd5c83fe343b00a01.tar.gz nixlib-29b89132fb4fa7a21785478cd5c83fe343b00a01.tar.bz2 nixlib-29b89132fb4fa7a21785478cd5c83fe343b00a01.tar.lz nixlib-29b89132fb4fa7a21785478cd5c83fe343b00a01.tar.xz nixlib-29b89132fb4fa7a21785478cd5c83fe343b00a01.tar.zst nixlib-29b89132fb4fa7a21785478cd5c83fe343b00a01.zip |
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`
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/misc/ncdu/default.nix | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/pkgs/tools/misc/ncdu/default.nix b/pkgs/tools/misc/ncdu/default.nix index 10a80d32cd28..3cb407756f67 100644 --- a/pkgs/tools/misc/ncdu/default.nix +++ b/pkgs/tools/misc/ncdu/default.nix @@ -1,32 +1,33 @@ -{ lib, stdenv, fetchurl, zig, ncurses }: - -stdenv.mkDerivation rec { +{ lib +, stdenv +, fetchurl +, ncurses +, zigHook +}: + +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 ]; - - PREFIX = placeholder "out"; - - # Avoid CPU feature impurity, see https://github.com/NixOS/nixpkgs/issues/169461 - ZIG_FLAGS = "-Drelease-safe -Dcpu=baseline"; + buildInputs = [ + ncurses + ]; - 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; }; -} +}) |