Skip to content

Nix tooling (minor changes) #4490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 9 additions & 15 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
# for default.nix
# For default.nix
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};

outputs =
inputs@{ self, nixpkgs, flake-utils, ... }:
{ nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]
(system:
let
Expand Down Expand Up @@ -50,25 +50,21 @@

mkDevShell = hpkgs: with pkgs; mkShell {
name = "haskell-language-server-dev-ghc${hpkgs.ghc.version}";
# For binary Haskell tools, we use the default nixpkgs GHC
# This removes a rebuild with a different GHC version
# The drawback of this approach is that our shell may pull two GHC
# version in scope.
# For binary Haskell tools, we use the default Nixpkgs GHC version.
# This removes a rebuild with a different GHC version. The drawback of
# this approach is that our shell may pull two GHC versions in scope.
buildInputs = [
# our compiling toolchain
# Compiler toolchain
hpkgs.ghc
pkgs.haskellPackages.cabal-install
# Dependencies needed to build some parts of hackage
# Dependencies needed to build some parts of Hackage
gmp zlib ncurses
# Changelog tooling
(gen-hls-changelogs pkgs.haskellPackages)
# For the documentation
pythonWithPackages
# @guibou: I'm not sure this is needed.
hlint
(pkgs.haskell.lib.justStaticExecutables (pkgs.haskell.lib.dontCheck pkgs.haskellPackages.opentelemetry-extra))
capstone
# ormolu
stylish-haskell
pre-commit
] ++ lib.optionals (!stdenv.isDarwin)
Expand All @@ -92,7 +88,7 @@
'';
};

in with pkgs; rec {
in rec {
# Developement shell with only dev tools
devShells = {
default = mkDevShell pkgs.haskellPackages;
Expand All @@ -102,9 +98,7 @@
shell-ghc910 = mkDevShell pkgs.haskell.packages.ghc910;
};

packages = {
docs = docs;
};
packages = { inherit docs; };

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