2022-05-04 11:09:49 -04:00
|
|
|
{ description = "quox: quantitative extensional type theory";
|
|
|
|
|
|
|
|
inputs = {
|
2022-10-30 13:04:09 -04:00
|
|
|
nixpkgs.url = "nixpkgs";
|
2022-10-30 08:26:44 -04:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2022-10-06 15:16:54 -04:00
|
|
|
|
|
|
|
idris2-pkgs = {
|
2022-10-30 13:04:09 -04:00
|
|
|
url = "github:lizard-business/idris2-pkgs?ref=idris0.6.0"; # [fixme]
|
|
|
|
# url = "github:claymager/idris2-pkgs";
|
2022-10-06 15:16:54 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
|
|
|
|
|
|
|
tap = {
|
|
|
|
url = "git+https://git.rhiannon.website/rhi/idris2-tap?ref=main";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.idris2-pkgs.follows = "idris2-pkgs";
|
|
|
|
};
|
2022-05-04 11:09:49 -04:00
|
|
|
};
|
|
|
|
|
2022-05-26 10:25:56 -04:00
|
|
|
outputs = { self, nixpkgs, idris2-pkgs, flake-utils, tap }:
|
2022-06-19 08:22:58 -04:00
|
|
|
let
|
|
|
|
packagePaths = {
|
|
|
|
quox-lib = ./lib;
|
|
|
|
quox = ./exe;
|
|
|
|
quox-tests = ./tests;
|
|
|
|
};
|
|
|
|
|
|
|
|
extraDeps = [ tap ];
|
|
|
|
|
|
|
|
systems = with flake-utils.lib.system;
|
2022-05-27 11:22:33 -04:00
|
|
|
[ x86_64-darwin x86_64-linux i686-linux ];
|
|
|
|
in
|
2022-06-19 08:22:58 -04:00
|
|
|
with builtins;
|
2022-05-27 11:22:33 -04:00
|
|
|
flake-utils.lib.eachSystem systems (system:
|
2022-05-04 11:09:49 -04:00
|
|
|
let
|
2022-06-19 08:22:58 -04:00
|
|
|
basePkgs = import nixpkgs {
|
2022-05-04 11:09:49 -04:00
|
|
|
inherit system;
|
|
|
|
overlays = [ idris2-pkgs.overlay ];
|
|
|
|
};
|
2022-06-19 08:22:58 -04:00
|
|
|
builders = basePkgs.idris2-pkgs._builders;
|
2022-05-26 10:25:56 -04:00
|
|
|
|
2022-06-19 08:22:58 -04:00
|
|
|
extraDepPkgs =
|
|
|
|
foldl' (acc: pkg: acc // pkg.packages.${system}) { } extraDeps;
|
|
|
|
mkPackage = name: path:
|
|
|
|
builders.idrisPackage path { extraPkgs = extraDepPkgs // packages; };
|
|
|
|
mkDevShell = _: pkg:
|
|
|
|
basePkgs.mkShell { buildInputs = [ (builders.devEnv pkg) ]; };
|
2022-05-04 12:35:43 -04:00
|
|
|
|
2022-06-19 08:22:58 -04:00
|
|
|
packages = mapAttrs mkPackage packagePaths;
|
|
|
|
devShells = mapAttrs mkDevShell packages;
|
2022-05-06 14:27:45 -04:00
|
|
|
in {
|
|
|
|
inherit packages devShells;
|
|
|
|
defaultPackage = packages.quox;
|
2022-06-19 08:22:58 -04:00
|
|
|
devShell = devShells.quox-lib;
|
2022-05-04 11:09:49 -04:00
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|