-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
43 lines (34 loc) · 964 Bytes
/
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
{
description = "The Extol programming language";
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05;
outputs = { self, nixpkgs }: let
version = "0.0.1";
extol = pkgs: pkgs.callPackage ({stdenv, gprolog}:
stdenv.mkDerivation {
pname = "extol";
inherit version;
src = self;
nativeBuildInputs = [ gprolog ];
configurePhase = "make configure PREFIX=$out";
doCheck = true;
}) {};
packages = each ({pkgs, packages, ...}: {
extol = extol pkgs;
default = packages.extol;
});
checks = each ({pkgs, packages, ...}: {
inherit (packages) extol;
});
systems = ["x86_64-linux" "i686-linux"];
each = f: builtins.listToAttrs (map (system: {
name = system;
value = f {
packages = packages.${system};
pkgs = nixpkgs.legacyPackages.${system};
};
}) systems);
in {
inherit packages;
inherit checks;
};
}