Skip to content

Commit b633f88

Browse files
committed
feat: Add flake.nix
1 parent e1b52d7 commit b633f88

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

flake.lock

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
description = "Development shell for Emacs + Node.js with Eask";
3+
4+
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
5+
6+
outputs = { self, nixpkgs }:
7+
let
8+
# Define the systems you want to support
9+
systems = [
10+
"x86_64-linux"
11+
"i686-linux"
12+
"x86_64-darwin"
13+
"aarch64-linux"
14+
"aarch64-darwin"
15+
];
16+
in
17+
{
18+
# Generate devShells for each system
19+
devShells = nixpkgs.lib.genAttrs systems (system:
20+
let
21+
# Get the nixpkgs set for the current system
22+
pkgs = nixpkgs.legacyPackages.${system};
23+
in
24+
{
25+
# Define the default development shell for the system
26+
default = pkgs.mkShell {
27+
buildInputs = [
28+
pkgs.emacs
29+
pkgs.nodejs
30+
];
31+
32+
shellHook = ''
33+
echo "Welcome to the Emacs development shell with Eask!"
34+
npm install --include=dev
35+
eask --version
36+
'';
37+
};
38+
}
39+
);
40+
};
41+
}

0 commit comments

Comments
 (0)