mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-24 13:53:24 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ stdenvNoCC, lib, fetchFromGitHub, makeWrapper, wget }:
|
||
|
||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||
pname = "distrobox";
|
||
version = "1.8.0";
|
||
|
||
src = fetchFromGitHub {
|
||
owner = "89luca89";
|
||
repo = "distrobox";
|
||
rev = finalAttrs.version;
|
||
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
|
||
|
||
./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
|
||
'';
|
||
|
||
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 ];
|
||
};
|
||
})
|