about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRick van Schijndel <Mindavi@users.noreply.github.com>2024-01-29 21:52:26 +0100
committerGitHub <noreply@github.com>2024-01-29 21:52:26 +0100
commitc76b5f12ac4c26fa57fbf0340d0fc662f2d05184 (patch)
tree48e9c677dfdcc332a53bc13b78b9b5063b34f5bf /pkgs
parent7afa3f21a523c505a2f4178c17b9dcf0ae423a90 (diff)
parent3755aefcb91129fcab9608f2864d2b77781ce685 (diff)
Merge pull request #268800 from pongo1231/distrobox-1.6.0
distrobox: 1.5.0.2 -> 1.6.0.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/virtualization/distrobox/always-mount-nix.patch137
-rw-r--r--pkgs/applications/virtualization/distrobox/default.nix15
2 files changed, 148 insertions, 4 deletions
diff --git a/pkgs/applications/virtualization/distrobox/always-mount-nix.patch b/pkgs/applications/virtualization/distrobox/always-mount-nix.patch
new file mode 100644
index 0000000000000..c5df13294e920
--- /dev/null
+++ b/pkgs/applications/virtualization/distrobox/always-mount-nix.patch
@@ -0,0 +1,137 @@
+diff --git a/distrobox-create b/distrobox-create
+index 64e9911..136659d 100755
+--- a/distrobox-create
++++ b/distrobox-create
+@@ -74,6 +74,10 @@ unshare_ipc=0
+ unshare_netns=0
+ unshare_process=0
+ unshare_devsys=0
++
++self_dir="$(dirname "$(realpath "$0")")"
++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")"
++
+ # Use cd + dirname + pwd so that we do not have relative paths in mount points
+ # We're not using "realpath" here so that symlinks are not resolved this way
+ # "realpath" would break situations like Nix or similar symlink based package
+@@ -98,6 +102,7 @@ version="1.6.0.1"
+ # priority over system defaults
+ # leave priority to environment variables.
+ config_files="
++	$nix_config_file
+ 	/usr/share/distrobox/distrobox.conf
+ 	/usr/share/defaults/distrobox/distrobox.conf
+ 	/usr/etc/distrobox/distrobox.conf
+diff --git a/distrobox-enter b/distrobox-enter
+index 6d8998a..bb05437 100755
+--- a/distrobox-enter
++++ b/distrobox-enter
+@@ -75,10 +75,14 @@ skip_workdir=0
+ verbose=0
+ version="1.6.0.1"
+ 
++self_dir="$(dirname "$(realpath "$0")")"
++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")"
++
+ # Source configuration files, this is done in an hierarchy so local files have
+ # priority over system defaults
+ # leave priority to environment variables.
+ config_files="
++	$nix_config_file
+ 	/usr/share/distrobox/distrobox.conf
+ 	/usr/share/defaults/distrobox/distrobox.conf
+ 	/usr/etc/distrobox/distrobox.conf
+diff --git a/distrobox-generate-entry b/distrobox-generate-entry
+index 3243691..6a7910a 100755
+--- a/distrobox-generate-entry
++++ b/distrobox-generate-entry
+@@ -45,10 +45,14 @@ icon_default="${HOME}/.local/share/icons/terminal-distrobox-icon.svg"
+ verbose=0
+ version="1.6.0.1"
+ 
++self_dir="$(dirname "$(realpath "$0")")"
++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")"
++
+ # Source configuration files, this is done in an hierarchy so local files have
+ # priority over system defaults
+ # leave priority to environment variables.
+ config_files="
++	$nix_config_file
+ 	/usr/share/distrobox/distrobox.conf
+ 	/usr/share/defaults/distrobox/distrobox.conf
+ 	/usr/etc/distrobox/distrobox.conf
+diff --git a/distrobox-list b/distrobox-list
+index aaec85e..235e529 100755
+--- a/distrobox-list
++++ b/distrobox-list
+@@ -44,10 +44,14 @@ verbose=0
+ version="1.6.0.1"
+ container_manager="autodetect"
+ 
++self_dir="$(dirname "$(realpath "$0")")"
++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")"
++
+ # Source configuration files, this is done in an hierarchy so local files have
+ # priority over system defaults
+ # leave priority to environment variables.
+ config_files="
++	$nix_config_file
+ 	/usr/share/distrobox/distrobox.conf
+ 	/usr/share/defaults/distrobox/distrobox.conf
+ 	/usr/etc/distrobox/distrobox.conf
+diff --git a/distrobox-rm b/distrobox-rm
+index 702c1dd..2e37538 100755
+--- a/distrobox-rm
++++ b/distrobox-rm
+@@ -54,10 +54,14 @@ rm_home=0
+ response_rm_home="N"
+ version="1.6.0.1"
+ 
++self_dir="$(dirname "$(realpath "$0")")"
++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")"
++
+ # Source configuration files, this is done in an hierarchy so local files have
+ # priority over system defaults
+ # leave priority to environment variables.
+ config_files="
++	$nix_config_file
+ 	/usr/share/distrobox/distrobox.conf
+ 	/usr/share/defaults/distrobox/distrobox.conf
+ 	/usr/etc/distrobox/distrobox.conf
+diff --git a/distrobox-stop b/distrobox-stop
+index fd17cc1..e0dbc8f 100755
+--- a/distrobox-stop
++++ b/distrobox-stop
+@@ -52,10 +52,14 @@ non_interactive=0
+ verbose=0
+ version="1.6.0.1"
+ 
++self_dir="$(dirname "$(realpath "$0")")"
++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")"
++
+ # Source configuration files, this is done in an hierarchy so local files have
+ # priority over system defaults
+ # leave priority to environment variables.
+ config_files="
++	$nix_config_file
+ 	/usr/share/distrobox/distrobox.conf
+ 	/usr/share/defaults/distrobox/distrobox.conf
+ 	/usr/etc/distrobox/distrobox.conf
+diff --git a/distrobox-upgrade b/distrobox-upgrade
+index ab5e96f..dc8d295 100755
+--- a/distrobox-upgrade
++++ b/distrobox-upgrade
+@@ -39,10 +39,14 @@ rootful=0
+ verbose=0
+ version="1.6.0.1"
+ 
++self_dir="$(dirname "$(realpath "$0")")"
++nix_config_file="$(realpath "${self_dir}/../share/distrobox/distrobox.conf")"
++
+ # Source configuration files, this is done in an hierarchy so local files have
+ # priority over system defaults
+ # leave priority to environment variables.
+ config_files="
++	$nix_config_file
+ 	/usr/share/distrobox/distrobox.conf
+ 	/usr/share/defaults/distrobox/distrobox.conf
+ 	/usr/etc/distrobox/distrobox.conf
diff --git a/pkgs/applications/virtualization/distrobox/default.nix b/pkgs/applications/virtualization/distrobox/default.nix
index 163910237a37e..912117a016edc 100644
--- a/pkgs/applications/virtualization/distrobox/default.nix
+++ b/pkgs/applications/virtualization/distrobox/default.nix
@@ -2,19 +2,23 @@
 
 stdenvNoCC.mkDerivation (finalAttrs: {
   pname = "distrobox";
-  version = "1.5.0.2";
+  version = "1.6.0.1";
 
   src = fetchFromGitHub {
     owner = "89luca89";
-    repo = finalAttrs.pname;
+    repo = "distrobox";
     rev = finalAttrs.version;
-    hash = "sha256-ss8049D6n1V/gDzEMjywDnoke5s2we9j3mO8yta72UA=";
+    hash = "sha256-UWrXpb20IHcwadPpwbhSjvOP1MBXic5ay+nP+OEVQE4=";
   };
 
   dontConfigure = true;
   dontBuild = true;
 
   nativeBuildInputs = [ makeWrapper ];
+
+  # https://github.com/89luca89/distrobox/pull/1080
+  patches = [ ./always-mount-nix.patch ];
+
   installPhase = ''
     runHook preInstall
 
@@ -30,6 +34,9 @@ stdenvNoCC.mkDerivation (finalAttrs: {
   postFixup = ''
     wrapProgram "$out/bin/distrobox-generate-entry" \
       --prefix PATH ":" ${lib.makeBinPath [ wget ]}
+
+    mkdir -p $out/share/distrobox
+    echo 'container_additional_volumes="/nix:/nix"' > $out/share/distrobox/distrobox.conf
   '';
 
   meta = with lib; {
@@ -39,7 +46,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
       forward compatibility with software and freedom to use whatever distribution
       you’re more comfortable with
     '';
-    homepage = "https://distrobox.privatedns.org/";
+    homepage = "https://distrobox.it/";
     license = licenses.gpl3Only;
     platforms = platforms.linux;
     maintainers = with maintainers; [ atila ];