2024-03-12 05:08:20 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, wrapGAppsHook4
|
|
|
|
, libadwaita
|
|
|
|
, distrobox
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "boxbuddy";
|
2024-03-14 00:31:51 +00:00
|
|
|
version = "2.1.4";
|
2024-03-12 05:08:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Dvlv";
|
|
|
|
repo = "BoxBuddyRS";
|
|
|
|
rev = version;
|
2024-03-14 00:31:51 +00:00
|
|
|
hash = "sha256-954jMFWSIDDqtMitgc8456SMcQLzi6LhLbVvOC45fxQ=";
|
2024-03-12 05:08:20 +00:00
|
|
|
};
|
|
|
|
|
2024-03-14 00:31:51 +00:00
|
|
|
cargoHash = "sha256-08d0mPSGYySxw2uq16MNOu2Y39kjqyfZ8rJ2yTOL3/w=";
|
2024-03-12 05:08:20 +00:00
|
|
|
|
|
|
|
# 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/{}' "$out/share/icons/boxbuddy/{}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
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 = "An 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;
|
|
|
|
};
|
|
|
|
}
|