forked from dhall-lang/dhall-lang
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.nix
84 lines (63 loc) · 1.85 KB
/
release.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
{ src ? { rev = ""; }, ... }:
let
nixpkgs = import ./nixops/nixpkgs.nix;
overlay = import ./nixops/overlay.nix;
config = {
permittedInsecurePackages = [
"python2.7-cryptography-2.9.2"
];
};
pkgs = import nixpkgs { inherit config; overlays = [ overlay ]; };
# Derivation that trivially depends on the input source code revision.
# As this is included in the "dhall-lang" aggregate, it forces every
# commit to have a corresponding GitHub status check, even if the
# commit doesn't make any changes (which can happen when merging
# master in).
rev = pkgs.runCommand "rev" {} ''echo "${src.rev}" > $out'';
machine =
(import "${nixpkgs}/nixos" {
configuration = {
imports = [ ./nixops/logical.nix ./nixops/physical.nix ];
networking.hostName = "dhall-lang";
};
system = "x86_64-linux";
}).system;
inherit (pkgs.haskellPackages) standard;
vm =
(import "${nixpkgs}/nixos" {
configuration = {
imports = [
./nixops/logical.nix
./nixops/physical.nix
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
];
networking.hostName = "dhall-lang";
systemd.services.self-deploy.enable = false;
users = {
mutableUsers = false;
users.root.password = "";
};
virtualisation = {
cores = 2;
memorySize = 4096;
};
};
system = "x86_64-linux";
}).vm;
in
{ dhall-lang = pkgs.releaseTools.aggregate {
name = "dhall-lang";
constituents = [
pkgs.dhall-grammar
pkgs.ensure-trailing-newlines
pkgs.prelude-lint
pkgs.test-files-lint
standard
machine
vm
rev
];
};
inherit (pkgs) expected-prelude expected-test-files docs website store;
inherit machine vm standard;
}