-
-
Save silky/ba403679d8709d3bff187daf73374efc to your computer and use it in GitHub Desktop.
Nix build of vscode with haskell-language-server
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
let | |
nixpkgs = builtins.fetchTarball { | |
url = "https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz"; | |
sha256 = "0q7rnlp1djxc9ikj89c0ifzihl4wfvri3q1bvi75d2wrz844b4lq"; | |
}; | |
config = { | |
allowUnfree = true; | |
}; | |
ghcVersion = "8107"; | |
overlay = pkgsNew: pkgsOld: { | |
haskell-language-server = pkgsOld.haskell-language-server.override { | |
supportedGhcVersions = [ ghcVersion ]; | |
}; | |
haskell = pkgsOld.haskell // { | |
packages = pkgsOld.haskell.packages // { | |
"ghc${ghcVersion}" = pkgsOld.haskell.packages."ghc${ghcVersion}".override (old: { | |
overrides = | |
pkgsNew.lib.composeExtensions (old.overrides or (_: _: { })) | |
(haskellPackagesNew: haskellPackagesOld: { | |
ormolu = | |
if pkgsNew.system == "aarch64-darwin" | |
then | |
pkgsNew.haskell.lib.overrideCabal | |
haskellPackagesOld.ormolu | |
(_: { enableSeparateBinOutput = false; }) | |
else | |
haskellPackagesOld.ormolu; | |
}); | |
}); | |
}; | |
}; | |
vscode-with-extensions = pkgsOld.vscode-with-extensions.override { | |
vscodeExtensions = [ | |
pkgsNew.vscode-extensions.haskell.haskell | |
pkgsNew.vscode-extensions.justusadam.language-haskell | |
]; | |
}; | |
}; | |
pkgs = import nixpkgs { inherit config; overlays = [ overlay ];}; | |
in | |
{ inherit (pkgs) | |
haskell-language-server | |
vscode-with-extensions | |
; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment