git_activity_tracker/flake.nix
magic_rb 7f5c63f729
Setup stack project
Signed-off-by: magic_rb <magic_rb@redalder.org>
2024-02-02 13:38:45 +01:00

45 lines
1.2 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
];
};
}
);
};
}