This repository was archived by the owner on Aug 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-25
lines changed Expand file tree Collapse file tree 3 files changed +21
-25
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
- , config ? { } , ... } @args :
44
+ , config ? { }
45
+ , pkgs ? commonLib . getPkgs { inherit config system ; }
46
+ , ... } @args :
45
47
# We will instantiate the default-nix template with the
46
48
# nix/pkgs.nix file...
47
49
commonLib . nix-tools . default-nix ./nix/pkgs.nix args
48
50
# ... and add additional non-haskell packages we want to build on CI:
49
51
// {
50
- cardano-shell-env = ( import ./stack-shell.nix { inherit config system ; } ) ;
52
+
53
+ stack-env = pkgs . runCommand "stack-env" {
54
+ buildInputs = with pkgs ; [ haskell . packages . ghc863 . ghc zlib openssl git ] ;
55
+ } "mkdir $out" ;
56
+
57
+ runCoveralls = pkgs . stdenv . mkDerivation {
58
+ name = "run-coveralls" ;
59
+ buildInputs = with pkgs ; [ haskellPackages . stack-hpc-coveralls stack ] ;
60
+ shellHook = ''
61
+ echo '~~~ stack test'
62
+ stack test --coverage
63
+ echo '~~~ shc'
64
+ shc --repo-token=$COVERALLS_REPO_TOKEN cardano-shell cardano-shell-test
65
+ exit
66
+ '' ;
67
+ } ;
51
68
}
Original file line number Diff line number Diff line change 1
- let
2
- commonLib = import ./nix/iohk-common.nix ;
3
- in
4
1
{ system ? builtins . currentSystem
5
2
, config ? { }
6
3
, localPkgs ? import ./. { inherit config system ; }
7
- , pkgs ? commonLib . getPkgs { inherit config system ; }
8
4
} :
9
5
let
10
6
mainShell = localPkgs . nix-tools . libs . cardano-shell . env ;
11
- runCoveralls = pkgs . stdenv . mkDerivation {
12
- name = "run-coveralls" ;
13
- buildInputs = [ pkgs . haskellPackages . stack-hpc-coveralls pkgs . stack ] ;
14
- shellHook = ''
15
- echo '~~~ stack test'
16
- stack test --coverage
17
- echo '~~~ shc'
18
- shc --repo-token=$COVERALLS_REPO_TOKEN cardano-shell cardano-shell-test
19
- exit
20
- '' ;
21
- } ;
22
7
in mainShell // {
23
- inherit runCoveralls ;
8
+ inherit ( localPkgs ) runCoveralls ;
24
9
}
Original file line number Diff line number Diff line change 1
1
{ system ? builtins . currentSystem
2
2
, config ? { }
3
- , localPkgs ? import ./. { inherit config system ; }
4
- , pkgs ? localPkgs . _lib . getPkgs { inherit config system ; }
5
3
} :
6
- with pkgs ; haskell . lib . buildStackProject {
7
- name = "cardano-shell-env" ;
8
- buildInputs = [ zlib openssl git ] ;
9
- ghc = haskell . packages . ghc863 . ghc ;
10
- }
4
+ ( import ./default.nix { inherit system config ; } ) . stack-env
You can’t perform that action at this time.
0 commit comments