Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
description = "horizon-haskell-packages";
nixConfig = {
extra-substituters = "https://horizon.cachix.org";
extra-trusted-public-keys = "horizon.cachix.org-1:MeEEDRhRZTgv/FFGCv3479/dmJDfJ82G6kfUDxMSAw0=";
};
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
horizon-core.url = "git+https://gitlab.horizon-haskell.net/package-sets/horizon-core";
lint-utils = {
url = "git+https://gitlab.nixica.dev/nix/lint-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs =
inputs@
{ self
, flake-parts
, horizon-core
, lint-utils
, nixpkgs
, ...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-darwin"
"x86_64-darwin"
"x86_64-linux"
];
perSystem = { pkgs, system, ... }:
with pkgs.writers;
let
make-foliage-repo = writeBashBin "make-foliage-repo" ''
mkdir _keys
echo "$FOLIAGE_KEYS" | base64 -d | tar xz -C _keys
${horizon-core.packages.${system}.foliage}/bin/foliage -- build
ls _repo/* -alh
'';
make-foliage-repo-app = {
type = "app";
program = "${make-foliage-repo}/bin/make-foliage-repo";
};
in
{
apps = {
default = make-foliage-repo-app;
};
checks =
with lint-utils.outputs.linters.${system}; {
nixpkgs-fmt = nixpkgs-fmt { src = self; };
};
packages.default = make-foliage-repo;
};
};
}