nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 mkDerivation,
4 fetchFromGitHub,
5 ghc,
6 cabal-install,
7}:
8
9mkDerivation {
10 pname = "cubical-mini";
11 version = "0.5-unstable-2025-06-13";
12
13 src = fetchFromGitHub {
14 repo = "cubical-mini";
15 owner = "cmcmA20";
16 rev = "1776874d13d0b811e6eeb70d0e5a52b4d2a978d2";
17 hash = "sha256-UxWOS+uzP9aAaMdSueA2CAuzWkImGAoKxroarcgpk+w=";
18 };
19
20 nativeBuildInputs = [
21 ghc
22 cabal-install
23 ];
24
25 # Makefile uses `cabal run` which tries to write its default config to $HOME and download package
26 # lists. We need to create an empty config file to make cabal work offline.
27 buildPhase = ''
28 runHook preBuild
29 export HOME=$TMP
30 mkdir $HOME/.cabal
31 touch $HOME/.cabal/config
32 make
33 runHook postBuild
34 '';
35
36 meta = {
37 homepage = "https://github.com/cmcmA20/cubical-mini";
38 description = "Nonstandard library for Cubical Agda";
39 license = lib.licenses.agpl3Only;
40 platforms = lib.platforms.unix;
41 maintainers = with lib.maintainers; [ thelissimus ];
42 };
43}