mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 20:00:10 +00:00
disktree: init at 0.10.1 (#566832)
This commit is contained in:
85
pkgs/by-name/di/disktree/package.nix
Normal file
85
pkgs/by-name/di/disktree/package.nix
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
desktop-file-utils,
|
||||
makeBinaryWrapper,
|
||||
fontconfig,
|
||||
freetype,
|
||||
libGL,
|
||||
libxcb,
|
||||
libxkbcommon,
|
||||
openssl,
|
||||
vulkan-loader,
|
||||
wayland,
|
||||
gitMinimal,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "disktree";
|
||||
version = "0.10.1";
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tobi";
|
||||
repo = "disktree";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-HoJjSLQeLEK20SpEd40DakAwV6WTdtcWM779YCjI3Jk=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-+IG75eHRo1+4Sg5dq+b77UWYLKQlqPH30WtAnND/Cbk=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
desktop-file-utils
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
fontconfig
|
||||
freetype
|
||||
libGL
|
||||
libxcb
|
||||
libxkbcommon
|
||||
openssl
|
||||
vulkan-loader
|
||||
wayland
|
||||
];
|
||||
|
||||
cargoBuildFlags = [ "--package=disktree-app" ];
|
||||
cargoTestFlags = [ "--package=disktree-core" ];
|
||||
|
||||
postInstall = ''
|
||||
install -Dm644 assets/disktree.svg \
|
||||
"$out/share/icons/hicolor/scalable/apps/disktree.svg"
|
||||
install -d "$out/share/applications"
|
||||
substitute packaging/disktree.desktop.in \
|
||||
"$out/share/applications/disktree.desktop" \
|
||||
--replace-fail '@BINDIR@' "$out/bin" \
|
||||
--replace-fail '@VERSION@' '${finalAttrs.version}'
|
||||
desktop-file-validate "$out/share/applications/disktree.desktop"
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
patchelf "$out/bin/disktree" --add-rpath ${
|
||||
lib.makeLibraryPath [
|
||||
libGL
|
||||
vulkan-loader
|
||||
wayland
|
||||
]
|
||||
}
|
||||
wrapProgram "$out/bin/disktree" \
|
||||
--prefix PATH : ${lib.makeBinPath [ gitMinimal ]}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Disk usage treemap for finding and removing files";
|
||||
homepage = "https://github.com/tobi/disktree";
|
||||
changelog = "https://github.com/tobi/disktree/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ domenkozar ];
|
||||
mainProgram = "disktree";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user