-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
41 lines (41 loc) · 1.2 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
{
description = "Formalisation of the Vehicle Language in Agda";
inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11;
flake-utils.url = github:numtide/flake-utils;
};
outputs = { self, nixpkgs, flake-utils }:
with flake-utils.lib;
eachSystem allSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
agda = pkgs.agda.withPackages
(ps: [ (ps.standard-library.overrideAttrs (oldAttrs: {
version = "2.0";
src = pkgs.fetchFromGitHub {
repo = "agda-stdlib";
owner = "agda";
rev = "v2.0";
hash = "sha256-TjGvY3eqpF+DDwatT7A78flyPcTkcLHQ1xcg+MKgCoE=";
};
})) ]);
in rec {
packages = {
html-doc = pkgs.stdenvNoCC.mkDerivation rec {
name = "vehicle-formalisation";
src = self;
buildInputs = [ agda ];
phases = ["unpackPhase" "buildPhase" "installPhase"];
buildPhase = ''
mkdir -p html;
agda --html --html-dir=html src/Everything.agda
'';
installPhase = ''
mkdir -p $out;
cp html/* $out/;
'';
};
};
defaultPackage = packages.html-doc;
});
}