Merge pull request #126874 from legendofmiracles/espanso-cleanup

espanso: add runtime dependencies correctly, nixos/espanso remove path hack
This commit is contained in:
Sandro 2021-06-16 03:01:18 +02:00 committed by GitHub
commit b8958bbfa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -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";

View File

@ -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";