nixpkgs/pkgs/tools/filesystems/zpool-auto-expand-partitions/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

52 lines
1.3 KiB
Nix

{ lib
, rustPlatform
, cloud-utils
, fetchFromGitHub
, pkg-config
, util-linux
, zfs
}:
rustPlatform.buildRustPackage rec {
pname = "zpool-auto-expand-partitions";
version = "0.1.1";
src = fetchFromGitHub {
owner = "DeterminateSystems";
repo = "zpool-auto-expand-partitions";
rev = "v${version}";
hash = "sha256-N1znZbJULEeNR4ABSrUtHHkmz08N+CZqX6Ni7jFzc4c=";
};
cargoLock.lockFile = ./Cargo.lock;
# We rely on a fork of libzfs in order to bump the bindgen version to fix
# builds against LLVM 16.
cargoLock.outputHashes = {
"libzfs-0.6.16" = "sha256-kQunP/xW1Zb1q+TcgAkmZkt1yDnJo9CwF5qldikVN94=";
};
preBuild = ''
substituteInPlace src/grow.rs \
--replace '"growpart"' '"${cloud-utils}/bin/growpart"'
substituteInPlace src/lsblk.rs \
--replace '"lsblk"' '"${util-linux}/bin/lsblk"'
'';
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
util-linux
zfs
];
meta = with lib; {
description = "Tool that aims to expand all partitions in a specified zpool to fill the available space";
homepage = "https://github.com/DeterminateSystems/zpool-auto-expand-partitions";
license = licenses.asl20;
maintainers = teams.determinatesystems.members;
mainProgram = "zpool_part_disks";
};
}