-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
44 lines (39 loc) · 1.14 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = inputs: let
supportedSystems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forAllSystems = inputs.nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import inputs.nixpkgs { inherit system; });
in {
devShells = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
in {
default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs_20
yarn
python311
python311Packages.setuptools
pkg-config
libsass
openssl
gcc
gnumake
] ++ lib.optionals stdenv.isLinux [
autoreconfHook
libudev-zero
];
shellHook = ''
export PATH=$PWD/node_modules/.bin:$PATH
export PYTHON=${pkgs.python311}/bin/python
${pkgs.lib.optionalString pkgs.stdenv.isLinux "export LIBCLANG_PATH=${pkgs.libclang.lib}/lib"}
'';
};
}
);
hydraJobs.devShells = inputs.self.devShells;
};
}