2024-06-05 15:53:02 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "thin-provisioning-tools";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.0.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jthornber";
|
|
|
|
repo = "thin-provisioning-tools";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-wliyTWo3iOonqf4UW50V5co0RQlc75VwLofF9FHV2LI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"rio-0.9.4" = "sha256-2l5cm7YLZyf2kuRPMytu7Fdewi6x3+9KyyQBv2F8ZDA=";
|
|
|
|
};
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests.lvm2) lvm-thinpool-linux-latest;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
# Uses O_DIRECT, which is not supported on all filesystems.
|
|
|
|
# https://github.com/jthornber/thin-provisioning-tools/issues/38
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/jthornber/thin-provisioning-tools/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Suite of tools for manipulating the metadata of the dm-thin device-mapper target";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|