git_activity_tracker/flake.nix
2024-02-02 18:29:01 +01:00

46 lines
1.3 KiB
Nix

{
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
pkgs.glibcLocales
];
};
}
);
};
}