disko: init at 1.3.0

This commit is contained in:
Jörg Thalheim 2024-01-07 13:46:27 +01:00
parent 3bd996c1ea
commit 9df8e99f3d

View File

@ -0,0 +1,39 @@
{ stdenvNoCC
, makeWrapper
, lib
, fetchFromGitHub
, bash
, nix
}:
stdenvNoCC.mkDerivation (finalAttrs: {
name = "disko";
version = "1.3.0";
src = fetchFromGitHub {
owner = "nix-community";
repo = "disko";
rev = "v${finalAttrs.version}";
hash = "sha256-wOIJwAsnZhM0NlFRwYJRgO4Lldh8j9viyzwQXtrbNtM=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ];
installPhase = ''
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 ]}
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/disko --help
'';
meta = {
homepage = "https://github.com/nix-community/disko";
description = "Declarative disk partitioning and formatting using nix";
license = lib.licenses.mit;
mainProgram = "disko";
maintainers = with lib.maintainers; [ mic92 lassulus ];
platforms = lib.platforms.linux;
};
})