Skip to content

Commit

Permalink
[WIP] Try to set up a basic developer shell
Browse files Browse the repository at this point in the history
  • Loading branch information
yvan-sraka committed Apr 2, 2023
1 parent 586b692 commit 3bdac0a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ _cache
_keys
_repo
_sources

### Nix ###
result
# https://github.com/nix-community/nix-direnv
.direnv
30 changes: 20 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,28 @@
overlays = [ haskell-nix.overlay ];
};

pkgs-static-where-possible =
if pkgs.stdenv.hostPlatform.isLinux then
if pkgs.stdenv.hostPlatform.isAarch64 then
pkgs.pkgsCross.aarch64-multiplatform-musl
else
pkgs.pkgsCross.musl64
else
pkgs;

project = pkgs-static-where-possible.haskell-nix.cabalProject' {
# FIXME: It seems sadly that enabling this makes `ghc` not found in
# $PATH on my machine, which makes indeed HLS quite unable to lint the
# sources ...
#
# pkgs-static-where-possible =
# if pkgs.stdenv.hostPlatform.isLinux then
# if pkgs.stdenv.hostPlatform.isAarch64 then
# pkgs.pkgsCross.aarch64-multiplatform-musl
# else
# pkgs.pkgsCross.musl64
# else
# pkgs;

project = pkgs.haskell-nix.cabalProject' {
src = ./.;
compiler-nix-name = "ghc926";

shell.tools = {
cabal = "latest";
hlint = "latest";
haskell-language-server = "latest";
};
};

flake = project.flake { };
Expand Down

0 comments on commit 3bdac0a

Please sign in to comment.