forked from snowfallorg/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
57 lines (45 loc) · 1.56 KB
/
flake.nix
File metadata and controls
57 lines (45 loc) · 1.56 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
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
outputs-builder = channels: {
devShells = {
default = channels.nixpkgs.mkShell {
ESBUILD_BINARY_PATH = "${channels.nixpkgs.esbuild}/bin/esbuild";
packages = with channels.nixpkgs; [
esbuild
];
};
};
packages = rec {
default = snowfall-docs;
# NOTE: This is currently broken due to esbuild complaining about a mismatched
# binary version. This seems to be caused by vite specifying exactly version 0.18.20
# regardless of what this package may require.
# snowfall-docs = channels.nixpkgs.buildNpmPackage {
# pname = "snowfall-docs";
# src = ./.;
# version = inputs.self.sourceInfo.shortRev or "dirty";
# npmDepsHash = "sha256-sLKRNWwhRb9uyxJHC5xWC7PKl1nBj30RFgBm7m5dzgc=";
# npmFlags = ["--ignore-scripts" "--legacy-peer-deps"];
# ESBUILD_BINARY_PATH = "${channels.nixpkgs.esbuild}/bin/esbuild";
# installPhase = ''
# mv dist $out
# '';
# };
snowfall-docs = channels.nixpkgs.runCommandNoCC "snowfall-docs" {} ''
cp -r ${./dist} $out
'';
};
};
};
}