-
Notifications
You must be signed in to change notification settings - Fork 18
/
flake.nix
38 lines (37 loc) · 1.15 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
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.systems.url = "github:nix-systems/default";
inputs.devshell.url = "github:numtide/devshell";
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
inputs.devshell.inputs.systems.follows = "systems";
outputs = inputs@{ ... }:
let
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems);
in
{
devShells = eachSystem (system:
let
pkgs = inputs.nixpkgs.legacyPackages.${system};
devshell = import inputs.devshell {
inherit inputs system;
nixpkgs = pkgs;
};
nodeModules = pkgs.mkYarnModules {
pname = "zigbee2mqtt-networkmap-node-modules";
version = "1.0";
packageJSON = ./package.json;
yarnLock = ./yarn.lock;
};
in
{
default = devshell.mkShell {
devshell.startup.yarn.text = ''
${pkgs.rsync}/bin/rsync -rlt --chmod=Du+w --delete ${nodeModules}/node_modules ./
'';
packages = with pkgs; [
yarn
];
};
});
};
}