-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
41 lines (34 loc) · 970 Bytes
/
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
nixpkgs,
flake-utils,
...
}:
# Iterate over Arm, x86 for MacOs 🍎 and Linux 🐧
flake-utils.lib.eachSystem (flake-utils.lib.defaultSystems) (
system: let
pkgs = nixpkgs.legacyPackages.${system};
nodejs-22_9 = pkgs.stdenv.mkDerivation rec {
pname = "nodejs";
version = "22.9.0";
src = pkgs.fetchurl {
url = "https://nodejs.org/dist/v${version}/node-v${version}-linux-x64.tar.xz";
hash = "sha256-G/rp7yGrQ8ktgnTxvQMr9h9C6gBBkqGNTGRHdQhiYUI=";
};
installPhase = ''
mkdir -p $out
mv * $out/
'';
};
bundle = import ./. {
inherit system flake-utils pkgs nodejs-22_9;
};
in {
inherit (bundle) apps devShells;
}
);
}