mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-21 21:23:06 +00:00
0af69c7c52
Fix broken darwin compilation. The issue started after the 2.2.2 ->
2.3 update (0b6d395909
).
`ncdu` defaults pie to false while `zig` requires it to be true for
darwin.
44 lines
885 B
Nix
44 lines
885 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, ncurses
|
|
, zig_0_11
|
|
, installShellFiles
|
|
, pie ? stdenv.isDarwin
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "ncdu";
|
|
version = "2.3";
|
|
|
|
src = fetchurl {
|
|
url = "https://dev.yorhel.nl/download/ncdu-${finalAttrs.version}.tar.gz";
|
|
hash = "sha256-u84dHHDxJHZxvk6iE12MUs0ppwivXtYs7Np9xqgACjw=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
zig_0_11.hook
|
|
installShellFiles
|
|
];
|
|
|
|
buildInputs = [
|
|
ncurses
|
|
];
|
|
|
|
zigBuildFlags = lib.optional pie "-Dpie=true";
|
|
|
|
postInstall = ''
|
|
installManPage ncdu.1
|
|
'';
|
|
|
|
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_0_11.meta) platforms;
|
|
mainProgram = "ncdu";
|
|
};
|
|
})
|