File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444 "completion_inheritance"
4545 ] ;
4646
47- passthru . updateScript = pkgs . writeShellScript "update-php-stubs.sh" ''
48- #! /usr/bin/env nix-shell
49- #! nix-shell -i bash -p bash curl gnused gnugrep nix-prefetch-git jq
50-
51- file="${ self } /flake.nix"
52-
53- version="$(grep -oP 'version = "\K[\d\.]+' "$file")"
54- curl -O "https://raw.githubusercontent.com/AJenbo/phpantom_lsp/refs/tags/$version/stubs.lock"
55- stubsVersion="$(grep -oP 'commit = "\K[^"]+' ./stubs.lock)"
56- rm stubs.lock
57-
58- stubsHash="$(
59- nix-prefetch-git --rev "$stubsVersion" "https://github.com/JetBrains/phpstorm-stubs.git" \
60- 2> /dev/null \
61- | jq -r '.hash'
62- )"
63-
64- sed -i 's/\(rev = "\)[^"]*/\1'"$stubsVersion"'/' "$file"
65- sed -i '/stubsSrc/,/}/ s/\(hash = "\)[^"]*/\1'"$stubsHash"'/'
66- '' ;
67-
6847 postInstall = ''
6948 mv $out/bin/phpantom_lsp $out/bin/phpantom-lsp
7049 ln -s $out/bin/phpantom-lsp $out/bin/phpantom_lsp
You can’t perform that action at this time.
0 commit comments