-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
48 lines (45 loc) · 1.15 KB
/
flake.nix
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
39
40
41
42
43
44
45
46
47
48
{
description = "Nix flake for GnuCOBOL utilities";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
flake-utils,
nixpkgs,
...
}: let
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
outputs = flake-utils.lib.eachSystem systems (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [self.overlay];
};
in {
# packages exported by the flake
packages = rec {
gnucobol = pkgs.callPackage ./packages/gnucobol.nix {
inherit pkgs;
};
gcsort = pkgs.callPackage ./packages/gcsort.nix {
inherit pkgs;
};
esqloc = pkgs.callPackage ./packages/esqloc.nix {
inherit pkgs;
};
default = gnucobol;
};
# nix fmt
formatter = pkgs.alejandra;
});
in
outputs
// {
# Overlay that can be imported so you can access the packages
# using gnucobol-nix.overlay
overlay = final: prev: {
gnucobol-pkgs = outputs.packages.${prev.system};
};
};
}