suntheme/flake.nix

56 lines
1.5 KiB
Nix

{
description = "Suntheme's development and build environment";
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = {
self,
nixpkgs,
flake-utils,
haskellNix,
}: let
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
in
flake-utils.lib.eachSystem supportedSystems (system: let
overlays = [
haskellNix.overlay
(final: prev: {
suntheme = final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc982";
shell.tools = {
cabal = {};
hlint = {};
haskell-language-server = {};
};
shell.buildInputs = with pkgs; [
at
];
};
})
];
pkgs = import nixpkgs {
inherit system overlays;
inherit (haskellNix) config;
};
flake = pkgs.suntheme.flake {};
in
flake
// {
formatter = pkgs.alejandra;
packages.default = flake.packages."suntheme:exe:suntheme";
});
nixConfig = {
extra-substituters = ["https://cache.iog.io" "https://suntheme.cachix.org"];
extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "suntheme.cachix.org-1:fHjlz7YAmMUcLp3tsZis8g9wIsDS6HvECGR3uZETGRo="];
allow-import-from-derivation = "true";
};
}