Skip to content

Commit

Permalink
ci: update ghc versions to match pinned nixpkgs
Browse files Browse the repository at this point in the history
This should fix the travis failures, I think.

One issue with our nix setup is that ghc___Binary versions don't work
because they are treated differently in nixpkgs.

    > GHC_VERSION=ghc865Binary nix-build
    error: attribute 'haskellCompilerName' missing, at /nix/store/21wy3lycrr37p7i3czaz8mvrd576ckqm-source/pkgs/development/haskell-modules/make-package-set.nix:140:32
    (use '--show-trace' to show detailed location information)

For reference, here are all the ghc versions available

    > nix eval '(builtins.attrNames (import (builtins.fetchTarball (import ./nix/nixpkgs.nix)) {}).haskell.compiler)'
    [ "ghc8102Binary" "ghc8102BinaryMinimal" "ghc8104" "ghc865Binary" "ghc884" "ghc901" "ghcHEAD" "integer-simple" "native-bignum" ]
  • Loading branch information
bsima committed Apr 28, 2021
1 parent e7a0e2e commit 4e48c83
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"language": "nix",
"env": {
"jobs":
[ "GHC_VERSION=ghc844"
, "GHC_VERSION=ghc865"
, "GHC_VERSION=ghc883"
[ "GHC_VERSION=ghc8104"
, "GHC_VERSION=ghc884"
, "GHC_VERSION=ghc901"
, "GHC_VERSION=ghcHEAD"
]
},
"nix": "2.3.3"
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ set the `GHC_VERSION` environment variable:
GHC_VERSION=ghc881 nix-build
```

To find out which GHC versions your nix setup provides:
To find out which GHC versions our nix setup provides:

```
$ nix eval '(builtins.attrNames ((import <nixpkgs> {}).haskell.compiler))'
[ "ghc822Binary" "ghc844" "ghc863Binary" "ghc865" "ghc881" "ghcHEAD" "ghcjs" "ghcjs86" "integer-simple" ]
$ nix eval '(builtins.attrNames (import (builtins.fetchTarball (import ./nix/nixpkgs.nix)) {}).haskell.compiler)'
[ "ghc8102Binary" "ghc8102BinaryMinimal" "ghc8104" "ghc865Binary" "ghc884" "ghc901" "ghcHEAD" "integer-simple" "native-bignum" ]
```

# Building your pull request
Expand Down
2 changes: 0 additions & 2 deletions all-ghcs.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{ nixpkgs ? import <nixpkgs> {} }:

let
travisJobEnvAssignments = (builtins.fromJSON (builtins.readFile ./.travis.yml)).env.jobs;
getGHCVersionFromEnvAssignment = envAssignment: builtins.elemAt (builtins.split "=" envAssignment) 2;
Expand Down

0 comments on commit 4e48c83

Please sign in to comment.