From 9df8e99f3db26d188d946cd74daa2fef601846b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 7 Jan 2024 13:46:27 +0100 Subject: [PATCH] disko: init at 1.3.0 --- pkgs/by-name/di/disko/package.nix | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pkgs/by-name/di/disko/package.nix diff --git a/pkgs/by-name/di/disko/package.nix b/pkgs/by-name/di/disko/package.nix new file mode 100644 index 000000000000..0ac7101283eb --- /dev/null +++ b/pkgs/by-name/di/disko/package.nix @@ -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; + }; +})