-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
flake.nix
61 lines (54 loc) · 2.14 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
description = "todomvc-nix";
# To update all inputs:
# $ nix flake update --recreate-lock-file
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.devshell.url = "github:numtide/devshell/main";
# Rust dependencies
inputs.naersk.url = "github:nmattia/naersk";
inputs.naersk.inputs.nixpkgs.follows = "nixpkgs";
# Only for example, use the .url for simplicity
inputs.mozilla-overlay.url = "github:mozilla/nixpkgs-mozilla";
# Haskell dependencies
# This is haskell's dependencies for both Haskell backend and frontend.
inputs.polysemy = { url = "github:polysemy-research/polysemy"; flake = false; };
inputs.http-media = { url = "github:zmthy/http-media/develop"; flake = false; };
inputs.servant = { url = "github:haskell-servant/servant"; flake = false; };
inputs.servant-jsaddle = { url = "github:haskell-servant/servant-jsaddle/master"; flake = false; };
# Miso uses its own nixpkgs, thus we imported it to use its pinned nixpkgs on the `overlay.nix`.
inputs.miso = { url = "github:dmjio/miso/master"; flake = false; };
outputs = { self, nixpkgs, naersk, mozilla-overlay, flake-utils, devshell, polysemy, http-media, servant, miso, servant-jsaddle }:
{
overlay = import ./overlay.nix { inherit polysemy http-media servant miso servant-jsaddle; };
}
//
(
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs {
inherit system;
# Makes the config pure as well. See <nixpkgs>/top-level/impure.nix:
config = {
allowBroken = true;
permittedInsecurePackages = [
"openssl-1.0.2u"
];
};
overlays = [
mozilla-overlay.overlay
devshell.overlays.default
naersk.overlay
self.overlay
];
};
in
{
legacyPackages = pkgs.todomvc;
packages = flake-utils.lib.flattenTree pkgs.todomvc;
devShell = import ./devshell.nix { inherit pkgs; };
checks = { };
}
)
);
}