Files
nixpkgs/pkgs/by-name/tp/tparted/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

94 lines
1.8 KiB
Nix

{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
makeWrapper,
parted,
util-linux,
dosfstools,
exfatprogs,
e2fsprogs,
ntfs3g,
btrfs-progs,
xfsprogs,
jfsutils,
f2fs-tools,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "tparted";
version = "2025-01-24";
src = fetchurl {
url = "https://github.com/Kagamma/tparted/releases/download/${finalAttrs.version}/linux_x86-64_tparted_${finalAttrs.version}.tar.gz";
hash = "sha256-7V3bdsP4uqZ5zyw3j/s8fhMYFCyQ1Rz5Z1JiPFc1oFY=";
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
postFixup = ''
wrapProgram $out/bin/tparted \
--prefix PATH : ${
lib.makeBinPath [
parted
util-linux
dosfstools
exfatprogs
e2fsprogs
ntfs3g
btrfs-progs
xfsprogs
jfsutils
f2fs-tools
]
}
'';
runtimeDependencies = [
parted
util-linux
dosfstools
exfatprogs
e2fsprogs
ntfs3g
btrfs-progs
xfsprogs
jfsutils
f2fs-tools
];
unpackPhase = ''
runHook preUnpack
tar xf $src
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp tparted $out/bin/
mkdir -p $out/opt/tparted
cp -r locale $out/opt/tparted/
runHook postInstall
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Text-based user interface (TUI) frontend for parted";
homepage = "https://github.com/Kagamma/tparted";
changelog = "https://github.com/Kagamma/tparted/releases/tag/${finalAttrs.version}";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ liberodark ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
mainProgram = "tparted";
};
})