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
6 changed files
with
99 additions
and
96 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ supportedSystems ? ["x86_64-linux"] | ||
, supportedCompilers ? ["ghc7103" "ghc802"] | ||
}: | ||
|
||
with (import <nixpkgs/pkgs/top-level/release-lib.nix> { inherit supportedSystems; }); | ||
|
||
let | ||
pkgs = import <nixpkgs> {}; | ||
|
||
configurations = | ||
pkgs.lib.listToAttrs ( | ||
pkgs.lib.concatMap (compiler: | ||
pkgs.lib.concatMap (system: | ||
[{name = "fp-course_" + compiler + "_" + system; value = {inherit compiler system;};}] | ||
) supportedSystems | ||
) supportedCompilers | ||
); | ||
|
||
jobs = | ||
pkgs.lib.mapAttrs (name: configuration: | ||
let | ||
compiler = configuration.compiler; | ||
system = configuration.system; | ||
nixpkgs = { pkgs = pkgsFor system; }; | ||
course = import ../default.nix { inherit nixpkgs compiler; }; | ||
in | ||
course | ||
) configurations; | ||
in | ||
jobs |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"enabled": 1, | ||
"hidden": false, | ||
"description": "jobsets", | ||
"nixexprinput": "fp-course", | ||
"nixexprpath": "ci/jobsets.nix", | ||
"checkinterval": 300, | ||
"schedulingshares": 1, | ||
"enableemail": false, | ||
"emailoverride": "", | ||
"keepnr": 5, | ||
"inputs": { | ||
"fp-course": { "type": "git", "value": "https://github.com/data61/fp-course.git master", "emailresponsible": false }, | ||
"nixpkgs": { "type": "git", "value": "https://github.com/NixOS/nixpkgs.git release-17.03", "emailresponsible": false } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ nixpkgs, declInput }: let pkgs = import nixpkgs {}; in { | ||
jobsets = pkgs.runCommand "spec.json" {} '' | ||
cat <<EOF | ||
${builtins.toXML declInput} | ||
EOF | ||
cat > $out <<EOF | ||
{ | ||
"fp-course": { | ||
"enabled": 1, | ||
"hidden": false, | ||
"description": "FP Course", | ||
"nixexprinput": "fp-course", | ||
"nixexprpath": "./ci/ci.nix", | ||
"checkinterval": 300, | ||
"schedulingshares": 1, | ||
"enableemail": false, | ||
"emailoverride": "", | ||
"keepnr": 5, | ||
"inputs": { | ||
"fp-course": { "type": "git", "value": "https://github.com/data61/fp-course.git master", "emailresponsible": false }, | ||
"nixpkgs": { "type": "git", "value": "https://github.com/NixOS/nixpkgs.git release-17.03", "emailresponsible": false } | ||
} | ||
} | ||
} | ||
EOF | ||
''; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }: | ||
|
||
let | ||
inherit (nixpkgs) pkgs; | ||
|
||
haskellPackages = if compiler == "default" | ||
then pkgs.haskellPackages | ||
else pkgs.haskell.packages.${compiler}; | ||
|
||
modifiedHaskellPackages = haskellPackages.override { | ||
overrides = self: super: { | ||
tasty-discover = pkgs.haskell.lib.dontCheck super.tasty-discover_3_0_2; | ||
}; | ||
}; | ||
|
||
fp-course = modifiedHaskellPackages.callPackage ./fp-course.nix {}; | ||
# Dodgy fun times, make sure that | ||
# - the tests compile | ||
# - the tests failing doesn't cause the build to fail | ||
modified-fp-course = pkgs.haskell.lib.overrideCabal fp-course (drv: { checkPhase = "true"; }); | ||
in | ||
modified-fp-course | ||
|
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,20 +1,6 @@ | ||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default" }: | ||
|
||
{ nixpkgs ? import <nixpkgs> {}}: | ||
let | ||
inherit (nixpkgs) pkgs; | ||
|
||
haskellPackages = if compiler == "default" | ||
then pkgs.haskellPackages | ||
else pkgs.haskell.packages.${compiler}; | ||
|
||
modifiedHaskellPackages = haskellPackages.override { | ||
overrides = self: super: { | ||
tasty-discover = pkgs.haskell.lib.dontCheck super.tasty-discover_3_0_2; | ||
}; | ||
}; | ||
|
||
drv = modifiedHaskellPackages.callPackage ./fp-course.nix {}; | ||
|
||
fp-course = import ./default.nix {}; | ||
in | ||
|
||
if pkgs.lib.inNixShell then drv.env else drv | ||
if pkgs.lib.inNixShell then fp-course.env else fp-course |