This repository was archived by the owner on Aug 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +27
-14
lines changed Expand file tree Collapse file tree 5 files changed +27
-14
lines changed Original file line number Diff line number Diff line change 41
41
# parameterize this file when targetting different
42
42
# hosts.
43
43
{ system ? builtins . currentSystem
44
+ , crossSystem ? null
44
45
, config ? { }
45
- , pkgs ? commonLib . getPkgs { inherit config system ; }
46
- , ... } @args :
47
- # We will instantiate the default-nix template with the
48
- # nix/pkgs.nix file...
49
- commonLib . nix-tools . default-nix ./nix/pkgs.nix args
50
- # ... and add additional non-haskell packages we want to build on CI:
51
- // {
46
+ , pkgs ? commonLib . getPkgs { inherit config crossSystem system ; }
47
+ , withHoogle ? true
48
+ } :
49
+ let
50
+ # We will instantiate the default-nix template with the
51
+ # nix/pkgs.nix file...
52
+ defaultNix = commonLib . nix-tools . default-nix ./nix/pkgs.nix {
53
+ inherit system crossSystem config pkgs ;
54
+ } ;
55
+ in defaultNix // {
56
+ # ... and add additional packages we want to build on CI:
57
+
58
+ env = defaultNix . nix-tools . shellFor {
59
+ inherit withHoogle ;
60
+ # env will provide the dependencies of cardano-shell
61
+ packages = ps : with ps ; [ cardano-shell ] ;
62
+ # This adds git to the shell, which is used by stack.
63
+ buildInputs = with pkgs ; [ git stack commonLib . stack-hpc-coveralls ] ;
64
+ } ;
52
65
53
66
runCoveralls = pkgs . stdenv . mkDerivation {
54
67
name = "run-coveralls" ;
55
- buildInputs = with pkgs ; [ haskellPackages . stack-hpc-coveralls stack ] ;
68
+ buildInputs = with pkgs ; [ commonLib . stack-hpc-coveralls stack ] ;
56
69
shellHook = ''
57
70
echo '~~~ stack test'
58
71
stack test --coverage
Original file line number Diff line number Diff line change 1
1
{
2
2
"url" : " https://github.com/input-output-hk/iohk-nix" ,
3
- "rev" : " 5040e0192871203251ed404edb3c9259c18bc7e1 " ,
4
- "date" : " 2019-05-20T19:03:56-03 :00" ,
5
- "sha256" : " 1ah1njfj906068g0z10x5ldphcx4l1dx7y026vhmqyjhyqgml88q " ,
3
+ "rev" : " 8a7faeddf108515a8d64cb3dcf552bbd432865a3 " ,
4
+ "date" : " 2019-05-31T03:32:45+00 :00" ,
5
+ "sha256" : " 0cjsnzfnyhbvjvw9lk2z6bznjnpq452d629319km29yvqqg2n9yk " ,
6
6
"fetchSubmodules" : false
7
7
}
Original file line number Diff line number Diff line change 1
1
let
2
2
localPkgs = import ./. { } ;
3
- mainShell = localPkgs . nix-tools . libs . cardano-shell ;
3
+ mainShell = localPkgs . env ;
4
4
in mainShell // {
5
5
inherit ( localPkgs ) runCoveralls ;
6
6
}
Original file line number Diff line number Diff line change
1
+ ( import ./. { withHoogle = false ; } ) . env
Original file line number Diff line number Diff line change @@ -96,5 +96,4 @@ extra-deps:
96
96
97
97
nix :
98
98
enable : true
99
- pure : false
100
- shell-file : shell.nix
99
+ shell-file : stack-shell.nix
You can’t perform that action at this time.
0 commit comments