Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
55 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,5 @@ pkgs: _: with pkgs; { | |
buildPackages | ||
; | ||
}; | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,40 @@ | ||
{ system ? builtins.currentSystem | ||
, crossSystem ? null | ||
# allows to customize haskellNix (ghc and profiling, see ./nix/haskell.nix) | ||
, config ? {} | ||
, pkgs ? import ../../nix { inherit system config; } | ||
, buildTools ? with pkgs; [ git nix gnumake ] | ||
# allows to override dependencies of the project without modifications, | ||
# eg. to test build against local checkout of iohk-nix: | ||
# nix build -f default.nix cardano-prelude --arg sourcesOverride '{ | ||
# iohk-nix = ../iohk-nix; | ||
# }' | ||
, sourcesOverride ? {} | ||
# pinned version of nixpkgs augmented with overlays (iohk-nix and our packages). | ||
, pkgs ? import ./nix { inherit system crossSystem config sourcesOverride; } | ||
, gitrev ? pkgs.iohkNix.commitIdFromGitRepoOrZero ./.git | ||
}: | ||
with pkgs; with commonLib; | ||
let | ||
|
||
with pkgs.lib; | ||
with pkgs; | ||
haskellPackages = recRecurseIntoAttrs | ||
# we are only interested in listing the project packages: | ||
(selectProjectPackages cardanoPreludeHaskellPackages); | ||
|
||
let | ||
cache-s3 = callPackage ./cache-s3.nix {}; | ||
self = { | ||
inherit haskellPackages; | ||
|
||
# `tests` are the test suites which have been built. | ||
tests = collectComponents' "tests" haskellPackages; | ||
# `benchmarks` (only built, not run). | ||
benchmarks = collectComponents' "benchmarks" haskellPackages; | ||
|
||
stackRebuild = runCommand "stack-rebuild" {} '' | ||
${haskellPackages.ghcWithPackages (ps: [ps.turtle ps.safe ps.transformers])}/bin/ghc -o $out ${./rebuild.hs} | ||
''; | ||
checks = recurseIntoAttrs { | ||
# `checks.tests` collect results of executing the tests: | ||
tests = collectChecks haskellPackages; | ||
}; | ||
|
||
in | ||
writeScript "stack-rebuild-wrapped" '' | ||
#!${stdenv.shell} | ||
export PATH=${lib.makeBinPath ([ cache-s3 stack gnused coreutils gnutar gzip ] ++ buildTools)} | ||
exec ${stackRebuild} "$@" | ||
'' | ||
shell = import ./shell.nix { | ||
inherit pkgs; | ||
withHoogle = true; | ||
}; | ||
}; | ||
in self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.