Merge pull request #291642 from massix/fix/onedriver-systemd

onedriver: fix systemd service (closes #291608)
This commit is contained in:
Guillaume Girol 2024-03-04 20:40:54 +01:00 committed by GitHub
commit d89fdbfc98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,6 +7,7 @@
, fuse
, installShellFiles
, wrapGAppsHook
, wrapperDir ? "/run/wrappers/bin"
}:
let
pname = "onedriver";
@ -40,6 +41,7 @@ buildGoModule {
install -Dm644 ./pkg/resources/onedriver-128.png $out/share/icons/onedriver/onedriver-128.png
install -Dm644 ./pkg/resources/onedriver.desktop $out/share/applications/onedriver.desktop
install -Dm644 ./pkg/resources/onedriver@.service $out/lib/systemd/user/onedriver@.service
mkdir -p $out/share/man/man1
installManPage ./pkg/resources/onedriver.1
@ -47,6 +49,10 @@ buildGoModule {
substituteInPlace $out/share/applications/onedriver.desktop \
--replace "/usr/bin/onedriver-launcher" "$out/bin/onedriver-launcher" \
--replace "/usr/share/icons" "$out/share/icons"
substituteInPlace $out/lib/systemd/user/onedriver@.service \
--replace "/usr/bin/onedriver" "$out/bin/onedriver" \
--replace "/usr/bin/fusermount" "${wrapperDir}/fusermount"
'';
meta = with lib; {