about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-06-16 03:01:18 +0200
committerGitHub <noreply@github.com>2021-06-16 03:01:18 +0200
commitb8958bbfa6f4046eb76c5eecfc6733f94ede6368 (patch)
tree22832b2285e2842ec23d79a4c5a3a19c4630d476
parentccf988f2ecd7047ed0b3458269796d3cb631678e (diff)
parent3e7ec42d6884aa6fff7b7e5802c1b988a443bca2 (diff)
downloadnixlib-b8958bbfa6f4046eb76c5eecfc6733f94ede6368.tar
nixlib-b8958bbfa6f4046eb76c5eecfc6733f94ede6368.tar.gz
nixlib-b8958bbfa6f4046eb76c5eecfc6733f94ede6368.tar.bz2
nixlib-b8958bbfa6f4046eb76c5eecfc6733f94ede6368.tar.lz
nixlib-b8958bbfa6f4046eb76c5eecfc6733f94ede6368.tar.xz
nixlib-b8958bbfa6f4046eb76c5eecfc6733f94ede6368.tar.zst
nixlib-b8958bbfa6f4046eb76c5eecfc6733f94ede6368.zip
Merge pull request #126874 from legendofmiracles/espanso-cleanup
espanso: add runtime dependencies correctly, nixos/espanso remove path hack
-rw-r--r--nixos/modules/services/desktops/espanso.nix1
-rw-r--r--pkgs/applications/office/espanso/default.nix8
2 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/desktops/espanso.nix b/nixos/modules/services/desktops/espanso.nix
index cd2eadf88168..4ef6724dda0a 100644
--- a/nixos/modules/services/desktops/espanso.nix
+++ b/nixos/modules/services/desktops/espanso.nix
@@ -12,7 +12,6 @@ in {
   config = mkIf cfg.enable {
     systemd.user.services.espanso = {
       description = "Espanso daemon";
-      path = with pkgs; [ espanso libnotify xclip ];
       serviceConfig = {
         ExecStart = "${pkgs.espanso}/bin/espanso daemon";
         Restart = "on-failure";
diff --git a/pkgs/applications/office/espanso/default.nix b/pkgs/applications/office/espanso/default.nix
index 5cbfa5b1b2af..adeb087ae8be 100644
--- a/pkgs/applications/office/espanso/default.nix
+++ b/pkgs/applications/office/espanso/default.nix
@@ -10,6 +10,7 @@
 , openssl
 , xclip
 , xdotool
+, makeWrapper
 }:
 
 rustPlatform.buildRustPackage rec {
@@ -28,6 +29,7 @@ rustPlatform.buildRustPackage rec {
   nativeBuildInputs = [
     extra-cmake-modules
     pkg-config
+    makeWrapper
   ];
 
   buildInputs = [
@@ -35,6 +37,7 @@ rustPlatform.buildRustPackage rec {
     libXtst
     libXi
     libnotify
+    xclip
     openssl
     xdotool
   ];
@@ -42,6 +45,11 @@ rustPlatform.buildRustPackage rec {
   # Some tests require networking
   doCheck = false;
 
+  postInstall = ''
+    wrapProgram $out/bin/espanso \
+      --prefix PATH : ${lib.makeBinPath [ libnotify xclip ]}
+  '';
+
   meta = with lib; {
     description = "Cross-platform Text Expander written in Rust";
     homepage = "https://espanso.org";