-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
115 lines (97 loc) · 3.17 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
description = "agora-purescript-bridge";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
liqwid-nix = {
url = "github:Liqwid-Labs/liqwid-nix/v2.7.2";
inputs.nixpkgs-latest.follows = "nixpkgs-latest";
};
nixpkgs.url = "github:NixOS/nixpkgs";
nixpkgs-ctl.follows = "cardano-transaction-lib/nixpkgs";
nixpkgs-latest.url = "github:NixOS/nixpkgs?rev=a2494bf2042d605ca1c4a679401bdc4971da54fb";
cardano-transaction-lib = {
type = "github";
owner = "Plutonomicon";
repo = "cardano-transaction-lib";
# NOTE
# This should match the same revision as the one in your `packages.dhall` to ensure
# the greatest compatibility
ref = "v5.0.0";
};
liqwid-ctl-extra = {
url = "git+ssh://[email protected]/Liqwid-Labs/liqwid-ctl-extra.git";
inputs = {
ctl.follows = "cardano-transaction-lib";
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = inputs@{ self, liqwid-nix, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.liqwid-nix.flakeModule
];
systems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ];
perSystem = { config, pkgs', self', inputs', system, ... }:
let
pkgs = import inputs.nixpkgs-latest {
inherit system;
overlays = [
inputs.cardano-transaction-lib.overlays.purescript
inputs.cardano-transaction-lib.overlays.runtime
inputs.cardano-transaction-lib.overlays.spago
];
};
in
{
pre-commit = {
settings = {
src = ./.;
excludes = [ "spago-packages.nix" ];
hooks = {
nixpkgs-fmt.enable = true;
purs-tidy.enable = true;
dhall-format.enable = true;
};
};
};
offchain.default = {
src = ./.;
spagoOverride = {
"liqwid-ctl-extra" = inputs.liqwid-ctl-extra;
};
packageLock = ./package-lock.json;
packageJson = ./package.json;
runtime = {
enableCtlServer = false;
exposeConfig = false;
};
ignoredWarningCodes = [
"ImplicitImport"
"UserDefinedWarning"
"WildcardInferredType"
];
shell.extraCommandLineTools = [
pkgs.dhall
pkgs.fd
pkgs.nodejs
pkgs.nodePackages.npm
pkgs.xdg-utils
pkgs.gnumake
];
enableFormatCheck = true;
# NOTE(Emily, 16 Jan 2023): Low priority. This is kinda broken right now.
#
# TypeScript lint checking is non-trivial with nix.
enableJsLintCheck = false;
plutip = { testMain = "Test.Main"; };
tests = { testMain = "Test.Main"; };
};
ci.required = [ "all_offchain" ];
};
flake.hydraJobs.x86_64-linux = (
self.checks.x86_64-linux
// self.packages.x86_64-linux
);
};
}