Skip to content

Commit 8b55498

Browse files
committed
ci: update nix ci
1 parent d938337 commit 8b55498

File tree

8 files changed

+120
-46
lines changed

8 files changed

+120
-46
lines changed

nixpkgs/github.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"owner": "NixOS",
33
"repo": "nixpkgs",
4-
"branch": "nixos-20.09",
4+
"branch": "nixpkgs-unstable",
55
"private": false,
6-
"rev": "068984c00e0d4e54b6684d98f6ac47c92dcb642e",
7-
"sha256": "00j4xv4lhhqwry7jd67brnws4pwb8vn660n43pvxpkalbpxszwfg"
6+
"rev": "c7eb65213bd7d95eafb8c5e2e181f04da103d054",
7+
"sha256": "1glf6j13hbwi459qrc8kkkhfw27a08vdg17sr3zwhadg4bkxz5ia"
88
}

nixpkgs/thunk.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
33
if !fetchSubmodules && !private then builtins.fetchTarball {
44
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5-
} else (import <nixpkgs> {}).fetchFromGitHub {
5+
} else (import (builtins.fetchTarball {
6+
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7+
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8+
}) {}).fetchFromGitHub {
69
inherit owner repo rev sha256 fetchSubmodules private;
710
};
811
json = builtins.fromJSON (builtins.readFile ./github.json);

reflex-platform/default.nix

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# DO NOT HAND-EDIT THIS FILE
2+
import (import ./thunk.nix)

reflex-platform/github.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"owner": "reflex-frp",
3+
"repo": "reflex-platform",
4+
"branch": "release/1.0.1.0",
5+
"private": false,
6+
"rev": "50099ce2bca93ef69cea615ec72152b4a7648de4",
7+
"sha256": "1ldzf3qznpysf4drkrvj7ysmdvrv6ddprnniylvcxccpp0f4krb7"
8+
}

reflex-platform/thunk.nix

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# DO NOT HAND-EDIT THIS FILE
2+
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
3+
if !fetchSubmodules && !private then builtins.fetchTarball {
4+
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
5+
} else (import (builtins.fetchTarball {
6+
url = "https://github.com/NixOS/nixpkgs/archive/3aad50c30c826430b0270fcf8264c8c41b005403.tar.gz";
7+
sha256 = "0xwqsf08sywd23x0xvw4c4ghq0l28w2ki22h0bdn766i16z9q2gr";
8+
}) {}).fetchFromGitHub {
9+
inherit owner repo rev sha256 fetchSubmodules private;
10+
};
11+
json = builtins.fromJSON (builtins.readFile ./github.json);
12+
in fetch json

release.nix

+81-42
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,93 @@
1-
{ pkgs ? import ./nixpkgs {}
2-
, supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
1+
{ reflex-platform ? import ./reflex-platform
32
}:
43
let
4+
pkgs = (reflex-platform {}).nixpkgs;
5+
supportedSystems = [ "x86_64-linux" "x86_64-darwin" ];
56
inherit (pkgs) lib;
6-
sharedOverrides = self: super: {
7+
haskellLib = pkgs.haskell.lib;
8+
commonOverrides = self: super: {
9+
vty = self.callHackageDirect {
10+
pkg = "vty";
11+
ver = "5.38";
12+
sha256 = "0kcd3ln9xmc62ka0i7habzvjjar8z63mlvl15rdhf8hqmda0b7r7";
13+
} {};
714
reflex-vty = self.callHackageDirect {
815
pkg = "reflex-vty";
9-
ver = "0.2.0.0";
10-
sha256 = "1vb38qx1a6l28i4wd1g48qqmymlzivq7lwmxbywjs0b36ynsnfk8";
11-
} {};
12-
reflex = self.callHackageDirect {
13-
pkg = "reflex";
14-
ver = "0.8.1.1";
15-
sha256 = "1sdakz8rgdhvrcq004926dmbwlmhmv7wsw9h7f8klnvdsydm7dh7";
16-
} {};
17-
patch = self.callHackageDirect {
18-
pkg = "patch";
19-
ver = "0.0.4.0";
20-
sha256 = "1x1rbi51r5gvbkg96884c2py7in4n0ijh5ins8ya3b5kga32siq4";
16+
ver = "0.4.1.1";
17+
sha256 = "1dzkfhfwifl47fvvzd40yqvyckpc3q6d9g18az9mqlbxfhszfb45";
2118
} {};
2219
};
20+
ghcs = lib.genAttrs supportedSystems (system: let
21+
rp = reflex-platform { inherit system; __useNewerCompiler = true; };
22+
rpGhc810 = rp.ghc.override {
23+
overrides = commonOverrides;
24+
};
25+
rpOld = reflex-platform { inherit system; __useNewerCompiler = false; };
26+
rpGhc865 = rpOld.ghc.override {
27+
overrides = commonOverrides;
28+
};
2329

24-
ghcs = {
25-
ghc865 = pkgs.haskell.packages.ghc865.override {
26-
overrides = self: super: sharedOverrides self super // {
27-
ghc-lib-parser = self.callHackageDirect {
28-
pkg = "ghc-lib-parser";
29-
ver = "8.8.4.20210620";
30-
sha256 = "17y7f5h1mrfyblaz0ipws04a4z11vnwkfvzzk8mkyrkz4am1a8fp";
31-
} {};
32-
ghc-lib-parser-ex = self.callHackageDirect {
33-
pkg = "ghc-lib-parser-ex";
34-
ver = "8.8.5.8";
35-
sha256 = "1avdm9fzgk59xzq5xv5rlnncq4vgqsf3jyf46889cf7gcfb40aff";
36-
} {};
37-
hlint = self.callHackageDirect {
38-
pkg = "hlint";
39-
ver = "2.2.11";
40-
sha256 = "0v4axmqb3zwzznyvhiqbr50k23ah63sd9gsmi5sa2p97hch8kwx1";
30+
nixGhc961 = (import ./nixpkgs { inherit system; }).haskell.packages.ghc961.override {
31+
overrides = self: super: commonOverrides self super // {
32+
patch = self.callHackageDirect {
33+
pkg = "patch";
34+
ver = "0.0.8.2";
35+
sha256 = "160zqqhjg48fr3a33gffd82qm3728c8hwf8sn37pbpv82fw71rzg";
4136
} {};
4237

38+
reflex = self.callHackageDirect {
39+
pkg = "reflex";
40+
ver = "0.9.0.1";
41+
sha256 = "1yrcashxxclvlvv3cs5gv75rvlsg1gb0m36kssnk2zvhbh94240y";
42+
} {};
43+
these-lens = self.callHackageDirect {
44+
pkg = "these-lens";
45+
ver = "1.0.1.3";
46+
sha256 = "0n1vkr57jz5yvy4jm15v5cs42rp342ni0gisib7aqyhibpicqs5c";
47+
} {};
48+
these = self.callHackageDirect {
49+
pkg = "these";
50+
ver = "1.2";
51+
sha256 = "1iaaq1fsvg8c3l0czcicshkmbbr00hnwkdamjbkljsa1qvlilaf0";
52+
} {};
53+
lens = self.callHackageDirect {
54+
pkg = "lens";
55+
ver = "5.2.2";
56+
sha256 = "0c4a421sxfjm1cj3nvgwkr4glll23mqnsvs2iv5qh85931h2f3cy";
57+
} {};
58+
59+
assoc = self.callHackageDirect {
60+
pkg = "assoc";
61+
ver = "1.1";
62+
sha256 = "1krvcafrbj98z5hv55gq4zb1in5yd71nmz9zdiqgnywjzbrvpf75";
63+
} {};
64+
65+
strict = self.callHackageDirect {
66+
pkg = "strict";
67+
ver = "0.5";
68+
sha256 = "02iyvrr7nd7fnivz78lzdchy8zw1cghqj1qx2yzbbb9869h1mny7";
69+
} {};
70+
vty = self.callHackageDirect {
71+
pkg = "vty";
72+
ver = "5.38";
73+
sha256 = "0kcd3ln9xmc62ka0i7habzvjjar8z63mlvl15rdhf8hqmda0b7r7";
74+
} {};
75+
76+
77+
# Jailbroken until https://github.com/audreyt/string-qq/pull/3
78+
string-qq = haskellLib.dontCheck super.string-qq;
79+
# Tests aren't compatible with transformers-0.6
80+
bimap = haskellLib.dontCheck super.bimap;
81+
exception-transformers = haskellLib.doJailbreak (haskellLib.dontCheck super.exception-transformers);
82+
4383
};
4484
};
45-
ghc884 = pkgs.haskell.packages.ghc884.override {
46-
overrides = sharedOverrides;
47-
};
48-
ghc8104 = pkgs.haskell.packages.ghc8104.override {
49-
overrides = sharedOverrides;
50-
};
51-
};
52-
in
53-
lib.mapAttrs (_: ghc: ghc.callCabal2nix "reflex-process" ./. {}) ghcs
54-
85+
in
86+
{
87+
recurseForDerivations = true;
88+
ghc865 = rpGhc865.callCabal2nix "reflex-process" (import ./src.nix) {};
89+
ghc810 = rpGhc810.callCabal2nix "reflex-process" (import ./src.nix) {};
90+
ghc961 = nixGhc961.callCabal2nix "reflex-process" (import ./src.nix) {};
91+
});
92+
in
93+
ghcs

shell.nix

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{ system ? builtins.currentSystem }:
2+
(import ./release.nix {}).${system}.ghc810.env

src.nix

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
2+
"release.nix"
3+
".git"
4+
"dist"
5+
"cabal.haskell-ci"
6+
"cabal.project"
7+
".travis.yml"
8+
])) ./.

0 commit comments

Comments
 (0)