13 stdenvNoCC.mkDerivation (finalAttrs: {
16 src = fetchFromGitHub {
17 owner = "nix-community";
19 rev = "v${finalAttrs.version}";
20 hash = "sha256-CI27qHAbc3/tIe8sb37kiHNaeCqGxNimckCMj0lW5kg=";
22 nativeBuildInputs = [ makeWrapper ];
23 buildInputs = [ bash ];
26 mkdir -p $out/bin $out/share/disko
27 cp -r install-cli.nix cli.nix default.nix disk-deactivate lib $out/share/disko
29 for i in disko disko-install; do
30 sed -e "s|libexec_dir=\".*\"|libexec_dir=\"$out/share/disko\"|" "$i" > "$out/bin/$i"
31 chmod 755 "$out/bin/$i"
32 wrapProgram "$out/bin/$i" \
33 --set DISKO_VERSION "${finalAttrs.version}" \
44 doInstallCheck = true;
45 installCheckPhase = ''
46 runHook preInstallCheck
48 $out/bin/disko-install --help
49 runHook postInstallCheck
52 passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
55 homepage = "https://github.com/nix-community/disko";
56 description = "Declarative disk partitioning and formatting using nix";
57 license = lib.licenses.mit;
58 mainProgram = "disko";
59 maintainers = with lib.maintainers; [
64 platforms = lib.platforms.linux;