2024-02-02 13:38:45 +01:00
|
|
|
{
|
|
|
|
inputs.nixpkgs.url = "nixpkgs";
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, ... }:
|
|
|
|
let
|
|
|
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
forAllSystems' = nixpkgs.lib.genAttrs;
|
|
|
|
forAllSystems = forAllSystems' supportedSystems;
|
|
|
|
pkgsForSystem = system:
|
|
|
|
nixpkgs.legacyPackages.${system}.appendOverlays [];
|
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells = forAllSystems (system:
|
|
|
|
let
|
|
|
|
pkgs = pkgsForSystem system;
|
|
|
|
hPkgs = pkgs.haskell.packages."ghc962";
|
|
|
|
stack-wrapper = pkgs.symlinkJoin {
|
|
|
|
name = "stack";
|
|
|
|
paths = [ pkgs.stack ];
|
|
|
|
buildInputs = [ pkgs.makeWrapper ];
|
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/stack \
|
|
|
|
--add-flags "\
|
|
|
|
--no-nix \
|
|
|
|
--system-ghc \
|
|
|
|
--no-install-ghc \
|
|
|
|
"
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
buildInputs = [
|
|
|
|
hPkgs.fourmolu
|
|
|
|
hPkgs.implicit-hie
|
|
|
|
hPkgs.haskell-language-server
|
|
|
|
hPkgs.ghc
|
|
|
|
stack-wrapper
|
2024-02-02 18:29:01 +01:00
|
|
|
pkgs.glibcLocales
|
2024-02-02 13:38:45 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
};
|
|
|
|
}
|