{"id":13686480,"url":"https://github.com/the1lab/1lab","last_synced_at":"2025-05-01T09:31:56.363Z","repository":{"id":37041753,"uuid":"435273531","full_name":"the1lab/1lab","owner":"the1lab","description":"A formalised, cross-linked reference resource for mathematics done in Homotopy Type Theory","archived":false,"fork":false,"pushed_at":"2024-07-19T20:23:22.000Z","size":6409,"stargazers_count":319,"open_issues_count":37,"forks_count":61,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-07-20T00:53:34.432Z","etag":null,"topics":["agda","homotopy-type-theory"],"latest_commit_sha":null,"homepage":"https://1lab.dev","language":"Agda","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the1lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.bib","codeowners":null,"security":null,"support":"support/check.sh","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-05T20:38:45.000Z","updated_at":"2024-07-22T21:03:27.892Z","dependencies_parsed_at":"2023-12-27T18:39:31.102Z","dependency_job_id":"9e465fd3-2fef-45cf-8f80-c69c9cb59afa","html_url":"https://github.com/the1lab/1lab","commit_stats":null,"previous_names":["the1lab/1lab"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the1lab%2F1lab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the1lab%2F1lab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the1lab%2F1lab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the1lab%2F1lab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the1lab","download_url":"https://codeload.github.com/the1lab/1lab/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224250217,"owners_count":17280522,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agda","homotopy-type-theory"],"created_at":"2024-08-02T15:00:33.062Z","updated_at":"2024-11-12T09:30:55.950Z","avatar_url":"https://github.com/the1lab.png","language":"Agda","funding_links":[],"categories":["Agda"],"sub_categories":[],"readme":"[![Discord](https://img.shields.io/discord/914172963157323776?label=Discord\u0026logo=discord)](https://discord.gg/Zp2e8hYsuX)\n[![Build 1Lab](https://github.com/the1lab/1lab/actions/workflows/build.yml/badge.svg)](https://github.com/the1lab/1lab/actions/workflows/build.yml)\n\n# [1Lab](https://1lab.dev)\n\nA formalised, cross-linked reference resource for mathematics done in\nHomotopy Type Theory. Unlike the HoTT book, the 1lab is not a “linear”\nresource: Concepts are presented as a directed graph, with links\nindicating dependencies.\n\n# Building\n\nBuilding the 1Lab is a rather complicated task, which has led to a lot\nof homebrew infrastructure being developed for it. We build against a\nspecific build of Agda (see the `rev` field in\n`support/nix/dep/Agda/github.json`), and there are also quite a few\nexternal dependencies (e.g. pdftocairo, katex). The recommended way of\nbuilding the 1Lab is using Nix.\n\nAs a quick point of reference, `nix-build` will type-check and compile\nthe entire thing, and copy the necessary assets (TeX Gyre Pagella and\nKaTeX's CSS and fonts) to the right locations. The result will be linked\nas `./result`, which can then be used to serve a website:\n\n```bash\n$ nix-build\n$ python -m http.server --directory result\n```\n\nNote that using Nix to build the website takes around ~20-30 minutes,\nsince it will type-check the entire codebase from scratch every time.\nFor interactive development, `nix-shell` will give you a shell with\neverything you need to hack on the 1Lab, including Agda and the\npre-built Shakefile as `1lab-shake`:\n\n```bash\n$ 1lab-shake all -j\n```\n\nSince `nix-shell` will load the derivation steps as environment\nvariables, you can use something like this to copy the static assets\ninto place:\n\n```bash\n$ eval \"${installPhase}\"\n$ python -m http.server --directory _build/site\n```\n\nTo hack on a file continuously, you can use \"watch mode\", which will\nattempt to only check and build the changed file.\n\n```\n$ 1lab-shake all -w\n```\n\nAdditionally, since the validity of the Agda code is generally upheld by\n`agda-mode`, you can use `--skip-agda` to only build the prose. Note\nthat this will disable checking the integrity of link targets, the\ntranslation of `` `ref`{.Agda} `` spans, and the code blocks will be\nright ugly.\n\nOur build tools are routinely built for x86_64-linux and uploaded to\nCachix. If you have the Cachix CLI installed, simply run `cachix use\n1lab`. Otherwise, add the following to your Nix configuration:\n\n```\nsubstituters = https://1lab.cachix.org\ntrusted-public-keys = 1lab.cachix.org-1:eYjd9F9RfibulS4OSFBYeaTMxWojPYLyMqgJHDvG1fs=\n```\n\n## Directly\n\nIf you're feeling brave, you can try to replicate one of the build\nenvironments above. You will need:\n\n- The `cabal-install` package manager. Using `stack` is no longer supported.\n\n- A working LaTeX installation (TeXLive, etc) with the packages\n`tikz-cd` (depends on `pgf`), `mathpazo`, `xcolor`, `preview`, and\n`standalone` (depends on `varwidth` and `xkeyval`);\n\n- [Poppler] (for `pdftocairo`);\n- [`libsass`] (for `sassc`);\n- [Node] + required Node modules. Run `npm ci` to install those.\n\n[Poppler]: https://poppler.freedesktop.org/\n[Node]: https://nodejs.org/en/\n[`libsass`]: https://github.com/sass/sassc\n\nYou can then use cabal-install to build and run our specific version of\nAgda and our Shakefile:\n\n```bash\n$ cabal install Agda\n# This will take quite a while!\n\n$ cabal v2-run shake -- -j --skip-agda\n# the double dash separates cabal-install's arguments from our\n# shakefile's.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe1lab%2F1lab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe1lab%2F1lab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe1lab%2F1lab/lists"}