File tree Expand file tree Collapse file tree 2 files changed +74
-0
lines changed Expand file tree Collapse file tree 2 files changed +74
-0
lines changed 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 = { self , nixpkgs } :
7
+ let
8
+ overlays = [
9
+ ( final : prev : rec {
10
+ nodejs = prev . nodejs-18_x ;
11
+ pnpm = prev . nodePackages . pnpm ;
12
+ yarn = ( prev . yarn . override { inherit nodejs ; } ) ;
13
+ } )
14
+ ] ;
15
+ supportedSystems =
16
+ [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ] ;
17
+ forEachSupportedSystem = f :
18
+ nixpkgs . lib . genAttrs supportedSystems ( system :
19
+ f {
20
+ pkgs = import nixpkgs {
21
+ inherit overlays system ;
22
+ config . allowUnfree = true ;
23
+ } ;
24
+ } ) ;
25
+ in {
26
+ devShells = forEachSupportedSystem ( { pkgs } : {
27
+ default = pkgs . mkShell {
28
+ packages = with pkgs ; [
29
+ node2nix
30
+ nodejs
31
+ pnpm
32
+ yarn
33
+ python310
34
+ vsce
35
+ pre-commit
36
+ ] ;
37
+ # To prevent weird broken non-interactive bash terminal
38
+ buildInputs = [ pkgs . bashInteractive ] ;
39
+ shellHook = ''
40
+ if [ ! -f .git/hooks/pre-commit ]; then
41
+ pre-commit install
42
+ fi
43
+ '' ;
44
+ } ;
45
+ } ) ;
46
+ } ;
47
+ }
You can’t perform that action at this time.
0 commit comments