Merge pull request #245011 from aacebedo/aacebedo/refactor_swayosd
swayosd: refactor build to install all files
This commit is contained in:
commit
7e6d24c640
2 changed files with 51 additions and 2 deletions
|
@ -3,14 +3,20 @@
|
|||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, wrapGAppsHook
|
||||
, cargo
|
||||
, coreutils
|
||||
, gtk-layer-shell
|
||||
, libevdev
|
||||
, libinput
|
||||
, libpulseaudio
|
||||
, meson
|
||||
, ninja
|
||||
, rustc
|
||||
, stdenv
|
||||
, udev
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "swayosd";
|
||||
version = "unstable-2023-07-18";
|
||||
|
||||
|
@ -21,11 +27,20 @@ rustPlatform.buildRustPackage {
|
|||
hash = "sha256-MJuTwEI599Y7q+0u0DMxRYaXsZfpksc2csgnK9Ghp/E=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-pExpzQwuHREhgkj+eZ8drBVsh/B3WiQBBh906O6ymFw=";
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-pExpzQwuHREhgkj+eZ8drBVsh/B3WiQBBh906O6ymFw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapGAppsHook
|
||||
pkg-config
|
||||
meson
|
||||
rustc
|
||||
cargo
|
||||
ninja
|
||||
rustPlatform.cargoSetupHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -36,6 +51,16 @@ rustPlatform.buildRustPackage {
|
|||
udev
|
||||
];
|
||||
|
||||
patches = [
|
||||
./swayosd_systemd_paths.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace data/udev/99-swayosd.rules \
|
||||
--replace /bin/chgrp ${coreutils}/bin/chgrp \
|
||||
--replace /bin/chmod ${coreutils}/bin/chmod
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A GTK based on screen display for keyboard shortcuts";
|
||||
homepage = "https://github.com/ErikReider/SwayOSD";
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/data/meson.build b/data/meson.build
|
||||
index fc687a5..68decdf 100644
|
||||
--- a/data/meson.build
|
||||
+++ b/data/meson.build
|
||||
@@ -1,5 +1,6 @@
|
||||
datadir = get_option('datadir')
|
||||
sysconfdir = get_option('sysconfdir')
|
||||
+libdir = get_option('libdir')
|
||||
|
||||
# LICENSE
|
||||
install_data(
|
||||
@@ -41,11 +42,7 @@ configure_file(
|
||||
|
||||
# Systemd service unit
|
||||
systemd = dependency('systemd', required: false)
|
||||
-if systemd.found()
|
||||
- systemd_service_install_dir = systemd.get_variable(pkgconfig :'systemdsystemunitdir')
|
||||
-else
|
||||
- systemd_service_install_dir = join_paths(libdir, 'systemd', 'system')
|
||||
-endif
|
||||
+systemd_service_install_dir = join_paths(libdir, 'systemd', 'system')
|
||||
|
||||
configure_file(
|
||||
configuration: conf_data,
|
Loading…
Reference in a new issue