nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 mkDerivation,
4 fetchFromGitHub,
5 unstableGitUpdater,
6}:
7
8mkDerivation {
9 pname = "1lab";
10 version = "0-unstable-2025-07-01";
11
12 src = fetchFromGitHub {
13 owner = "the1lab";
14 repo = "1lab";
15 rev = "e9c2ad2b3ba9cefad36e72cb9d732117c68ac862";
16 hash = "sha256-wKh77+xCdfMtnq9jMlpdnEptGO+/WVNlQFa1TDbdUGs=";
17 };
18
19 postPatch = ''
20 # We don't need anything in support; avoid installing LICENSE.agda
21 rm -rf support
22
23 # Remove verbosity options as they make Agda take longer and use more memory.
24 shopt -s globstar extglob
25 files=(src/**/*.@(agda|lagda.md))
26 sed -Ei '/OPTIONS/s/ -v ?[^ #]+//g' "''${files[@]}"
27 '';
28
29 passthru.updateScript = unstableGitUpdater { };
30
31 meta = {
32 description = "Formalised, cross-linked reference resource for mathematics done in Homotopy Type Theory ";
33 homepage = "https://github.com/the1lab/1lab";
34 license = lib.licenses.agpl3Only;
35 platforms = lib.platforms.unix;
36 maintainers = with lib.maintainers; [ ncfavier ];
37 };
38}