Skip to content

Commit

Permalink
Avoid pre-built binaries in NixOS problems for LSP
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Apr 28, 2024
1 parent dc88561 commit 4dd605c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/update-flake-lock-and-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ jobs:
pr-title: 'Bump flake.lock and related dependencies'
optional-run: |
nix run .#bump_completions
git add ./dependencies
# https://stackoverflow.com/q/34807971
git update-index -q --really-refresh
git diff-index --quiet HEAD || git commit -m 'Update dprint completions' ./dependencies/dprint
nix run .#bump_lsp
secrets:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
},
"gopls": {
"build.buildFlags": ["-tags=linux,windows,darwin"]
}
},
"typos.path": "/nix/store/02sj7rvbhzvlj1nsjzwya9fhbq34178f-typos-lsp-0.1.17/bin/typos-lsp" // selfup {"extract":"/nix/store/[^\"]+/bin/typos-lsp","replacer":["bash", "-c", "command -v typos-lsp"]}
}
7 changes: 1 addition & 6 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
},
"toml": {
},
"prettier": {
"printWidth": 120,
"singleQuote": true
},
"excludes": [
".git",
".direnv",
Expand All @@ -19,7 +15,6 @@
"plugins": [
"https://plugins.dprint.dev/json-0.19.2.wasm",
"https://plugins.dprint.dev/markdown-0.16.4.wasm",
"https://plugins.dprint.dev/toml-0.6.1.wasm",
"https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40"
"https://plugins.dprint.dev/toml-0.6.1.wasm"
]
}
18 changes: 18 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
cargo-make

edge-pkgs.dprint
edge-pkgs.yamlfmt
edge-pkgs.typos
edge-pkgs.typos-lsp
edge-pkgs.go_1_22
edge-pkgs.goreleaser
edge-pkgs.trivy
Expand Down Expand Up @@ -113,9 +115,25 @@
${edge-pkgs.podman}/bin/podman completion zsh > ./dependencies/podman/completions.zsh
${edge-pkgs.podman}/bin/podman completion fish > ./dependencies/podman/completions.fish
git add ./dependencies/podman
# https://stackoverflow.com/q/34807971
git update-index -q --really-refresh
git diff-index --quiet HEAD || git commit -m 'Update podman completions' ./dependencies/podman
${edge-pkgs.dprint}/bin/dprint completions bash > ./dependencies/dprint/completions.bash
${edge-pkgs.dprint}/bin/dprint completions zsh > ./dependencies/dprint/completions.zsh
${edge-pkgs.dprint}/bin/dprint completions fish > ./dependencies/dprint/completions.fish
git add ./dependencies/dprint
git update-index -q --really-refresh
git diff-index --quiet HEAD || git commit -m 'Update dprint completions' ./dependencies/dprint
'';

packages.bump_lsp = pkgs.writeShellScriptBin "bump_lsp" ''
set -euo pipefail
git ls-files .vscode | xargs nix run github:kachick/selfup/v1.1.2 -- run
git diff-index --quiet HEAD || git commit -m 'Sync LSP path with nixpkgs' .vscode
'';

packages.check_no_dirty_xz_in_nix_store = pkgs.writeShellApplication {
Expand Down

0 comments on commit 4dd605c

Please sign in to comment.