Skip to content

Commit c94a6b9

Browse files
committed
Merge branch 'modernize-reflease.nix' into ignore-traverse_
2 parents 52eee43 + a5f07e8 commit c94a6b9

File tree

7 files changed

+58
-116
lines changed

7 files changed

+58
-116
lines changed

default.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@
77
, transformers-compat, unbounded-delays, prim-uniq
88
, data-default, filepath, directory, filemanip, ghcjs-base
99
, monoidal-containers, witherable, profunctors
10-
, semialign ? null, splitThese ? (semialign != null)
10+
, splitThese ? (semialign != null), semialign ? null, these-lens ? null
1111
, useTemplateHaskell ? true
1212
}:
1313
mkDerivation {
1414
pname = "reflex";
1515
version = "0.6.2.4";
16-
src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [ ".git" "dist" ])) ./.;
16+
src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
17+
"default.nix"
18+
"release.nix"
19+
".git"
20+
"dist"
21+
])) ./.;
1722
libraryHaskellDepends = [
1823
base bifunctors containers dependent-map dependent-sum
1924
exception-transformers lens
@@ -30,6 +35,7 @@ mkDerivation {
3035
haskell-src-exts haskell-src-meta
3136
]) ++ (if splitThese then [
3237
semialign
38+
these-lens
3339
] else []);
3440
testHaskellDepends = if ghc.isGhcjs or false then [] else [
3541
hlint filepath directory filemanip

dep/reflex-platform/default.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# DO NOT HAND-EDIT THIS FILE
2+
import ((import <nixpkgs> {}).fetchFromGitHub (
3+
let json = builtins.fromJSON (builtins.readFile ./github.json);
4+
in { inherit (json) owner repo rev sha256;
5+
private = json.private or false;
6+
}
7+
))

dep/reflex-platform/github.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"owner": "reflex-frp",
3+
"repo": "reflex-platform",
4+
"branch": "jailbreakTheselens",
5+
"rev": "4284ed527c96c373538dc7e31776d9a50ca6aa91",
6+
"sha256": "1m1nkxq7ng9wnqbd77xn8d81f2iz8g61y5m0r3gp0gi0q59jm8ay"
7+
}

hydra.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

jobsets.nix

Lines changed: 0 additions & 70 deletions
This file was deleted.

reflex-platform.nix

Lines changed: 0 additions & 8 deletions
This file was deleted.

release.nix

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
1-
{ rp ? import ./reflex-platform.nix {}
1+
{ reflex-platform-fun ? import ./dep/reflex-platform
22
}:
3+
34
let
4-
inherit (rp.nixpkgs) lib;
5-
compilers = ["ghc8_4" "ghc8_0" "ghcjs8_4" "ghcjs8_0"];
6-
in lib.attrValues (lib.genAttrs compilers (ghc: {
7-
reflex-useTemplateHaskell = rp.${ghc}.callPackage ./. { useTemplateHaskell = true; splitThese = false; };
8-
reflex = rp.${ghc}.callPackage ./. { useTemplateHaskell = false; splitThese = false; };
9-
}))
5+
native-reflex-platform = reflex-platform-fun {};
6+
inherit (native-reflex-platform.nixpkgs) lib;
7+
systems = ["x86_64-linux" "x86_64-darwin"];
8+
9+
perPlatform = lib.genAttrs systems (system: let
10+
reflex-platform = reflex-platform-fun { inherit system; };
11+
compilers = [
12+
"ghc"
13+
"ghcjs"
14+
] ++ lib.optionals (reflex-platform.androidSupport) [
15+
"ghcAndroidAarch64"
16+
"ghcAndroidAarch32"
17+
] ++ lib.optionals (reflex-platform.iosSupport) [
18+
"ghcIosAarch64"
19+
];
20+
hsPkgs = lib.genAttrs compilers (ghc: let
21+
ghc' = reflex-platform.${ghc}.override {
22+
overrides = self: super: {
23+
reflex-dontUseTemplateHaskell = self.callPackage ./. { useTemplateHaskell = false; };
24+
reflex = self.callPackage ./. { useTemplateHaskell = true; };
25+
};
26+
};
27+
in {
28+
inherit (ghc') reflex reflex-dontUseTemplateHaskell;
29+
});
30+
in hsPkgs // {
31+
cache = reflex-platform.pinBuildInputs "reflex-${system}"
32+
(lib.concatLists (map builtins.attrValues (builtins.attrValues hsPkgs)));
33+
});
34+
35+
metaCache = native-reflex-platform.pinBuildInputs "reflex-everywhere"
36+
(map (a: a.cache) (builtins.attrValues perPlatform));
37+
38+
in perPlatform // { inherit metaCache; }

0 commit comments

Comments
 (0)