-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathflake.nix
More file actions
48 lines (43 loc) · 1.3 KB
/
flake.nix
File metadata and controls
48 lines (43 loc) · 1.3 KB
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
45
46
47
48
{
description = "Development shell for Emacs + Node.js with Eask";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
# Define the systems you want to support
systems = [
"x86_64-linux"
"i686-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
in
{
# Generate devShells for each system
devShells = nixpkgs.lib.genAttrs systems (system:
let
# Get the nixpkgs set for the current system
pkgs = nixpkgs.legacyPackages.${system};
in
{
# Define the default development shell for the system
default = pkgs.mkShell {
buildInputs = [
pkgs.emacs
pkgs.nodejs
];
shellHook = ''
echo "Welcome to the Emacs development shell with Eask!"
# Export `bin` to PATH.
export PATH="$PATH:$PWD/bin"
# Install if `node_modules` is missing
if [ ! -d node_modules ]; then
npm install --include=dev
eask --version
fi
'';
};
}
);
};
}