File tree Expand file tree Collapse file tree 7 files changed +34
-20
lines changed Expand file tree Collapse file tree 7 files changed +34
-20
lines changed Original file line number Diff line number Diff line change 1
1
let
2
2
repo = builtins . toString ./.. ;
3
3
in
4
- with ( import ./project.nix ) ; rec {
4
+ with ( import ./project.nix { } ) ; rec {
5
5
pkgBin = pkg : "${ pkgs . ${ pkg } } /bin/${ pkg } " ;
6
6
nix-bundle = pkgs . nix-bundle . overrideAttrs ( attrs : {
7
7
buildInputs =
Original file line number Diff line number Diff line change 1
- let
1
+ { crossSystem ? null } : let
2
2
# Read in the Niv sources
3
3
sources = import ./sources.nix { } ;
4
4
# If ./nix/sources.nix file is not found run:
21
21
# the haskell.nix functionality itself as an overlay.
22
22
haskellNix . nixpkgsArgs ;
23
23
24
+ # Apply crossSystem if needed
25
+ next =
26
+ if crossSystem == null
27
+ then pkgs
28
+ else
29
+ import haskellNix . sources . nixpkgs-unstable (
30
+ haskellNix . nixpkgsArgs
31
+ // {
32
+ crossSystem = pkgs . lib . systems . examples . "${ crossSystem } " ;
33
+ }
34
+ ) ;
35
+
24
36
# Nixpkgs overlay to fix haskell tdlib bindings.
25
37
pkgs = prev . extend (
26
- next : prev : { tdjson = prev . tdlib ; }
38
+ _ : x : { tdjson = x . tdlib ; }
27
39
) ;
28
40
in
29
- pkgs . haskell-nix . project {
41
+ next . haskell-nix . project {
30
42
# 'cleanGit' cleans a source directory based on the files known by git
31
43
src = pkgs . haskell-nix . haskellLib . cleanGit {
32
44
name = "functora" ;
33
45
src = ./.. ;
34
46
} ;
35
47
# Specify the GHC version to use.
36
- compiler-nix-name = "ghc948" ; # Not required for `stack.yaml` based projects.
48
+ #
49
+ # NOTE : Fallback from 948 to 928 for aarch64 cross support.
50
+ #
51
+ compiler-nix-name = "ghc928" ; # Not required for `stack.yaml` based projects.
37
52
projectFileName = "cabal.project" ;
38
53
}
Original file line number Diff line number Diff line change 1
- with ( import ./project.nix ) ; let
1
+ with ( import ./project.nix { } ) ; let
2
2
misc = import ./misc.nix ;
3
3
newpkgs = import ./newpkgs.nix ;
4
4
in
Original file line number Diff line number Diff line change 1
- with ( import ./project.nix ) ;
1
+ with ( import ./project.nix { } ) ;
2
2
with pkgs ; let
3
3
newpkgs = import ./newpkgs.nix ;
4
4
repoDir = builtins . toString ./.. ;
Submodule prv updated from 575e4f6 to 177320b
Original file line number Diff line number Diff line change 1
- with ( import ./../../../nix/project.nix ) ;
2
- with pkgs ;
3
- let pkgDir = builtins . toString ./.. ;
4
- ghcidDazzleMain = writeShellScriptBin "ghcid-dazzle-main" ''
5
- (cd ${ pkgDir } && ${ ghcid } /bin/ghcid --command="${ hpack } /bin/hpack ${ pkgDir } && cabal new-repl dazzle-exe --disable-optimization --repl-options=-fobject-code --repl-options=-fno-break-on-exception --repl-options=-fno-break-on-error --repl-options=-v1 --repl-options=-ferror-spans --repl-options=-j -fghcid")
6
- '' ;
7
- ghcidDazzleTest = writeShellScriptBin "ghcid-dazzle-test" ''
8
- (cd ${ pkgDir } && ${ ghcid } /bin/ghcid --test=":main --fail-fast --color -f failed-examples" --command="${ hpack } /bin/hpack ${ pkgDir } && cabal new-repl dazzle-test --disable-optimization --repl-options=-fobject-code --repl-options=-fno-break-on-exception --repl-options=-fno-break-on-error --repl-options=-v1 --repl-options=-ferror-spans --repl-options=-j -fghcid")
9
- '' ;
10
- in
11
- [
1
+ with ( import ./../../../nix/project.nix { } ) ;
2
+ with pkgs ; let
3
+ pkgDir = builtins . toString ./.. ;
4
+ ghcidDazzleMain = writeShellScriptBin "ghcid-dazzle-main" ''
5
+ (cd ${ pkgDir } && ${ ghcid } /bin/ghcid --command="${ hpack } /bin/hpack ${ pkgDir } && cabal new-repl dazzle-exe --disable-optimization --repl-options=-fobject-code --repl-options=-fno-break-on-exception --repl-options=-fno-break-on-error --repl-options=-v1 --repl-options=-ferror-spans --repl-options=-j -fghcid")
6
+ '' ;
7
+ ghcidDazzleTest = writeShellScriptBin "ghcid-dazzle-test" ''
8
+ (cd ${ pkgDir } && ${ ghcid } /bin/ghcid --test=":main --fail-fast --color -f failed-examples" --command="${ hpack } /bin/hpack ${ pkgDir } && cabal new-repl dazzle-test --disable-optimization --repl-options=-fobject-code --repl-options=-fno-break-on-exception --repl-options=-fno-break-on-error --repl-options=-v1 --repl-options=-ferror-spans --repl-options=-j -fghcid")
9
+ '' ;
10
+ in [
12
11
ghcidDazzleMain
13
12
ghcidDazzleTest
14
13
]
Original file line number Diff line number Diff line change 1
- with ( import ./../../../nix/project.nix ) ;
1
+ with ( import ./../../../nix/project.nix { } ) ;
2
2
with pkgs ; let
3
3
cabal = "${ pkgs . cabal-install } /bin/cabal" ;
4
4
pkgDir = builtins . toString ./.. ;
You can’t perform that action at this time.
0 commit comments