Skip to content

Commit

Permalink
feat: svu: infer sub-package
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Sep 10, 2024
1 parent 41e2ab8 commit b7ea8b2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion modules/pkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@ in {

# Dev tools
nodejs
svu
(pkgs.writeScriptBin "svu" ''
#!/usr/bin/env bash
root=$(git rev-parse --show-toplevel)
if [ "$PWD" != "$root" ]; then
local prefix=$(echo -n "$PWD" | sed "s|$root/||g")
${pkgs.svu}/bin/svu --prefix="$prefix/v" --pattern="$prefix/*" "$@"
else
${pkgs.svu}/bin/svu "$@"
fi
'')
yarn

# DevOps
Expand Down

0 comments on commit b7ea8b2

Please sign in to comment.