foliage/flake.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

2022-04-11 11:48:04 +03:00
{
description = "Foliage is a tool to create custom Haskell package repositories, in a fully reproducible way.";
inputs = {
2022-05-16 12:54:15 +03:00
nixpkgs.follows = "haskell-nix/nixpkgs-unstable";
haskell-nix.url = "github:input-output-hk/haskell.nix";
2022-04-11 11:48:04 +03:00
flake-utils.url = "github:numtide/flake-utils";
};
2022-05-16 12:54:15 +03:00
outputs = { self, nixpkgs, flake-utils, haskell-nix }:
flake-utils.lib.eachDefaultSystem (system:
2022-04-11 11:48:04 +03:00
let
2022-05-16 12:54:15 +03:00
pkgs = import nixpkgs { inherit system; inherit (haskell-nix) config; overlays = [haskell-nix.overlay]; };
project = pkgs.haskell-nix.cabalProject {
src = ./.;
compiler-nix-name = "ghc8107";
shell.tools = {
cabal = {};
hlint = {};
haskell-language-server = {};
};
shell.buildInputs = with pkgs; [
nixpkgs-fmt
2022-09-22 19:54:35 +03:00
fsatrace
2022-05-16 12:54:15 +03:00
];
modules = [{
packages.foliage.components.exes.foliage.dontStrip = false;
}];
};
in {
packages.default = project.foliage.components.exes.foliage;
2022-04-21 09:05:47 +03:00
devShell = pkgs.mkShell {
name = "foliage-dev-shell";
2022-09-22 19:54:35 +03:00
buildInputs = with pkgs; [
fsatrace
];
2022-04-21 09:05:47 +03:00
};
2022-04-11 11:48:04 +03:00
});
2022-05-16 12:54:15 +03:00
nixConfig = {
extra-substituters = [
2022-08-23 15:47:44 +03:00
"https://cache.iog.io"
2022-08-23 17:34:39 +03:00
"https://foliage.cachix.org"
2022-05-16 12:54:15 +03:00
];
extra-trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
2022-08-23 17:34:39 +03:00
"foliage.cachix.org-1:kAFyYLnk8JcRURWReWZCatM9v3Rk24F5wNMpEj14Q/g="
2022-05-16 12:54:15 +03:00
];
};
2022-04-11 11:48:04 +03:00
}