mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-12 14:07:42 +00:00
nix: add platforms to meta; allow overriding symlink behaviour
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ib6e44abd86bd0e58f290b456680a97236a6a6964
This commit is contained in:
parent
2e3c73957a
commit
4d58cae50d
1 changed files with 5 additions and 3 deletions
|
|
@ -4,9 +4,10 @@
|
|||
stdenv,
|
||||
mold,
|
||||
versionCheckHook,
|
||||
createSymlinks ? true,
|
||||
}: let
|
||||
pname = "stash";
|
||||
version = (builtins.fromTOML (builtins.readFile ../Cargo.toml)).package.version;
|
||||
version = (lib.importTOML ../Cargo.toml).package.version;
|
||||
src = let
|
||||
fs = lib.fileset;
|
||||
s = ../.;
|
||||
|
|
@ -36,7 +37,7 @@ in
|
|||
# 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 = ''
|
||||
postInstall = lib.optionalString createSymlinks ''
|
||||
mkdir -p $out
|
||||
for bin in stash-copy stash-paste wl-copy wl-paste; do
|
||||
ln -sf $out/bin/stash $out/bin/$bin
|
||||
|
|
@ -48,7 +49,7 @@ in
|
|||
|
||||
# After the version check, let's see if all binaries are linked correctly.
|
||||
# We could probably add a check phase to get the versions of each.
|
||||
postInstallCheck = ''
|
||||
postInstallCheck = lib.optionalString createSymlinks ''
|
||||
for bin in stash stash-copy stash-paste wl-copy wl-paste; do
|
||||
[ -x "$out/bin/$bin" ] || { echo "$bin missing"; exit 1; }
|
||||
done
|
||||
|
|
@ -65,5 +66,6 @@ in
|
|||
license = lib.licenses.mpl20;
|
||||
maintainers = [lib.maintainers.NotAShelf];
|
||||
mainProgram = "stash";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue