-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
45 lines (41 loc) · 1.31 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
39
40
41
42
43
44
45
{
description = ""; # FIXME: add a description
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # TODO: pin
flake-utils.url = "github:numtide/flake-utils"; # TODO: pin
};
outputs = { self, flake-utils, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs) { inherit system; };
# Generate a user-friendly version number.
version = builtins.substring 0 8 self.lastModifiedDate;
info = (builtins.fromJSON (builtins.readFile ./package.json));
in
{
# For `nix develop`:
devShell = pkgs.mkShell {
# see https://github.com/NixOS/nixpkgs/issues/52447
# see https://hoverbear.org/blog/rust-bindgen-in-nix/
# see https://slightknack.dev/blog/nix-os-bindgen/
# https://nixos.wiki/wiki/Rust#Installation_via_rustup
buildInputs = with pkgs;
[
# JS tools
nodejs_20
zulu17 # <- openJDK
# nix support
nixpkgs-fmt
nil
# other
bashInteractive
git
gitleaks
lychee
shellcheck
] ++ (with nodePackages; [pnpm]);
# Environment variables
};
}
);
}