haskell-language-server/flake.nix

437 lines
18 KiB
Nix
Raw Normal View History

# Maintaining this file:
#
# - Bump the inputs version using `nix flake update`
# - Edit `sourceDirs` to update the set of local packages
#
# For more details: https://nixos.wiki/wiki/Flakes
{
description = "haskell language server flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
flake-utils.url = "github:numtide/flake-utils";
gitignore = {
url = "github:hercules-ci/gitignore.nix";
flake = false;
};
# cabal hashes contains all the version for different haskell packages, to update:
# nix flake lock --update-input all-cabal-hashes-unpacked
all-cabal-hashes-unpacked = {
url = "github:commercialhaskell/all-cabal-hashes/current-hackage";
flake = false;
};
# List of hackage dependencies
lsp = {
url = "https://hackage.haskell.org/package/lsp-1.6.0.0/lsp-1.6.0.0.tar.gz";
flake = false;
};
lsp-types = {
url = "https://hackage.haskell.org/package/lsp-types-1.6.0.0/lsp-types-1.6.0.0.tar.gz";
flake = false;
};
lsp-test = {
url = "https://hackage.haskell.org/package/lsp-test-0.14.1.0/lsp-test-0.14.1.0.tar.gz";
flake = false;
};
ghc-exactprint-160 = {
url = "https://hackage.haskell.org/package/ghc-exactprint-1.6.0/ghc-exactprint-1.6.0.tar.gz";
flake = false;
};
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
ghc-exactprint-150 = {
url = "https://hackage.haskell.org/package/ghc-exactprint-1.5.0/ghc-exactprint-1.5.0.tar.gz";
flake = false;
};
ghc-exactprint = {
url = "https://hackage.haskell.org/package/ghc-exactprint-1.4.1/ghc-exactprint-1.4.1.tar.gz";
flake = false;
};
ghc-check = {
url = "https://hackage.haskell.org/package/ghc-check-0.5.0.8/ghc-check-0.5.0.8.tar.gz";
flake = false;
};
constraints-extras = {
url = "https://hackage.haskell.org/package/constraints-extras-0.3.2.1/constraints-extras-0.3.2.1.tar.gz";
flake = false;
};
retrie = {
url = "https://hackage.haskell.org/package/retrie-1.2.0.1/retrie-1.2.0.1.tar.gz";
flake = false;
};
fourmolu = {
url = "https://hackage.haskell.org/package/fourmolu-0.5.0.1/fourmolu-0.5.0.1.tar.gz";
flake = false;
};
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
fourmolu-0300 = {
url = "https://hackage.haskell.org/package/fourmolu-0.3.0.0/fourmolu-0.3.0.0.tar.gz";
flake = false;
};
aeson-1520= {
url = "https://hackage.haskell.org/package/aeson-1.5.2.0/aeson-1.5.2.0.tar.gz";
flake = false;
};
brittany-01312 = {
url = "https://hackage.haskell.org/package/brittany-0.13.1.2/brittany-0.13.1.2.tar.gz";
flake = false;
};
hlint = {
url = "https://hackage.haskell.org/package/hlint-3.3.6/hlint-3.3.6.tar.gz";
flake = false;
};
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
hlint-34 = {
url = "https://hackage.haskell.org/package/hlint-3.4/hlint-3.4.tar.gz";
flake = false;
};
ptr-poker = {
url = "https://hackage.haskell.org/package/ptr-poker-0.1.2.8/ptr-poker-0.1.2.8.tar.gz";
flake = false;
};
stylish-haskell = {
url = "https://hackage.haskell.org/package/stylish-haskell-0.14.2.0/stylish-haskell-0.14.2.0.tar.gz";
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
flake = false;
};
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
implicit-hie-cradle = {
url = "https://hackage.haskell.org/package/implicit-hie-cradle-0.3.0.5/implicit-hie-cradle-0.3.0.5.tar.gz";
flake = false;
};
hie-bios = {
url = "https://hackage.haskell.org/package/hie-bios-0.11.0/hie-bios-0.11.0.tar.gz";
flake = false;
};
entropy = {
url = "https://hackage.haskell.org/package/entropy-0.4.1.10/entropy-0.4.1.10.tar.gz";
flake = false;
};
hiedb = {
url = "https://hackage.haskell.org/package/hiedb-0.4.2.0/hiedb-0.4.2.0.tar.gz";
flake = false;
};
};
outputs =
inputs@{ self, nixpkgs, flake-compat, flake-utils, gitignore, all-cabal-hashes-unpacked, ... }:
{
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
overlays.default = final: prev:
with prev;
let
haskellOverrides = hself: hsuper: {
# we override mkDerivation here to apply the following
# tweak to each haskell package:
# if the package is broken, then we disable its check and relax the cabal bounds;
# otherwise, we leave it unchanged.
# hopefully, this could fix packages marked as broken by nix due to check failures
# or the build failure because of tight cabal bounds
mkDerivation = args:
let
broken = args.broken or false;
check = args.doCheck or true;
jailbreak = args.jailbreak or false;
in hsuper.mkDerivation (args // {
jailbreak = if broken then true else jailbreak;
doCheck = if broken then false else check;
# Library profiling is disabled as it causes long compilation time
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
# on our CI jobs. Nix users are free tor revert this anytime.
enableLibraryProfiling = false;
doHaddock = false;
});
};
gitignoreSource = (import gitignore { inherit lib; }).gitignoreSource;
# List all subdirectories under `./plugins`, except `./plugins/default`
pluginsDir = ./plugins;
pluginSourceDirs = builtins.removeAttrs (lib.mapAttrs'
(name: _: lib.nameValuePair name (pluginsDir + ("/" + name)))
(builtins.readDir pluginsDir)) [ "default" ];
# Source directories of our packages, should be consistent with cabal.project
sourceDirs = {
haskell-language-server = ./.;
ghcide = ./ghcide;
ghcide-bench = ./ghcide-bench;
hls-graph = ./hls-graph;
shake-bench = ./shake-bench;
hie-compat = ./hie-compat;
hls-plugin-api = ./hls-plugin-api;
hls-test-utils = ./hls-test-utils;
ghcide-test-utils = ./ghcide/test;
# hiedb depends on hie-compact, which is part of this repository. If
# cabal inside the nix development shell tries to use the hiedb
# compiled inside nix, it thinks that this package is broken and
# does nothing. Adding this here ensures that hiedb compiled in nix
# is not available to cabal and then cabal downloads hiedb from
# hackage and compiles it.
hiedb = inputs.hiedb;
} // pluginSourceDirs;
# Tweak our packages
# Don't use `callHackage`, it requires us to override `all-cabal-hashes`
tweaks = hself: hsuper:
with haskell.lib; {
# Patches don't apply
github = overrideCabal hsuper.github (drv: { patches = []; });
2022-03-08 16:24:00 +03:00
# GHCIDE requires hie-bios ^>=0.9.1
hie-bios = hself.callCabal2nix "hie-bios" inputs.hie-bios {};
2021-12-09 22:38:11 +03:00
lsp = hsuper.callCabal2nix "lsp" inputs.lsp {};
lsp-types = hsuper.callCabal2nix "lsp-types" inputs.lsp-types {};
lsp-test = hsuper.callCabal2nix "lsp-test" inputs.lsp-test {};
entropy = hsuper.callCabal2nix "entropy" inputs.entropy {};
hiedb = hsuper.callCabal2nix "hiedb" inputs.hiedb {};
implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" inputs.implicit-hie-cradle {};
ghc-check = hself.callCabal2nix "ghc-check" inputs.ghc-check {};
# https://github.com/NixOS/nixpkgs/issues/140774
ormolu =
if final.system == "aarch64-darwin"
then overrideCabal hsuper.ormolu (_: { enableSeparateBinOutput = false; })
else hsuper.ormolu;
};
hlsSources =
builtins.mapAttrs (_: dir: gitignoreSource dir) sourceDirs;
extended = hpkgs:
(hpkgs.override (old: {
overrides = lib.composeExtensions (old.overrides or (_: _: { }))
haskellOverrides;
})).extend (hself: hsuper:
# disable all checks for our packages
builtins.mapAttrs (_: drv: haskell.lib.dontCheck drv)
(lib.composeExtensions
(haskell.lib.packageSourceOverrides hlsSources) tweaks hself
hsuper));
in {
inherit hlsSources;
all-cabal-hashes = prev.runCommand "all-cabal-hashes.tar.gz"
{ }
''
cd ${all-cabal-hashes-unpacked}
cd ..
tar czf $out $(basename ${all-cabal-hashes-unpacked})
'';
# Haskell packages extended with our packages
hlsHpkgs = compiler: extended haskell.packages.${compiler};
# Support of GenChangelogs.hs
gen-hls-changelogs = hpkgs:
let myGHC = hpkgs.ghcWithPackages (p: with p; [ github ]);
in runCommand "gen-hls-changelogs" {
passAsFile = [ "text" ];
preferLocalBuild = true;
allowSubstitutes = false;
buildInputs = [ git myGHC ];
} ''
dest=$out/bin/gen-hls-changelogs
mkdir -p $out/bin
echo "#!${runtimeShell}" >> $dest
echo "${myGHC}/bin/runghc ${./GenChangelogs.hs}" >> $dest
chmod +x $dest
'';
};
} // (flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ])
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
config = { allowBroken = true; };
};
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
ghc902Config = (import ./configuration-ghc-90.nix) { inherit pkgs inputs; };
ghc924Config = (import ./configuration-ghc-92.nix) { inherit pkgs inputs; };
ghc942Config = (import ./configuration-ghc-94.nix) { inherit pkgs inputs; };
# GHC versions
# While HLS still works fine with 8.10 GHCs, we only support the versions that are cached
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
# by upstream nixpkgs, which now only includes GHC version 9+
supportedGHCs = let
ghcVersion = "ghc" + (pkgs.lib.replaceStrings ["."] [""] pkgs.haskellPackages.ghc.version);
cases = {
ghc902 = ghc902Config.tweakHpkgs (pkgs.hlsHpkgs "ghc902");
ghc924 = ghc924Config.tweakHpkgs (pkgs.hlsHpkgs "ghc924");
ghc942 = ghc942Config.tweakHpkgs (pkgs.hlsHpkgs "ghc942");
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
};
in { default = cases."${ghcVersion}"; } // cases;
ghc902 = supportedGHCs.ghc902;
ghc924 = supportedGHCs.ghc924;
ghc942 = supportedGHCs.ghc942;
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
ghcDefault = supportedGHCs.default;
pythonWithPackages = pkgs.python3.withPackages (ps: [ps.sphinx ps.myst-parser ps.sphinx_rtd_theme ps.pip]);
2021-08-11 11:54:51 +03:00
docs = pkgs.stdenv.mkDerivation {
name = "hls-docs";
src = pkgs.lib.sourceFilesBySuffices ./. [ ".py" ".rst" ".md" ".png" ".gif" ".svg" ".cabal" ];
2021-08-11 11:54:51 +03:00
buildInputs = [ pythonWithPackages ];
# -n gives warnings on missing link targets, -W makes warnings into errors
buildPhase = ''cd docs; sphinx-build -n -W . $out'';
2021-08-11 11:54:51 +03:00
dontInstall = true;
};
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
mkDevShell = hpkgs: cabalProject: with pkgs; mkShell {
name = "haskell-language-server-dev-ghc${hpkgs.ghc.version}";
# For theses tools packages, we use ghcDefault
# This removes a rebuild with a different GHC version
# Theses programs are tools, used as binary, independently of the
# version of GHC.
# The drawback of this approach is that our shell may pull two GHC
# version in scope (the default one, and the one defined in
# `hpkgs`.)
# The advantage is that we won't have to rebuild theses tools (and
# dependencies) with a recent GHC which may not be supported by
# them.
buildInputs = [
# our compiling toolchain
hpkgs.ghc
pkgs.cabal-install
# @guibou: I'm not sure hie-bios is needed
pkgs.haskellPackages.hie-bios
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
# Dependencies needed to build some parts of hackage
gmp zlib ncurses
# Changelog tooling
(gen-hls-changelogs pkgs.haskellPackages)
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
# For the documentation
pythonWithPackages
# @guibou: I'm not sure this is needed.
hlint
pkgs.haskellPackages.opentelemetry-extra
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
capstone tracy
# ormolu
# stylish-haskell
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
pre-commit
] ++ lib.optionals stdenv.isDarwin
(with darwin.apple_sdk.frameworks; [
Cocoa
CoreServices
]);
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
shellHook = ''
# @guibou: I'm not sure theses lines are needed
export LD_LIBRARY_PATH=${gmp}/lib:${zlib}/lib:${ncurses}/lib:${capstone}/lib
export DYLD_LIBRARY_PATH=${gmp}/lib:${zlib}/lib:${ncurses}/lib:${capstone}/lib
export PATH=$PATH:$HOME/.local/bin
# Install pre-commit hook
pre-commit install
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
# If the cabal project file is not the default one.
# Print a warning and generate an alias.
if [ ${cabalProject} != "cabal.project" ]
then
echo "Cabal won't be able to build your project without using the project file "${cabalProject}", such as:"
echo " cabal --project-file=${cabalProject}"
echo "An alias "cabal_project" is available. Use it like:"
echo " cabal_project build"
alias cabal_project='cabal --project-file=${cabalProject}'
fi
'';
};
# Create a development shell of hls project
# See https://github.com/NixOS/nixpkgs/blob/5d4a430472cafada97888cc80672fab255231f57/pkgs/development/haskell-modules/make-package-set.nix#L319
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
mkDevShellWithNixDeps = hpkgs: cabalProject:
with pkgs;
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
let simpleShell = mkDevShell hpkgs cabalProject;
in
hpkgs.shellFor {
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
name = "haskell-language-server-dev-nix-ghc${hpkgs.ghc.version}";
inherit (simpleShell) shellHook buildInputs;
doBenchmark = true;
packages = p:
with builtins;
map (name: p.${name}) (attrNames
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
# Disable dependencies should not be part of the shell.
(removeAttrs hlsSources (hpkgs.hlsDisabledPlugins or [])));
src = null;
};
# Create a hls executable
# Copied from https://github.com/NixOS/nixpkgs/blob/210784b7c8f3d926b7db73bdad085f4dc5d79428/pkgs/development/tools/haskell/haskell-language-server/withWrapper.nix#L16
mkExe = hpkgs:
with pkgs.haskell.lib;
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
(enableSharedExecutables (overrideCabal hpkgs.haskell-language-server
(_: {
postInstall = ''
remove-references-to -t ${hpkgs.shake.data} $out/bin/haskell-language-server
remove-references-to -t ${hpkgs.js-jquery.data} $out/bin/haskell-language-server
remove-references-to -t ${hpkgs.js-dgtable.data} $out/bin/haskell-language-server
remove-references-to -t ${hpkgs.js-flot.data} $out/bin/haskell-language-server
'';
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
}))).overrideAttrs(old: {
pname = old.pname + "-ghc${hpkgs.ghc.version}";
});
in with pkgs; rec {
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
# Developement shell with only compiler
simpleDevShells = {
haskell-language-server-dev = mkDevShell ghcDefault "cabal.project";
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
haskell-language-server-902-dev = mkDevShell ghc902 "cabal.project";
haskell-language-server-924-dev = mkDevShell ghc924 "cabal.project";
haskell-language-server-942-dev = mkDevShell ghc942 "cabal.project";
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
};
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
# Developement shell, haskell packages are also provided by nix
nixDevShells = {
haskell-language-server-dev-nix = mkDevShellWithNixDeps ghcDefault "cabal.project";
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
haskell-language-server-902-dev-nix = mkDevShellWithNixDeps ghc902 "cabal.project";
haskell-language-server-924-dev-nix = mkDevShellWithNixDeps ghc924 "cabal.project";
haskell-language-server-942-dev-nix = mkDevShellWithNixDeps ghc942 "cabal.project";
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
};
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
allPackages = {
haskell-language-server = mkExe ghcDefault;
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
haskell-language-server-902 = mkExe ghc902;
haskell-language-server-924 = mkExe ghc924;
haskell-language-server-942 = mkExe ghc942;
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
};
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
devShells = simpleDevShells // nixDevShells // {
default = simpleDevShells.haskell-language-server-dev;
};
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
packages = allPackages // {
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
default = allPackages.haskell-language-server;
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
# See https://github.com/NixOS/nix/issues/5591
# nix flake cannot build a list/set of derivation in one command.
# Using a linkFarmFromDrvs, I'm creating a unique entry point to
# build all HLS versions.
# This is used in CI to test and populate cache for packages
# distributed using nix.
all-haskell-language-server = linkFarmFromDrvs "all-haskell-language-server" (lib.unique (builtins.attrValues allPackages));
# Same for all shells
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
# We try to build as much as possible, but not much shells are
# working (especially on darwing), so this list is limited.
all-nix-dev-shells = linkFarmFromDrvs "all-dev-shells" (builtins.map (shell: shell.inputDerivation) (lib.unique [nixDevShells.haskell-language-server-dev-nix]));
2021-08-11 11:54:51 +03:00
Nix flake fix dev shells (#2655) * nix: ghc92: ignore broken plugins * nix: use current ghc for tools in the shell Theses tools are pulled in the shell, but we don't need them to match the GHC version used for development. Said otherwise, as long as we use a working `cabal-install` to build with GHC 9.2, we don't care if that cabal-install was built with GHC 8.10. This gives more chance for theses tools to work and be in the binary cache of nixpkgs. * nix: disable shake-bench for ghc921 * nix: fix ghc 9.2 shell * nix: explicit cabal project in devShell Using alias, we get the "correct" behavior when typing `cabal build` in the nix-shell, it points to the current cabal-project file. * nix: remove special case for different ghc versions * nix: move implicit-hie-cradle as a flake input * nix: restore dev shell This commit restores a working behavior for `nix-shell` or `nix develop`, for all supported GHC versions. When entering a `nix-shell`, or `nix develop .#haskell-language-server-ghcXxX-dev` you will get an environment with all the dependencies needed to run `cabal build`. Haskell dependencies will be built by cabal instead of nix. This may be more robust compared to a shell where dependencies are built by nix: - It won't try to build any dependency with nix. This mean that it won't benefit from nix caching, but on the other hand, it will perfectly match the cabal plan. - The nix shell may fail to start if an (possibly unneeded) dependency was failing to build. Entering nix-shell also generates an alias command `cabal_project` which runs cabal with the correct project file if needed (e.g. for GHC 9.0 and 9.2). Users are notified with a message when entering the shell. The old behavior (i.e. where dependencies are built with nix) is still available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e. suffix the name of the shell with `-nix`). * nix: New entries which build all target at once All HLS version can be built with `nix build .#all-haskell-language-server`, and all development shells with `nix build .#all-dev-shells`. I had to workaround a limitation in `nix build` which is not able to build multiples targets, instead I used linkFarmFromDrvs. All packages and shells are now named with a unique package name containing the GHC version. * nix: Build all devShells and all binaries in CI * nix: build HLS with dynamic linking Related to #2668. This fixs the build, however, because now HLS is dynamicly linked, it pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`. * nix; fix CI command * nix: only build dev shell with nix packages for current GHC version * Another tentative to fix the build * fix: Eval and alternate number format works with ghc 9.2 * fix CI build * ANother tentative fix
2022-02-16 15:24:22 +03:00
all-simple-dev-shells = linkFarmFromDrvs "all-dev-shells" (builtins.map (shell: shell.inputDerivation) (lib.unique (builtins.attrValues simpleDevShells)));
2021-08-11 11:54:51 +03:00
docs = docs;
};
nix update (#2892) * Drop -haddock as ghc 8.10.7 fails to build ghc-lib with: ``` compiler/GHC/CmmToAsm/AArch64/CodeGen.hs:176:15: error: 2081 Error: parse error on input {- | debugIsOn -} 2082 | 2083 176 | ann doc instr {- | debugIsOn -} = ANN doc instr 2084 | ^^^^^^^^^^^^^^^^^ ``` # Please enter the commit message for your changes. Lines starting * flake.lock: Update Flake lock file updates: • Updated input 'flake-compat': 'github:edolstra/flake-compat/b7547d3eed6f32d06102ead8991ec52ab0a4f1a7' (2022-01-03) → 'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19) • Updated input 'flake-utils': 'github:numtide/flake-utils/997f7efcb746a9c140ce1f13c72263189225f482' (2021-08-20) → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11) • Updated input 'gitignore': 'github:hercules-ci/gitignore.nix/211907489e9f198594c0eb0ca9256a1949c9d412' (2021-01-26) → 'github:hercules-ci/gitignore.nix/bff2832ec341cf30acb3a4d3e2e7f1f7b590116a' (2022-03-05) • Updated input 'hie-bios': 'https://hackage.haskell.org/package/hie-bios-0.9.0/hie-bios-0.9.0.tar.gz?narHash=sha256-nd+FfUQVZNxJfKZkAWA3dF0JwRgXntL+1gGvyNHDbKc=' → 'https://hackage.haskell.org/package/hie-bios-0.9.1/hie-bios-0.9.1.tar.gz?narHash=sha256-5RqspT27rb%2ftMBwrKr4VfSSbq0+c0LMNuaKlTun0Kkk=' • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/c473cc8714710179df205b153f4e9fa007107ff9' (2021-12-13) → 'github:NixOS/nixpkgs/ab83c5d70528f1edc7080dead3a5dee61797b3ff' (2022-04-24) • Updated input 'pre-commit-hooks': 'github:cachix/pre-commit-hooks.nix/397f0713d007250a2c7a745e555fa16c5dc8cadb' (2021-06-29) → 'github:cachix/pre-commit-hooks.nix/e5e7b3b542e7f4f96967966a943d7e1c07558042' (2022-04-04) • Updated input 'pre-commit-hooks/flake-utils': 'github:numtide/flake-utils/74f7e4319258e287b0f9cb95426c9853b282730b' (2021-11-28) → 'github:numtide/flake-utils/3cecb5b042f7f209c56ffd8371b2711a290ec797' (2022-02-07) • Updated input 'pre-commit-hooks/nixpkgs': 'github:NixOS/nixpkgs/6f05cfdb1e78d36c0337516df674560e4b51c79b' (2022-01-01) → 'github:nixos/nixpkgs/77a7a4197740213879b9a1d2e1788c6c8ade4274' (2022-02-23) * nix flake update & bump ghc921 -> ghc922 ghc921 is no longer available on Nix, see: https://github.com/NixOS/nixpkgs/pull/163426 * myst-parser: bump docutils version requirements * fix devShells and packages default * use ghc-exactprint 1.5.0 for ghc922 * ghc902: add flag hlint34 to nix * macosx: add SSE-enabled ptr-poker dependency * ghc902 requires ghc-lib-parser >= 9.2 * nix: ghcDefault supports HLS tweaks * fix typo * add support for pre-commit in mkDevShell * fix typo * add ptr-poker to nix shell * add ghc-884 configuration tweaks * fix stylish-haskell for ghc-884 * fix default ghc lookup * ghc884: fixup brittany version to 0.13.1.2 * ghc884: fixup aeson version to 1.5.2.0 * ghc884: fixup ormolu/fourmolu * add configuration tweak for ghc8107 * rename configuration-ghc-xxx.nix files * update hackage index * use current cabal/hackage to fetch ptr-poker in mkDevShell * reinstate .pre-commit.yaml * nix: temporary disable "build binaries" from the work flow * nix: temporary disable builds and partially populate cachix * nix: temporarily disable ghc 884 and 8107 * nix: temporarily disable nix develop run * nix: re-enable ghc8107/ghc884 builds, disable "build all binaries" * nix: noop push commit to test cachix * nix: touch flake.nix, remove ghc 884 * nix: rm ghc 810, ghc88 + disableLibraryProfiling * nix: build all binaries again * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * Update flake.nix Co-authored-by: Michael Peyton Jones <me@michaelpj.com> * revert change made on comment * rm myst-parser.nix * fix typo (thanks @guibou) * explain why we disable library profiling with nix * ghc922, disable "hls-hlint-plugin" Co-authored-by: Pepe Iborra <pepeiborra@gmail.com> Co-authored-by: Providence Salumu <Providence.Salumu@smunix.com> Co-authored-by: Providence Salumu <smunix@users.noreply.github.com>
2022-05-13 12:09:51 +03:00
# The attributes for the default shell and package changed in recent versions of Nix,
# these are here for backwards compatibility with the old versions.
devShell = devShells.default;
defaultPackage = packages.default;
});
2022-04-20 01:51:40 +03:00
nixConfig = {
extra-substituters = [
"https://haskell-language-server.cachix.org"
];
extra-trusted-public-keys = [
"haskell-language-server.cachix.org-1:juFfHrwkOxqIOZShtC4YC1uT1bBcq2RSvC7OMKx0Nz8="
];
};
}