Merge pull request #293740 from Mic92/disko

disko: 1.3.0 -> 1.4.0
This commit is contained in:
Jörg Thalheim 2024-03-06 16:59:45 +01:00 committed by GitHub
commit 6077b9c13d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,29 +4,38 @@
, fetchFromGitHub
, bash
, nix
, coreutils
}:
stdenvNoCC.mkDerivation (finalAttrs: {
name = "disko";
version = "1.3.0";
version = "1.4.0";
src = fetchFromGitHub {
owner = "nix-community";
repo = "disko";
rev = "v${finalAttrs.version}";
hash = "sha256-wOIJwAsnZhM0NlFRwYJRgO4Lldh8j9viyzwQXtrbNtM=";
hash = "sha256-71S/64RbyADT6FUVJq4WLiNbmcxFvgMsSihf/C2Hgno=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/disko
cp -r cli.nix default.nix disk-deactivate lib $out/share/disko
sed -e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" disko > $out/bin/disko
chmod 755 $out/bin/disko
wrapProgram $out/bin/disko --prefix PATH : ${lib.makeBinPath [ nix ]}
cp -r install-cli.nix cli.nix default.nix disk-deactivate lib $out/share/disko
for i in disko disko-install; do
sed -e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" "$i" > "$out/bin/$i"
chmod 755 "$out/bin/$i"
wrapProgram "$out/bin/$i" --prefix PATH : ${lib.makeBinPath [ nix coreutils ]}
done
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/disko --help
$out/bin/disko-install --help
runHook postInstallCheck
'';
meta = {
homepage = "https://github.com/nix-community/disko";