summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/system
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-12-27 21:24:16 +0100
committerGitHub <noreply@github.com>2022-12-27 21:24:16 +0100
commit988acc39c52dae72ce7740bedc383bb80bcb7ccb (patch)
tree291eb661e6969f5729e42cf2ccfd2a3810a528c0 /pkgs/applications/system
parent6c0b60981c256136e1aa2a719f462d8dadcfa4e9 (diff)
parent4684607935932853e918ad07fa37ec07f13e8d90 (diff)
Merge pull request #203017 from urandom2/booster
Fixes https://github.com/NixOS/nixpkgs/issues/173437
Diffstat (limited to 'pkgs/applications/system')
-rw-r--r--pkgs/applications/system/booster/default.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/applications/system/booster/default.nix b/pkgs/applications/system/booster/default.nix
new file mode 100644
index 000000000000..dda41f24531b
--- /dev/null
+++ b/pkgs/applications/system/booster/default.nix
@@ -0,0 +1,58 @@
+{ bash
+, binutils
+, buildGoModule
+, fetchFromGitHub
+, kbd
+, lib
+, libfido2
+, lvm2
+, lz4
+, makeWrapper
+, mdadm
+, unixtools
+, xz
+, zfs
+}:
+
+buildGoModule rec {
+ pname = "booster";
+ version = "0.9";
+
+ src = fetchFromGitHub {
+ owner = "anatol";
+ repo = pname;
+ rev = version;
+ hash = "sha256-kalVFVBb+ngoUpm+iiIHGS6vBVLEvTVyKuSMSMbp7Qc=";
+ };
+
+ vendorHash = "sha256-GD+nsT4/Y2mTF+ztOC3N560BY5+QSfsPrXZ+dJYtzAw=";
+
+ postPatch = ''
+ substituteInPlace init/main.go --replace "/usr/bin/fsck" "${unixtools.fsck}/bin/fsck"
+ '';
+
+ # integration tests are run against the current kernel
+ doCheck = false;
+
+ nativeBuildInputs = [
+ kbd
+ lz4
+ makeWrapper
+ xz
+ ];
+
+ postInstall = let
+ runtimeInputs = [ bash binutils kbd libfido2 lvm2 mdadm zfs ];
+ in ''
+ wrapProgram $out/bin/generator --prefix PATH : ${lib.makeBinPath runtimeInputs}
+ wrapProgram $out/bin/init --prefix PATH : ${lib.makeBinPath runtimeInputs}
+ '';
+
+ meta = with lib; {
+ description = "Fast and secure initramfs generator ";
+ homepage = "https://github.com/anatol/booster";
+ license = licenses.mit;
+ maintainers = with maintainers; [ urandom ];
+ mainProgram = "init";
+ };
+}