on develop help sign in
Fix release.nix so TH doesn't break
commitf03b9c1018ae57678584a40f892516d05a26a202 authorJohn Ericson <John.Ericson@Obsidian.Systems> dateFri 17 Jan 2020, 13:34 (7 years ago) parent99b2cb6
3 files changed+30−18
dep/reflex-platform/default.nix+7−6 dep/reflex-platform/github.json+3−2 release.nix+20−10
dep/reflex-platform/default.nix+7−6
@@ -1,7 +1,8 @@
11# 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−))
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 <nixpkgs> {}).fetchFromGitHub {
6+ inherit owner repo rev sha256 fetchSubmodules private;
7+ };
8+in import (fetch (builtins.fromJSON (builtins.readFile ./github.json)))
dep/reflex-platform/github.json+3−2
@@ -2,6 +2,7 @@
22 "owner": "reflex-frp",
33 "repo": "reflex-platform",
44 "branch": "master",
5− "rev": "510b990d0b11f0626afbec5fe8575b5b2395391b",
6− "sha256": "09cmahsbxr0963wq171c7j139iyzz49hramr4v9nsf684wcwkngv"
5+ "private": false,
6+ "rev": "c9d11db1b98855fe8ab24a3ff6a5dbe0ad902ad9",
7+ "sha256": "0sfzkqdvyah5mwvmli0wq1nl0b8cvk2cmfgfy4rz57wv42x3099y"
78}
release.nix+20−10
@@ -18,16 +18,26 @@ let
1818 "ghcIosAarch64"
1919 ];
2020 compilerPkgs = lib.genAttrs compilers (ghc: let
21− src = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
22− "release.nix"
23− ".git"
24− "dist"
25− "dist-newstyle"
26− "cabal.haskell-ci"
27− "cabal.project"
28− ".travis.yml"
29− ])) ./.;
30− in reflex-platform.${ghc}.callCabal2nix "patch" src {});
21+ reflex-platform = reflex-platform-fun {
22+ inherit system;
23+ haskellOverlays = [
24+ # Use this package's source for reflex
25+ (self: super: {
26+ _dep = super._dep // {
27+ patch = builtins.filterSource (path: type: !(builtins.elem (baseNameOf path) [
28+ "release.nix"
29+ ".git"
30+ "dist"
31+ "dist-newstyle"
32+ "cabal.haskell-ci"
33+ "cabal.project"
34+ ".travis.yml"
35+ ])) ./.;
36+ };
37+ })
38+ ];
39+ };
40+ in reflex-platform.${ghc}.patch);
3141 in compilerPkgs // {
3242 cache = reflex-platform.pinBuildInputs "patch-${system}"
3343 (builtins.attrValues compilerPkgs);