-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathflake.nix
More file actions
67 lines (58 loc) · 1.77 KB
/
Copy pathflake.nix
File metadata and controls
67 lines (58 loc) · 1.77 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
description = "berlin.freifunk.net development environment.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
};
# To find the rev attribute of a specific package version, use:
# https://www.nixhub.io/packages/nodejs
# To find the sha256 of that commit to nixpkgs, use:
# nix-prefetch-url --unpack https://codeload.github.com/NixOS/nixpkgs/zip/{COMMIT_ID}
pkgs_hugo_152 = import (pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "ee09932cedcef15aaf476f9343d1dea2cb77e261";
sha256 = "1xz5pa6la2fyj5b1cfigmg3nmml11fyf9ah0rnr4zfgmnwimn2gn";
}) {
inherit (pkgs) system;
};
pkgs_nodejs_22 = import (pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "3d46470bb3030020f7e1361f33514854f5bfa86d";
sha256 = "0hn1wvpn79ma083nf53kp4wbs27bwzbzwfr5kipdnz38zsc4yh1y";
}) {
inherit (pkgs) system;
};
# Define packages needed for both devShell and build
commonPackages = with pkgs; [
pkgs_hugo_152.hugo
pkgs_nodejs_22.nodejs
go
];
nixTools = with pkgs; [
alejandra
nixpkgs-fmt
];
in {
devShells.default = pkgs.mkShell {
buildInputs = commonPackages ++ nixTools;
shellHook = ''
git submodule init
git submodule update
npm install
'';
};
}
);
}