-
-
Notifications
You must be signed in to change notification settings - Fork 391
Upgrade the Nix build system #639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8ce4ac3
f2bdc62
b2d1449
05e1dae
63a5db1
46d1c76
df0e329
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Nix | ||
|
||
on: [push, pull_request] | ||
jobs: | ||
nix: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ghc: ['default', 'ghc8102', 'ghc884', 'ghc865'] | ||
os: [ubuntu-latest, macOS-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- uses: cachix/install-nix-action@v12 | ||
with: | ||
nix_path: nixpkgs=channel:nixos-20.03 | ||
- uses: cachix/cachix-action@v8 | ||
with: | ||
name: haskell-language-server | ||
extraPullNames: haskell-ghcide | ||
authToken: '${{ secrets.HLS_CACHIX_AUTH_TOKEN }}' | ||
- run: nix-shell --argstr compiler ${{ matrix.ghc }} --run "cabal update && cabal build" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ sources ? import ./sources.nix }: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you guys think about adding This may also help, as e.g. here the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are welcome to do this, please send a PR! |
||
let | ||
overlay = _self: pkgs: | ||
let sharedOverrides = { | ||
overrides = _self: super: { | ||
mkDerivation = args: super.mkDerivation (args // | ||
{ | ||
# skip running tests for Hackage packages | ||
doCheck = args.pname != "ghcide" && args.pname != "haskell-language-server"; | ||
# relax upper bounds | ||
jailbreak = args.pname != "jailbreak-cabal"; | ||
}); | ||
}; | ||
}; | ||
extended = haskellPackages: | ||
haskellPackages.extend (pkgs.haskell.lib.packageSourceOverrides { | ||
haskell-language-server = ../.; | ||
ghcide = ../ghcide; | ||
hie-compat = ../ghcide/hie-compat; | ||
hls-plugin-api = ../hls-plugin-api; | ||
hls-tactics-plugin = ../plugins/tactics; | ||
hls-hlint-plugin = ../plugins/hls-hlint-plugin; | ||
}); | ||
in | ||
{ | ||
inherit (import sources.gitignore { inherit (pkgs) lib; }) gitignoreSource; | ||
ourHaskell = pkgs.haskell // { | ||
packages = pkgs.haskell.packages // { | ||
# relax upper bounds on ghc 8.10.x versions (and skip running tests) | ||
ghc8101 = extended (pkgs.haskell.packages.ghc8101.override sharedOverrides); | ||
ghc8102 = extended (pkgs.haskell.packages.ghc8102.override sharedOverrides); | ||
}; | ||
}; | ||
}; | ||
|
||
in import sources.nixpkgs | ||
{ overlays = [ overlay ] ; config = {allowBroken = true;}; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Cabal part is unrelated to Nix, as one can use Nix with Stack. How about removing the 2 Cabal commands?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Nix script is specifically targeted at using with
cabal build