-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152163 from Atemu/update/ncdu
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters