diff --git a/pkgs/by-name/di/disko/package.nix b/pkgs/by-name/di/disko/package.nix index f7553a70fc27..0883a9bc46b0 100644 --- a/pkgs/by-name/di/disko/package.nix +++ b/pkgs/by-name/di/disko/package.nix @@ -6,16 +6,17 @@ , nix , nixos-install , coreutils +, testers }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "disko"; - version = "1.8.0"; + version = "1.8.2"; src = fetchFromGitHub { owner = "nix-community"; repo = "disko"; rev = "v${finalAttrs.version}"; - hash = "sha256-5zShvCy9S4tuISFjNSjb+TWpPtORqPbRZ0XwbLbPLho="; + hash = "sha256-O0QVhsj9I/hmcIqJ4qCqFyzvjYL+dtzJP0C5MFd8O/Y="; }; nativeBuildInputs = [ makeWrapper ]; buildInputs = [ bash ]; @@ -27,7 +28,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { 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 nixos-install ]} + wrapProgram "$out/bin/$i" \ + --set DISKO_VERSION "${finalAttrs.version}" \ + --prefix PATH : ${lib.makeBinPath [ nix coreutils nixos-install ]} done runHook postInstall ''; @@ -38,6 +41,9 @@ stdenvNoCC.mkDerivation (finalAttrs: { $out/bin/disko-install --help runHook postInstallCheck ''; + + passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; + meta = { homepage = "https://github.com/nix-community/disko"; description = "Declarative disk partitioning and formatting using nix";