From 69063d79d3aa26ff552018b476f7e4d78490f959 Mon Sep 17 00:00:00 2001 From: linsui Date: Sun, 11 Sep 2022 14:30:32 +0800 Subject: [PATCH] distrobox: 1.3.1 -> 1.4.0 --- .../virtualization/distrobox/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/virtualization/distrobox/default.nix b/pkgs/applications/virtualization/distrobox/default.nix index 9a6bd0a0e3a5..e9409004c8a6 100644 --- a/pkgs/applications/virtualization/distrobox/default.nix +++ b/pkgs/applications/virtualization/distrobox/default.nix @@ -1,28 +1,37 @@ -{ stdenvNoCC, lib, fetchFromGitHub }: +{ stdenvNoCC, lib, fetchFromGitHub, makeWrapper, wget }: stdenvNoCC.mkDerivation rec { pname = "distrobox"; - version = "1.3.1"; + version = "1.4.0"; src = fetchFromGitHub { owner = "89luca89"; repo = pname; rev = version; - sha256 = "sha256-7qPEtWDshe3bHUvbf35k31EnL2sQEXeDmMUGBPkiB9U="; + sha256 = "sha256-XYqPwBiMbwG0bTiFRywZRWjp1OabTHcwhmbcx11SgPo="; }; dontConfigure = true; dontBuild = true; + nativeBuildInputs = [ makeWrapper ]; installPhase = '' runHook preInstall - mkdir -p $out/bin - ./install -p $out/bin + # https://github.com/89luca89/distrobox/issues/408 + substituteInPlace ./distrobox-generate-entry \ + --replace 'icon_default="''${HOME}/.local' "icon_default=\"$out" + ./install -P $out runHook postInstall ''; + # https://github.com/89luca89/distrobox/issues/407 + postFixup = '' + wrapProgram "$out/bin/distrobox-generate-entry" \ + --prefix PATH ":" ${lib.makeBinPath [ wget ]} + ''; + meta = with lib; { description = "Wrapper around podman or docker to create and start containers"; longDescription = ''