espanso: add runtime dependencies correctly, nixos/espanso remove path hack
This commit is contained in:
parent
dcf0bd04d8
commit
3e7ec42d68
|
@ -12,7 +12,6 @@ in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.user.services.espanso = {
|
systemd.user.services.espanso = {
|
||||||
description = "Espanso daemon";
|
description = "Espanso daemon";
|
||||||
path = with pkgs; [ espanso libnotify xclip ];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.espanso}/bin/espanso daemon";
|
ExecStart = "${pkgs.espanso}/bin/espanso daemon";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
, openssl
|
, openssl
|
||||||
, xclip
|
, xclip
|
||||||
, xdotool
|
, xdotool
|
||||||
|
, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -28,6 +29,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
extra-cmake-modules
|
extra-cmake-modules
|
||||||
pkg-config
|
pkg-config
|
||||||
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
@ -35,6 +37,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
libXtst
|
libXtst
|
||||||
libXi
|
libXi
|
||||||
libnotify
|
libnotify
|
||||||
|
xclip
|
||||||
openssl
|
openssl
|
||||||
xdotool
|
xdotool
|
||||||
];
|
];
|
||||||
|
@ -42,6 +45,11 @@ rustPlatform.buildRustPackage rec {
|
||||||
# Some tests require networking
|
# Some tests require networking
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/espanso \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ libnotify xclip ]}
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Cross-platform Text Expander written in Rust";
|
description = "Cross-platform Text Expander written in Rust";
|
||||||
homepage = "https://espanso.org";
|
homepage = "https://espanso.org";
|
||||||
|
|
Loading…
Reference in a new issue