Skip to content

Commit 31b8787

Browse files
authoredFeb 9, 2025
Nix tooling (minor changes) (#4490)
* Nix: Update lock files (GHC 9.6.5 -> 9.6.6) * Nix Flake: Small fixes, make comments a bit more consistent * Nix Flake: Remove `hlint` `hlint` should not be necessary. However, this is an opinion up for debate: We do not really need the `hlint` executable because it is integrated in HLS. However, `hlint` is used by a GitHub Action, which we may want to replicate locally. Also, the `fmt.sh` script is downloading an (unknown) `hlint` version which will not work on NixOS anyways. In my opinion, if `fmt.sh` is still used (I can not find any usages) we should fix the script so it is reproducible.
1 parent d75400d commit 31b8787

File tree

2 files changed

+18
-24
lines changed

2 files changed

+18
-24
lines changed
 

‎flake.lock

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix

+9-15
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
66
flake-utils.url = "github:numtide/flake-utils";
7-
# for default.nix
7+
# For default.nix
88
flake-compat = {
99
url = "github:edolstra/flake-compat";
1010
flake = false;
1111
};
1212
};
1313

1414
outputs =
15-
inputs@{ self, nixpkgs, flake-utils, ... }:
15+
{ nixpkgs, flake-utils, ... }:
1616
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]
1717
(system:
1818
let
@@ -50,25 +50,21 @@
5050

5151
mkDevShell = hpkgs: with pkgs; mkShell {
5252
name = "haskell-language-server-dev-ghc${hpkgs.ghc.version}";
53-
# For binary Haskell tools, we use the default nixpkgs GHC
54-
# This removes a rebuild with a different GHC version
55-
# The drawback of this approach is that our shell may pull two GHC
56-
# version in scope.
53+
# For binary Haskell tools, we use the default Nixpkgs GHC version.
54+
# This removes a rebuild with a different GHC version. The drawback of
55+
# this approach is that our shell may pull two GHC versions in scope.
5756
buildInputs = [
58-
# our compiling toolchain
57+
# Compiler toolchain
5958
hpkgs.ghc
6059
pkgs.haskellPackages.cabal-install
61-
# Dependencies needed to build some parts of hackage
60+
# Dependencies needed to build some parts of Hackage
6261
gmp zlib ncurses
6362
# Changelog tooling
6463
(gen-hls-changelogs pkgs.haskellPackages)
6564
# For the documentation
6665
pythonWithPackages
67-
# @guibou: I'm not sure this is needed.
68-
hlint
6966
(pkgs.haskell.lib.justStaticExecutables (pkgs.haskell.lib.dontCheck pkgs.haskellPackages.opentelemetry-extra))
7067
capstone
71-
# ormolu
7268
stylish-haskell
7369
pre-commit
7470
] ++ lib.optionals (!stdenv.isDarwin)
@@ -92,7 +88,7 @@
9288
'';
9389
};
9490

95-
in with pkgs; rec {
91+
in rec {
9692
# Developement shell with only dev tools
9793
devShells = {
9894
default = mkDevShell pkgs.haskellPackages;
@@ -102,9 +98,7 @@
10298
shell-ghc910 = mkDevShell pkgs.haskell.packages.ghc910;
10399
};
104100

105-
packages = {
106-
docs = docs;
107-
};
101+
packages = { inherit docs; };
108102

109103
# The attributes for the default shell and package changed in recent versions of Nix,
110104
# these are here for backwards compatibility with the old versions.

0 commit comments

Comments
 (0)