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
|
||||
!/src
|
||||
!/vendor
|
||||
!/contrib
|
||||
|
||||
# Rust/Cargo
|
||||
!/Cargo.lock
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ stash watch
|
|||
This runs a daemon that monitors the clipboard and stores new entries
|
||||
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
|
||||
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.
|
||||
|
||||
> [!TIP]
|
||||
|
|
@ -216,8 +216,9 @@ LoadCredential=clipboard_filter:/etc/stash/clipboard_filter
|
|||
```
|
||||
|
||||
The file `/etc/stash/clipboard_filter` should contain your regex pattern (no
|
||||
quotes). This is done automatically in the vendored Systemd service. Remember to
|
||||
set the appropriate file permissions if using this option.
|
||||
quotes). This is done automatically in the
|
||||
[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.
|
||||
If a clipboard entry matches the regex, it will be skipped and a warning will be
|
||||
|
|
|
|||
|
|
@ -30,18 +30,12 @@ in
|
|||
|
||||
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'
|
||||
# Since Crane doesn't have a good way of enforcing that our symlinks
|
||||
# generated by the build wrapper are correctly linked, we should link
|
||||
# them *manually*. The postInstallCheck phase that follows will check
|
||||
# to verify if all of those links are in place.
|
||||
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
|
||||
# generated by the build wrapper are correctly linked, we should link
|
||||
# them *manually*.
|
||||
for bin in stash-copy stash-paste wl-copy wl-paste; do
|
||||
ln -sf $out/bin/stash $out/bin/$bin
|
||||
done
|
||||
|
|
@ -51,7 +45,7 @@ in
|
|||
doInstallCheck = true;
|
||||
|
||||
# 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 = ''
|
||||
for bin in stash stash-copy stash-paste wl-copy wl-paste; do
|
||||
[ -x "$out/bin/$bin" ] || { echo "$bin missing"; exit 1; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue