14 , thin-provisioning-tools
21 , clevisSupport ? false
25 stdenv.mkDerivation rec {
29 src = fetchFromGitHub {
30 owner = "stratis-storage";
33 hash = "sha256-6CCSs359gPwUMQ2SFpxaWHXCjqqgIbvCaPL2zLuYRKg=";
36 cargoDeps = rustPlatform.fetchCargoTarball {
38 hash = "sha256-9nE/SFGv1tYyGDdemCahxHlRnLms3eK0r4XQMhQBjSQ=";
42 substituteInPlace udev/61-stratisd.rules \
43 --replace stratis-base32-decode "$out/lib/udev/stratis-base32-decode" \
44 --replace stratis-str-cmp "$out/lib/udev/stratis-str-cmp"
46 substituteInPlace systemd/stratis-fstab-setup \
47 --replace stratis-min "$out/bin/stratis-min" \
48 --replace systemd-ask-password "${systemd}/bin/systemd-ask-password" \
49 --replace sleep "${coreutils}/bin/sleep" \
50 --replace udevadm "${udev}/bin/udevadm"
53 nativeBuildInputs = with rustPlatform; [
70 EXECUTABLES_PATHS = lib.makeBinPath ([
72 thin-provisioning-tools
74 ] ++ lib.optionals clevisSupport [
84 makeFlags = [ "PREFIX=${placeholder "out"}" "INSTALL=install" ];
85 buildFlags = [ "build" "build-min" "docs/stratisd.8" ];
90 # remove files for supporting dracut
92 rm -r "$out/lib/dracut"
93 rm -r "$out/lib/systemd/system-generators"
96 passthru.tests = nixosTests.stratis;
99 description = "Easy to use local storage management for Linux";
100 homepage = "https://stratis-storage.github.io";
101 license = licenses.mpl20;
102 maintainers = with maintainers; [ nickcao ];
103 platforms = [ "x86_64-linux" ];