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-05-15 15:35:15 +00:00
|
|
|
|
version = "1.7.2.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-05-15 15:35:15 +00:00
|
|
|
|
hash = "sha256-H2jeKs0h4ZAcP33HB5jptlubq62cwnjPK2wSlEIfFWA=";
|
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
|
|
|
|
|
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 \
|
2024-05-15 15:35:15 +00:00
|
|
|
|
--replace-fail 'icon_default="''${HOME}/.local' "icon_default=\"$out"
|
2022-09-11 15:47:08 +00:00
|
|
|
|
./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
|
|
|
|
})
|