git.iko.soy/typeable/nixpkgs
on master help sign in
espanso: add runtime dependencies correctly, nixos/espanso remove path hack
commit3e7ec42d6884aa6fff7b7e5802c1b988a443bca2 authorlegendofmiracles <legendofmiracles@protonmail.com> dateMon 14 Jun 2021, 13:09 (5 years ago) parentdcf0bd0
2 files changed+8−1
nixos/modules/services/desktops/espanso.nix−1 pkgs/applications/office/espanso/default.nix+8
nixos/modules/services/desktops/espanso.nix−1
@@ -12,7 +12,6 @@ in {
1212 config = mkIf cfg.enable {
1313 systemd.user.services.espanso = {
1414 description = "Espanso daemon";
15− path = with pkgs; [ espanso libnotify xclip ];
1615 serviceConfig = {
1716 ExecStart = "${pkgs.espanso}/bin/espanso daemon";
1817 Restart = "on-failure";
pkgs/applications/office/espanso/default.nix+8
@@ -10,6 +10,7 @@
1010, openssl
1111, xclip
1212, xdotool
13+, makeWrapper
1314}:
1415
1516rustPlatform.buildRustPackage rec {
@@ -28,6 +29,7 @@ rustPlatform.buildRustPackage rec {
2829 nativeBuildInputs = [
2930 extra-cmake-modules
3031 pkg-config
32+ makeWrapper
3133 ];
3234
3335 buildInputs = [
@@ -35,6 +37,7 @@ rustPlatform.buildRustPackage rec {
3537 libXtst
3638 libXi
3739 libnotify
40+ xclip
3841 openssl
3942 xdotool
4043 ];
@@ -42,6 +45,11 @@ rustPlatform.buildRustPackage rec {
4245 # Some tests require networking
4346 doCheck = false;
4447
48+ postInstall = ''
49+ wrapProgram $out/bin/espanso \
50+ --prefix PATH : ${lib.makeBinPath [ libnotify xclip ]}
51+ '';
52+
4553 meta = with lib; {
4654 description = "Cross-platform Text Expander written in Rust";
4755 homepage = "https://espanso.org";