2024-10-20 08:32:41 -05:00
|
|
|
|
{
|
|
|
|
|
stdenvNoCC,
|
|
|
|
|
lib,
|
|
|
|
|
fetchFromGitHub,
|
|
|
|
|
makeWrapper,
|
|
|
|
|
wget,
|
|
|
|
|
installShellFiles,
|
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
|
|
|
pname = "distrobox";
|
2024-10-20 08:39:53 -05:00
|
|
|
|
version = "1.8.0";
|
2024-10-20 08:32:41 -05:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "89luca89";
|
|
|
|
|
repo = "distrobox";
|
|
|
|
|
rev = finalAttrs.version;
|
2024-10-20 08:39:53 -05:00
|
|
|
|
hash = "sha256-e9oSTk+UlkrkRSipqjjMqwtxEvEZffVBmlSTmsIT7cU=";
|
2024-10-20 08:32:41 -05:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper installShellFiles];
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
|
|
# https://github.com/89luca89/distrobox/issues/408
|
|
|
|
|
substituteInPlace ./distrobox-generate-entry \
|
2024-10-20 08:39:53 -05:00
|
|
|
|
--replace-fail 'icon_default="''${XDG_DATA_HOME:-''${HOME}/.local/share}' "icon_default=\"$out"
|
2024-10-20 08:32:41 -05:00
|
|
|
|
./install -P $out
|
|
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
# https://github.com/89luca89/distrobox/issues/407
|
|
|
|
|
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
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
|
ls completions/zsh
|
|
|
|
|
installShellCompletion --cmd distrbox --zsh completions/zsh/_distrobox
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
'';
|
|
|
|
|
homepage = "https://distrobox.it/";
|
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
|
platforms = platforms.linux;
|
|
|
|
|
maintainers = with maintainers; [ atila ];
|
|
|
|
|
};
|
|
|
|
|
})
|