Merge pull request #279363 from Mic92/disko

disko: init at 1.3.0
This commit is contained in:
Jörg Thalheim 2024-01-08 14:55:36 +01:00 committed by GitHub
commit 702762fa41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;
};
})