Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distrobox: 1.7.2.1 -> 1.8.0 #351291

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions pkgs/applications/virtualization/distrobox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "distrobox";
version = "1.7.2.1";
version = "1.8.0";

src = fetchFromGitHub {
owner = "89luca89";
repo = "distrobox";
rev = finalAttrs.version;
hash = "sha256-H2jeKs0h4ZAcP33HB5jptlubq62cwnjPK2wSlEIfFWA=";
hash = "sha256-e9oSTk+UlkrkRSipqjjMqwtxEvEZffVBmlSTmsIT7cU=";
};

dontConfigure = true;
dontBuild = true;

nativeBuildInputs = [ makeWrapper ];

patches = [
# https://github.com/89luca89/distrobox/issues/408
./relative-default-icon.patch
];

installPhase = ''
runHook preInstall

# https://github.com/89luca89/distrobox/issues/408
substituteInPlace ./distrobox-generate-entry \
--replace-fail 'icon_default="''${HOME}/.local' "icon_default=\"$out"
./install -P $out

runHook postInstall
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/distrobox-generate-entry b/distrobox-generate-entry
index 65fcea0..8d57e4e 100755
--- a/distrobox-generate-entry
+++ b/distrobox-generate-entry
@@ -51,7 +51,7 @@ container_manager="autodetect"
container_name_default="my-distrobox"
delete=0
icon="auto"
-icon_default="${XDG_DATA_HOME:-${HOME}/.local/share}/icons/terminal-distrobox-icon.svg"
+icon_default="terminal-distrobox-icon"
verbose=0
online=0
version="1.8.0"
@@ -335,12 +335,6 @@ if [ "${icon}" = "auto" ]; then

icon_url="$(echo "${DISTRO_ICON_MAP}" | grep "${container_distro}:" | cut -d':' -f2-)"

- # Distro not found in our map, fallback to generic icon
- if [ -z "${icon_url}" ]; then
- icon_url="https://raw.githubusercontent.com/89luca89/distrobox/main/icons/terminal-distrobox-icon.svg"
- container_distro="terminal-distrobox-icon"
- fi
-
if [ -n "${icon_url}" ] && [ "${download}" != "null" ]; then
icon_extension="${icon_url##*.}"