mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-12 22:17:41 +00:00
meta: rename 'vendor' to contrib; don't vendor service in Nix derivation
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a696479e976a7f4db18e6501e347a4940ce28
This commit is contained in:
parent
a9da424e70
commit
b50702480f
4 changed files with 10 additions and 15 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
!/nix
|
!/nix
|
||||||
!/src
|
!/src
|
||||||
!/vendor
|
!/contrib
|
||||||
|
|
||||||
# Rust/Cargo
|
# Rust/Cargo
|
||||||
!/Cargo.lock
|
!/Cargo.lock
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ stash watch
|
||||||
This runs a daemon that monitors the clipboard and stores new entries
|
This runs a daemon that monitors the clipboard and stores new entries
|
||||||
automatically. This is designed as an alternative to shelling out to
|
automatically. This is designed as an alternative to shelling out to
|
||||||
`wl-paste --watch` inside a Systemd service or XDG autostart. You may find a
|
`wl-paste --watch` inside a Systemd service or XDG autostart. You may find a
|
||||||
premade Systemd service in `vendor/`. Packagers are encouraged to vendor the
|
premade Systemd service in `contrib/`. Packagers are encouraged to vendor the
|
||||||
service unless adding their own.
|
service unless adding their own.
|
||||||
|
|
||||||
> [!TIP]
|
> [!TIP]
|
||||||
|
|
@ -216,8 +216,9 @@ LoadCredential=clipboard_filter:/etc/stash/clipboard_filter
|
||||||
```
|
```
|
||||||
|
|
||||||
The file `/etc/stash/clipboard_filter` should contain your regex pattern (no
|
The file `/etc/stash/clipboard_filter` should contain your regex pattern (no
|
||||||
quotes). This is done automatically in the vendored Systemd service. Remember to
|
quotes). This is done automatically in the
|
||||||
set the appropriate file permissions if using this option.
|
[vendored Systemd service](./contrib/stash.service). Remember to set the
|
||||||
|
appropriate file permissions if using this option.
|
||||||
|
|
||||||
The service will check the credential file first, then the environment variable.
|
The service will check the credential file first, then the environment variable.
|
||||||
If a clipboard entry matches the regex, it will be skipped and a warning will be
|
If a clipboard entry matches the regex, it will be skipped and a warning will be
|
||||||
|
|
|
||||||
|
|
@ -30,18 +30,12 @@ in
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
# Whether cargo's target directory should be copied as an output
|
|
||||||
doInstallCargoArtifacts = true;
|
|
||||||
|
|
||||||
# Install Systemd service for Stash into $out/share.
|
|
||||||
# This can be used to use Stash in 'systemd.packages'
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p $out
|
|
||||||
install -Dm755 ${../vendor/stash.service} $out/share/stash.service
|
|
||||||
|
|
||||||
# Since Crane doesn't have a good way of enforcing that our symlinks
|
# Since Crane doesn't have a good way of enforcing that our symlinks
|
||||||
# generated by the build wrapper are correctly linked, we should link
|
# generated by the build wrapper are correctly linked, we should link
|
||||||
# them *manually*.
|
# them *manually*. The postInstallCheck phase that follows will check
|
||||||
|
# to verify if all of those links are in place.
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out
|
||||||
for bin in stash-copy stash-paste wl-copy wl-paste; do
|
for bin in stash-copy stash-paste wl-copy wl-paste; do
|
||||||
ln -sf $out/bin/stash $out/bin/$bin
|
ln -sf $out/bin/stash $out/bin/$bin
|
||||||
done
|
done
|
||||||
|
|
@ -51,7 +45,7 @@ in
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
|
||||||
# After the version check, let's see if all binaries are linked correctly.
|
# After the version check, let's see if all binaries are linked correctly.
|
||||||
# We could probably add a check phase to the versions of each.
|
# We could probably add a check phase to get the versions of each.
|
||||||
postInstallCheck = ''
|
postInstallCheck = ''
|
||||||
for bin in stash stash-copy stash-paste wl-copy wl-paste; do
|
for bin in stash stash-copy stash-paste wl-copy wl-paste; do
|
||||||
[ -x "$out/bin/$bin" ] || { echo "$bin missing"; exit 1; }
|
[ -x "$out/bin/$bin" ] || { echo "$bin missing"; exit 1; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue