2024-04-03 19:26:21 +02:00
|
|
|
{ fetchFromGitHub
|
2024-03-29 10:35:40 +01:00
|
|
|
, glib
|
|
|
|
, gtk3
|
|
|
|
, lib
|
|
|
|
, libsoup_3
|
|
|
|
, networkmanager
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, webkitgtk_4_1
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rmenu";
|
2024-04-10 21:09:48 +02:00
|
|
|
version = "1.2.1";
|
2024-03-29 10:35:40 +01:00
|
|
|
|
|
|
|
src = lib.cleanSource ../.;
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
libsoup_3
|
|
|
|
networkmanager
|
|
|
|
webkitgtk_4_1
|
|
|
|
];
|
|
|
|
|
2024-04-03 19:26:21 +02:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
cargoLock = {
|
|
|
|
lockFile = ../Cargo.lock;
|
|
|
|
outputHashes = {
|
|
|
|
"gio-0.19.0" = "sha256-+PAQNJ9sTk8aKAhA/PLQWDCKDT/cQ+ukdbem7g1J+pU=";
|
|
|
|
"nm-0.4.0" = "sha256-53ipJU10ZhIKIF7PCw5Eo/e/reUK0qpyTyE7uIrCD88=";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2024-03-29 10:35:40 +01:00
|
|
|
postInstall = ''
|
2024-03-29 14:55:47 +01:00
|
|
|
# copy themes and plugins
|
2024-03-29 10:35:40 +01:00
|
|
|
mkdir $out/themes
|
|
|
|
mkdir $out/plugins
|
|
|
|
cp -vfr $src/themes/* $out/themes/.
|
|
|
|
cp -vfr $src/other-plugins/* $out/plugins/.
|
|
|
|
mv $out/bin/* $out/plugins # everything is a plugin by default
|
|
|
|
|
2024-03-29 14:55:47 +01:00
|
|
|
# rmenu and rmenu-build are actual binaries
|
2024-03-29 10:35:40 +01:00
|
|
|
mv $out/plugins/rmenu $out/bin/rmenu
|
|
|
|
mv $out/plugins/rmenu-build $out/bin/rmenu-build
|
|
|
|
|
2024-03-29 14:55:47 +01:00
|
|
|
# fix plugin names
|
|
|
|
# desktop network pactl-audio.sh powermenu.sh run window
|
|
|
|
mv $out/plugins/run $out/plugins/rmenu-run
|
|
|
|
mv $out/plugins/desktop $out/plugins/rmenu-desktop
|
|
|
|
mv $out/plugins/network $out/plugins/rmenu-network
|
|
|
|
mv $out/plugins/window $out/plugins/rmenu-window
|
|
|
|
|
|
|
|
# fix config and theme
|
2024-04-03 19:26:21 +02:00
|
|
|
mkdir -p $out/share/rmenu
|
|
|
|
cp -vf $src/rmenu/public/config.yaml $out/share/rmenu/config.yaml
|
2024-04-04 07:48:58 +02:00
|
|
|
sed -i "s@~\/\.config\/rmenu@$out@g" $out/share/rmenu/config.yaml
|
2024-04-03 19:26:21 +02:00
|
|
|
ln -sf $out/themes/dark.css $out/share/rmenu/style.css
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--suffix XDG_CONFIG_DIRS : "$out/share"
|
2024-04-04 11:13:51 +02:00
|
|
|
--suffix PATH : "$out/bin"
|
2024-04-03 19:26:21 +02:00
|
|
|
)
|
2024-03-29 10:35:40 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
2024-04-03 19:26:21 +02:00
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/imgurbot12/rmenu/releases/tag/v${version}";
|
|
|
|
description = "Another customizable Application-Launcher written in Rust";
|
2024-03-29 10:35:40 +01:00
|
|
|
homepage = "https://github.com/imgurbot12/rmenu";
|
2024-04-03 19:26:21 +02:00
|
|
|
license = lib.licenses.mit;
|
2024-03-29 10:35:40 +01:00
|
|
|
mainProgram = "rmenu";
|
2024-04-03 19:26:21 +02:00
|
|
|
maintainers = with lib.maintainers; [ grimmauld ];
|
|
|
|
platforms = lib.platforms.linux;
|
2024-03-29 10:35:40 +01:00
|
|
|
};
|
|
|
|
}
|