Skip to content

Commit a1b5c43

Browse files
committed
Nix Flake: Small fixes, make comments a bit more consistent
1 parent b473c73 commit a1b5c43

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

flake.nix

Lines changed: 9 additions & 13 deletions
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,15 +50,14 @@
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)
@@ -68,7 +67,6 @@
6867
hlint
6968
(pkgs.haskell.lib.justStaticExecutables (pkgs.haskell.lib.dontCheck pkgs.haskellPackages.opentelemetry-extra))
7069
capstone
71-
# ormolu
7270
stylish-haskell
7371
pre-commit
7472
] ++ lib.optionals (!stdenv.isDarwin)
@@ -92,7 +90,7 @@
9290
'';
9391
};
9492

95-
in with pkgs; rec {
93+
in rec {
9694
# Developement shell with only dev tools
9795
devShells = {
9896
default = mkDevShell pkgs.haskellPackages;
@@ -102,9 +100,7 @@
102100
shell-ghc910 = mkDevShell pkgs.haskell.packages.ghc910;
103101
};
104102

105-
packages = {
106-
docs = docs;
107-
};
103+
packages = { inherit docs; };
108104

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

0 commit comments

Comments
 (0)