Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncdu: 1.16 -> 2.0 #152163

Merged
merged 1 commit into from
Apr 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions pkgs/tools/misc/ncdu_2/c-import-order.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/ui.zig b/src/ui.zig
index 8401910..50171a7 100644
--- a/src/ui.zig
+++ b/src/ui.zig
@@ -8,11 +8,11 @@ const main = @import("main.zig");
const util = @import("util.zig");

pub const c = @cImport({
+ @cDefine("_XOPEN_SOURCE", "1");
@cInclude("stdio.h");
@cInclude("string.h");
@cInclude("curses.h");
@cInclude("time.h");
- @cDefine("_X_OPEN_SOURCE", "1");
@cInclude("wchar.h");
@cInclude("locale.h");
});
33 changes: 33 additions & 0 deletions pkgs/tools/misc/ncdu_2/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ lib, stdenv, fetchurl, fetchpatch, zig, ncurses }:

stdenv.mkDerivation rec {
pname = "ncdu";
version = "2.0";

src = fetchurl {
url = "https://dev.yorhel.nl/download/${pname}-${version}.tar.gz";
sha256 = "sha256-Zs2mgEdnsukbeM/cqCX5/a9qCkxuQAYloBrVWVQYR8w=";
};

patches = [
./c-import-order.patch # https://code.blicky.net/yorhel/ncdu/issues/183
];

XDG_CACHE_HOME="Cache"; # FIXME This should be set in stdenv

nativeBuildInputs = [
zig
];

buildInputs = [ ncurses ];

PREFIX = placeholder "out";

meta = with lib; {
description = "Disk usage analyzer with an ncurses interface";
homepage = "https://dev.yorhel.nl/ncdu";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ pSub SuperSandro2000 ];
};
}
1 change: 1 addition & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28170,6 +28170,7 @@ with pkgs;
netcoredbg = callPackage ../development/tools/misc/netcoredbg { };

ncdu = callPackage ../tools/misc/ncdu { };
ncdu_2 = callPackage ../tools/misc/ncdu_2 { };
Atemu marked this conversation as resolved.
Show resolved Hide resolved

ncdc = callPackage ../applications/networking/p2p/ncdc { };

Expand Down