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
77 lines
2.2 KiB
Nix
77 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
pkg-config,
|
|
udev,
|
|
lvm2,
|
|
fetchFromGitHub,
|
|
nixosTests,
|
|
}:
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "thin-provisioning-tools";
|
|
version = "1.2.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jthornber";
|
|
repo = "thin-provisioning-tools";
|
|
rev = "v${version}";
|
|
hash = "sha256-JnibI3txqPXwEemLtgtfe6NAZrOX09p0w4sp9/HEXBQ=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
depsBuildBuild = [
|
|
pkg-config
|
|
lvm2
|
|
udev
|
|
];
|
|
nativeBuildInputs = [
|
|
rustPlatform.bindgenHook
|
|
];
|
|
buildInputs = [
|
|
lvm2
|
|
udev
|
|
];
|
|
|
|
cargoHash = "sha256-1spipVIT49G0l6yLyv3/7jsR2xyJQPjtB5vouyAjpgA=";
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests.lvm2) lvm-thinpool-linux-latest;
|
|
};
|
|
|
|
# Uses O_DIRECT, which is not supported on all filesystems.
|
|
# https://github.com/jthornber/thin-provisioning-tools/issues/38
|
|
doCheck = false;
|
|
|
|
# required for config compatibility with configs done pre 0.9.0
|
|
# see https://github.com/NixOS/nixpkgs/issues/317018
|
|
postInstall = ''
|
|
ln -s $out/bin/pdata_tools $out/bin/cache_check
|
|
ln -s $out/bin/pdata_tools $out/bin/cache_dump
|
|
ln -s $out/bin/pdata_tools $out/bin/cache_metadata_size
|
|
ln -s $out/bin/pdata_tools $out/bin/cache_repair
|
|
ln -s $out/bin/pdata_tools $out/bin/cache_restore
|
|
ln -s $out/bin/pdata_tools $out/bin/cache_writeback
|
|
ln -s $out/bin/pdata_tools $out/bin/era_check
|
|
ln -s $out/bin/pdata_tools $out/bin/era_dump
|
|
ln -s $out/bin/pdata_tools $out/bin/era_invalidate
|
|
ln -s $out/bin/pdata_tools $out/bin/era_restore
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_check
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_delta
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_dump
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_ls
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_metadata_size
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_repair
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_restore
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_rmap
|
|
ln -s $out/bin/pdata_tools $out/bin/thin_trim
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/jthornber/thin-provisioning-tools/";
|
|
description = "Suite of tools for manipulating the metadata of the dm-thin device-mapper target";
|
|
license = licenses.gpl3;
|
|
platforms = platforms.unix;
|
|
maintainers = [ ];
|
|
};
|
|
}
|