|
1 | 1 | {
|
2 | 2 | description = "A Nix-flake-based development environment for Cursorless";
|
3 | 3 |
|
4 |
| - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; |
| 4 | + inputs = { |
| 5 | + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; |
| 6 | + }; |
5 | 7 |
|
6 | 8 | outputs =
|
7 | 9 | { self, nixpkgs }:
|
|
13 | 15 | "aarch64-darwin"
|
14 | 16 | ];
|
15 | 17 | forEachSupportedSystem =
|
16 |
| - f: nixpkgs.lib.genAttrs supportedSystems (system: f { pkgs = import nixpkgs { inherit system; }; }); |
| 18 | + f: |
| 19 | + nixpkgs.lib.genAttrs supportedSystems ( |
| 20 | + system: |
| 21 | + f { |
| 22 | + pkgs = import nixpkgs { |
| 23 | + inherit system; |
| 24 | + overlays = [ |
| 25 | + # https://github.com/NixOS/nixpkgs/pull/317333 |
| 26 | + (final: prev: { |
| 27 | + nodePackages = prev.nodePackages // { |
| 28 | + neovim = prev.buildNpmPackage rec { |
| 29 | + pname = "neovim-node-client"; |
| 30 | + version = "5.1.1-dev.0"; |
| 31 | + src = prev.fetchFromGitHub { |
| 32 | + owner = "neovim"; |
| 33 | + repo = "node-client"; |
| 34 | + rev = "d99ececf115ddc8ade98467417c1bf0120b676b5"; |
| 35 | + hash = "sha256-eiKyhJNz7kH2iX55lkn7NZYTj6yaSZLMZxqiqPxDIPs="; |
| 36 | + }; |
| 37 | + npmDeps = prev.fetchNpmDeps { |
| 38 | + inherit src; |
| 39 | + hash = "sha256-UoMq+7evskxtZygycxLBgeUtwrET8jYKeZwMiXdBMAw="; |
| 40 | + }; |
| 41 | + postInstall = '' |
| 42 | + mkdir -p $out/bin |
| 43 | + ln -s $out/lib/node_modules/neovim/node_modules/.bin/neovim-node-host $out/bin |
| 44 | + ''; |
| 45 | + }; |
| 46 | + }; |
| 47 | + neovim = prev.neovim.override { withNodeJs = true; }; |
| 48 | + |
| 49 | + }) |
| 50 | + |
| 51 | + ]; |
| 52 | + }; |
| 53 | + } |
| 54 | + ); |
17 | 55 | pythonVersion = builtins.replaceStrings [ "py" ] [
|
18 | 56 | "python"
|
19 | 57 | ] (nixpkgs.lib.importTOML ./pyproject.toml).tool.ruff.target-version;
|
|
37 | 75 | --set PYTHONPATH $PYTHONPATH
|
38 | 76 | '';
|
39 | 77 | }))
|
40 |
| - |
41 | 78 | python
|
| 79 | + pkgs.neovim |
42 | 80 | ];
|
43 | 81 | # To prevent weird broken non-interactive bash terminal
|
44 | 82 | buildInputs = [ pkgs.bashInteractive ];
|
45 | 83 | shellHook = ''
|
46 | 84 | if [ ! -f .git/hooks/pre-commit ]; then
|
47 | 85 | echo "You can run 'pre-commit install' to install git commit hooks if you want them."
|
48 | 86 | fi
|
49 |
| -
|
50 | 87 | pnpm install
|
| 88 | +
|
| 89 | + PATH=${pkgs.lib.getBin pkgs.neovim}/bin:$PATH} |
51 | 90 | '';
|
52 | 91 | };
|
53 | 92 | }
|
|
0 commit comments