File tree Expand file tree Collapse file tree 3 files changed +28
-11
lines changed Expand file tree Collapse file tree 3 files changed +28
-11
lines changed Original file line number Diff line number Diff line change 3737 # except any version with the key that is the same as the `primary-key`
3838 purge-primary-key : never
3939
40- - run : |
41- cd lint
42- nix run .. -- checkall
40+ - run : nix run . -- checkall
Original file line number Diff line number Diff line change 1818
1919 devShells = eachSystem ( system : {
2020 default = pkgsFor . ${ system } . mkShell {
21- packages = with pkgsFor . ${ system } ; [
22- nodejs_22
23- pnpm
24- self . packages . ${ system } . default
25- ] ;
21+ inputsFrom = self . packages . ${ system } . default ;
22+ packages = [ self . packages . ${ system } . default ] ;
2623 name = "hyprland-wiki" ;
2724 } ;
2825 } ) ;
Original file line number Diff line number Diff line change 2222 installPhase = ''
2323 runHook preInstall
2424
25+ shopt -s dotglob
26+
2527 mkdir -p $out/bin
2628
27- cat << EOF > $out/bin/lint
29+ cp -r * $out/
30+
31+ # Replace relative paths in package.json scripts with cwd paths
32+ sed -i "s|\.\.|\$cwd|g" $out/package.json
33+
34+ cat << 'EOF' > $out/bin/lint
2835 #!/usr/bin/env bash
29- ${ pnpm } /bin/pnpm run \$1
36+ shopt -s dotglob
37+
38+ export cwd=$(pwd)
39+
40+ args=()
41+ for arg in "$@"; do
42+ if [[ "$arg" == ../* ]] || [[ "$arg" == ./* ]] || [[ "$arg" == */* && "$arg" != /* ]]; then
43+ args+=("$(realpath -m "$cwd/$arg")")
44+ else
45+ args+=("$arg")
46+ fi
47+ done
48+
49+ cd ${ placeholder "out" }
50+
51+ exec ${ pnpm } /bin/pnpm run "'' ${args[@]}"
3052 EOF
3153
3254 chmod +x $out/bin/lint
3860 runHook preFixup
3961
4062 wrapProgram $out/bin/lint \
41- --suffix PATH : ${ lib . makeBinPath [ nodejs ] }
63+ --suffix PATH : ${ lib . makeBinPath [ nodejs ] } :$out/node_modules/.bin
4264
4365 runHook postFixup
4466 '' ;
You can’t perform that action at this time.
0 commit comments