File tree 4 files changed +88
-0
lines changed
4 files changed +88
-0
lines changed Original file line number Diff line number Diff line change
1
+ use flake
Original file line number Diff line number Diff line change @@ -42,3 +42,6 @@ next-env.d.ts
42
42
43
43
# test subset config
44
44
packages /test-harness /testSubsetGrep.properties
45
+
46
+ # nix
47
+ .direnv /
Original file line number Diff line number Diff line change
1
+ {
2
+ description = "A Nix-flake-based development environment for Cursorless" ;
3
+
4
+ inputs . nixpkgs . url = "github:NixOS/nixpkgs/nixpkgs-unstable" ;
5
+
6
+ outputs =
7
+ { self , nixpkgs } :
8
+ let
9
+ supportedSystems = [
10
+ "x86_64-linux"
11
+ "aarch64-linux"
12
+ "x86_64-darwin"
13
+ "aarch64-darwin"
14
+ ] ;
15
+ forEachSupportedSystem =
16
+ f : nixpkgs . lib . genAttrs supportedSystems ( system : f { pkgs = import nixpkgs { inherit system ; } ; } ) ;
17
+ pythonVersion = builtins . replaceStrings [ "py" ] [
18
+ "python"
19
+ ] ( nixpkgs . lib . importTOML ./pyproject.toml ) . tool . ruff . target-version ;
20
+ in
21
+ {
22
+ devShells = forEachSupportedSystem (
23
+ { pkgs } :
24
+ {
25
+ default = pkgs . mkShell {
26
+ packages =
27
+ let
28
+ python = pkgs . ${ pythonVersion } ;
29
+ pythonPackages = pkgs . "${ pythonVersion } Packages" ;
30
+ in
31
+ # neovim-wrapper =
32
+ [
33
+ pkgs . corepack
34
+ pkgs . vsce
35
+ # https://github.com/NixOS/nixpkgs/pull/251418
36
+ ( pkgs . pre-commit . overrideAttrs ( previousAttrs : {
37
+ makeWrapperArgs = ''
38
+ --set PYTHONPATH $PYTHONPATH
39
+ '' ;
40
+ } ) )
41
+
42
+ python
43
+ ] ;
44
+ # To prevent weird broken non-interactive bash terminal
45
+ buildInputs = [ pkgs . bashInteractive ] ;
46
+ shellHook = ''
47
+ if [ ! -f .git/hooks/pre-commit ]; then
48
+ pre-commit install
49
+ fi
50
+
51
+ pnpm install
52
+ '' ;
53
+ } ;
54
+ }
55
+ ) ;
56
+ } ;
57
+ }
You can’t perform that action at this time.
0 commit comments