diff --git a/flake.nix b/flake.nix index f214287..56779e2 100644 --- a/flake.nix +++ b/flake.nix @@ -106,8 +106,19 @@ sentinelone = super.callPackage ./pkgs/sentinelone { }; chronoctl = super.callPackage ./pkgs/chronoctl.nix { }; mrescue-alpine = super.callPackage ./pkgs/mrescue-alpine.nix { }; - mrescue-debian-standard = super.callPackage ./pkgs/mrescue-debian-standard.nix { }; - mrescue-debian-xfce = super.callPackage ./pkgs/mrescue-debian-xfce.nix { }; + + # Debian Live rescue images builder + mkDebianLive = super.callPackage ./pkgs/mrescue-debian.nix { }; + + # Debian Live flavors + mrescue-debian-standard = mkDebianLive { + flavor = "standard"; + hash = "sha256-7is9X5vGfYAe7+3b1WmO+7CzU1hyS37T20Yb4/Xn7NY="; + }; + mrescue-debian-xfce = mkDebianLive { + flavor = "xfce"; + hash = "sha256-xvHLR2gOOdsTIu7FrOZdxgfG6keqniEhhf9ywJmtNXQ="; + }; vanta-agent = super.callPackage ./pkgs/vanta-agent.nix { }; gcloud-wrapped = super.callPackage ./pkgs/gcloud-wrapped { }; go-raceless = super.callPackage ./pkgs/go-raceless { inherit (nicer) ; }; diff --git a/pkgs/mrescue-debian-standard.nix b/pkgs/mrescue-debian-standard.nix deleted file mode 100644 index 5e0b4b7..0000000 --- a/pkgs/mrescue-debian-standard.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - pkgs, - stdenv, - fetchurl, -}: - -stdenv.mkDerivation rec { - pname = "mrescue-debian-standard"; - version = "13.3.0"; - - src = fetchurl { - url = "https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-${version}-amd64-standard.iso"; - hash = "sha256-7is9X5vGfYAe7+3b1WmO+7CzU1hyS37T20Yb4/Xn7NY="; - }; - - nativeBuildInputs = with pkgs; [ - p7zip - ]; - - sourceRoot = "."; - - unpackPhase = '' - runHook preUnpack - mkdir debian-live - 7z x -odebian-live $src >/dev/null - runHook postUnpack - ''; - - buildPhase = '' - runHook preBuild - # No build phase needed - files are extracted directly - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out - install -Dm644 debian-live/live/vmlinuz $out/kernel - install -Dm644 debian-live/live/initrd.img $out/initrd - install -Dm644 debian-live/live/filesystem.squashfs $out/filesystem.squashfs - - runHook postInstall - ''; -} diff --git a/pkgs/mrescue-debian-xfce.nix b/pkgs/mrescue-debian.nix similarity index 83% rename from pkgs/mrescue-debian-xfce.nix rename to pkgs/mrescue-debian.nix index 1d060d2..d740618 100644 --- a/pkgs/mrescue-debian-xfce.nix +++ b/pkgs/mrescue-debian.nix @@ -3,14 +3,18 @@ stdenv, fetchurl, }: +{ + flavor, + hash, +}: stdenv.mkDerivation rec { - pname = "mrescue-debian-xfce"; + pname = "mrescue-debian-${flavor}"; version = "13.3.0"; src = fetchurl { - url = "https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-${version}-amd64-xfce.iso"; - hash = "sha256-xvHLR2gOOdsTIu7FrOZdxgfG6keqniEhhf9ywJmtNXQ="; + url = "https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-${version}-amd64-${flavor}.iso"; + inherit hash; }; nativeBuildInputs = with pkgs; [