Files
nixpkgs/pkgs/by-name/bo/boxbuddy/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

63 lines
1.4 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
wrapGAppsHook4,
libadwaita,
distrobox,
}:
rustPlatform.buildRustPackage rec {
pname = "boxbuddy";
version = "2.5.3";
src = fetchFromGitHub {
owner = "Dvlv";
repo = "BoxBuddyRS";
tag = version;
hash = "sha256-9BGgm4yRjCarJIGP/G9gPj/qsYWb96XGJmpgLj3XCdM=";
};
cargoHash = "sha256-2ipLO2b/mEEwSl0PSCq6m9tBhhaiDj9mXXVO4pr/78c=";
# The software assumes it is installed either in flatpak or in the home directory
# so the xdg data path needs to be patched here
postPatch = ''
substituteInPlace src/utils.rs \
--replace-fail '{data_home}/locale' "$out/share/locale" \
--replace-fail '{data_home}/icons/boxbuddy/{icon}' "$out/share/icons/boxbuddy/{icon}"
'';
nativeBuildInputs = [
pkg-config
wrapGAppsHook4
];
buildInputs = [
libadwaita
];
postInstall = ''
cp icons/* ./
XDG_DATA_HOME=$out/share INSTALL_DIR=$out ./scripts/install.sh
'';
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH : ${lib.makeBinPath [ distrobox ]}
)
'';
doCheck = false; # No checks defined
meta = with lib; {
description = "Unofficial GUI for managing your Distroboxes, written with GTK4 + Libadwaita";
homepage = "https://dvlv.github.io/BoxBuddyRS";
license = licenses.mit;
mainProgram = "boxbuddy-rs";
maintainers = with maintainers; [ aleksana ];
platforms = platforms.linux;
};
}