2022-09-11 15:47:08 +00:00
|
|
|
|
{ stdenvNoCC, lib, fetchFromGitHub, makeWrapper, wget }:
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
2022-03-05 16:20:37 +00:00
|
|
|
|
pname = "distrobox";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
version = "1.6.0.1";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "89luca89";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
repo = "distrobox";
|
2023-10-09 19:29:22 +00:00
|
|
|
|
rev = finalAttrs.version;
|
2024-02-07 01:22:34 +00:00
|
|
|
|
hash = "sha256-UWrXpb20IHcwadPpwbhSjvOP1MBXic5ay+nP+OEVQE4=";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
|
|
# https://github.com/89luca89/distrobox/pull/1080
|
|
|
|
|
patches = [ ./always-mount-nix.patch ];
|
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
|
installPhase = ''
|
|
|
|
|
runHook preInstall
|
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
|
# https://github.com/89luca89/distrobox/issues/408
|
|
|
|
|
substituteInPlace ./distrobox-generate-entry \
|
|
|
|
|
--replace 'icon_default="''${HOME}/.local' "icon_default=\"$out"
|
|
|
|
|
./install -P $out
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
|
'';
|
|
|
|
|
|
2022-09-11 15:47:08 +00:00
|
|
|
|
# https://github.com/89luca89/distrobox/issues/407
|
|
|
|
|
postFixup = ''
|
|
|
|
|
wrapProgram "$out/bin/distrobox-generate-entry" \
|
|
|
|
|
--prefix PATH ":" ${lib.makeBinPath [ wget ]}
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
|
|
mkdir -p $out/share/distrobox
|
|
|
|
|
echo 'container_additional_volumes="/nix:/nix"' > $out/share/distrobox/distrobox.conf
|
2022-09-11 15:47:08 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
|
meta = with lib; {
|
|
|
|
|
description = "Wrapper around podman or docker to create and start containers";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
Use any linux distribution inside your terminal. Enable both backward and
|
|
|
|
|
forward compatibility with software and freedom to use whatever distribution
|
|
|
|
|
you’re more comfortable with
|
|
|
|
|
'';
|
2024-02-07 01:22:34 +00:00
|
|
|
|
homepage = "https://distrobox.it/";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
license = licenses.gpl3Only;
|
2023-07-15 17:15:38 +00:00
|
|
|
|
platforms = platforms.linux;
|
2022-03-05 16:20:37 +00:00
|
|
|
|
maintainers = with maintainers; [ atila ];
|
|
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
|
})
|