ncdu: 2.9.2 -> 2.10.0, update source (#537648)
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
autoreconfHook,
|
||||
ncurses,
|
||||
versionCheckHook,
|
||||
}:
|
||||
@@ -11,12 +12,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ncdu";
|
||||
version = "1.22";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dev.yorhel.nl/download/ncdu-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "sha256-CtbAltwE1RIFgRBHYMAbj06X1BkdbJ73llT6PGkaF2s=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "BratishkaErik";
|
||||
repo = "ncdu";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-KcI3sXyD/gt+n8JbSdzdoQYNmjKMPLlIPpZSPAHGb40=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
autoreconfHook
|
||||
];
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
@@ -25,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
meta = {
|
||||
description = "Disk usage analyzer with an ncurses interface";
|
||||
homepage = "https://dev.yorhel.nl/ncdu";
|
||||
homepage = "https://github.com/BratishkaErik/ncdu";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ pSub ];
|
||||
|
||||
@@ -1,27 +1,35 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
ncurses,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
zig_0_15,
|
||||
zig_0_16,
|
||||
nix-update-script,
|
||||
zstd,
|
||||
installShellFiles,
|
||||
versionCheckHook,
|
||||
pie ? stdenv.hostPlatform.isDarwin,
|
||||
}:
|
||||
|
||||
let
|
||||
zig = zig_0_16;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ncdu";
|
||||
version = "2.9.2";
|
||||
version = "2.10.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dev.yorhel.nl/download/ncdu-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-6RE1KBy2ZWnyykwLrCdyRpkeflJSTAyoy6PeXI6Bzsk=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "BratishkaErik";
|
||||
repo = "ncdu";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-YfvuXW0IaRaUNReLe/hMgYA2geDLvt1bprJAbOCFCQk=";
|
||||
};
|
||||
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
zig_0_15
|
||||
zig.hook
|
||||
installShellFiles
|
||||
pkg-config
|
||||
];
|
||||
@@ -31,7 +39,28 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
zstd
|
||||
];
|
||||
|
||||
zigBuildFlags = lib.optional pie "-Dpie=true";
|
||||
deps = zig.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
fetchAll = true;
|
||||
hash = "sha256-vk4wMIpKEQObFXuNd5szQQU6z0NyVJKInOMDiEn4A5k=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
mkdir -p zig-system-dir
|
||||
|
||||
for file in ${finalAttrs.deps}/*; do
|
||||
dir="zig-system-dir/$(basename "$file" .tar.gz)"
|
||||
mkdir -p "$dir"
|
||||
|
||||
tar -xzf "$file" -C "$dir" --strip-components=1
|
||||
done
|
||||
'';
|
||||
|
||||
zigBuildFlags = [
|
||||
"--system"
|
||||
"zig-system-dir"
|
||||
]
|
||||
++ lib.optional pie "-Dpie=true";
|
||||
|
||||
postInstall = ''
|
||||
installManPage ncdu.1
|
||||
@@ -40,12 +69,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
homepage = "https://dev.yorhel.nl/ncdu";
|
||||
homepage = "https://github.com/BratishkaErik/ncdu";
|
||||
description = "Disk usage analyzer with an ncurses interface";
|
||||
changelog = "https://dev.yorhel.nl/ncdu/changes2";
|
||||
changelog = "https://github.com/BratishkaErik/ncdu/releases";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [
|
||||
pSub
|
||||
@@ -53,7 +82,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
defelo
|
||||
ryan4yin
|
||||
];
|
||||
inherit (zig_0_15.meta) platforms;
|
||||
inherit (zig.meta) platforms;
|
||||
mainProgram = "ncdu";
|
||||
};
|
||||
})
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts coreutils gnused nix-update
|
||||
|
||||
version=$(list-git-tags --url=https://g.blicky.net/ncdu.git | tail -1 | sed 's/^v//')
|
||||
nix-update --version="$version" ncdu
|
||||
Reference in New Issue
Block a user