Skip to content

Instantly share code, notes, and snippets.

@phijor
Last active October 19, 2021 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phijor/d83e6f40fa2fc5012a9282ffa566cf82 to your computer and use it in GitHub Desktop.
Save phijor/d83e6f40fa2fc5012a9282ffa566cf82 to your computer and use it in GitHub Desktop.
Update `agda-cubical` to version 0.3
From 850f59fa170cd72f4247b85a7e60e8c953106526 Mon Sep 17 00:00:00 2001
From: Philipp Joram <mail@phijor.me>
Date: Tue, 19 Oct 2021 13:43:41 +0300
Subject: [PATCH] Update to cubical v0.3 (agda v2.6.2)
---
.SRCINFO | 11 ++++-------
PKGBUILD | 28 ++++++++++++++++------------
cubical.agda-lib.in | 3 ---
3 files changed, 20 insertions(+), 22 deletions(-)
delete mode 100644 cubical.agda-lib.in
diff --git a/.SRCINFO b/.SRCINFO
index a22aa01..6695463 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,14 @@
pkgbase = agda-cubical
pkgdesc = An experimental library for Cubical Agda
- pkgver = 0.2
+ pkgver = 0.3
pkgrel = 1
url = https://github.com/agda/cubical
arch = x86_64
license = MIT
makedepends = ghc-libs
- depends = agda=2.6.1.2
+ depends = agda=2.6.2
options = staticlibs
- source = agda-cubical-0.2.tar.gz::https://github.com/agda/cubical/archive/v0.2.tar.gz
- source = cubical.agda-lib.in
- sha512sums = 19defe1e9645e9c259eb619549412587f29f2f1463ccf8a620d45b0a940faa84754fb8795c3d2eafc9feb4e503d1a24e26ae4dbcd02e30af2597ef2f91b4daba
- sha512sums = 721438844cd3c8f1b4b015ba55e548705ace58870ce8eadbaa280b7f34119d24a7f7d1fb7545c9ab121043cb542e7dc55ee0f06fe075caa5b69adabafc0c84fc
+ source = agda-cubical-0.3.tar.gz::https://github.com/agda/cubical/archive/v0.3.tar.gz
+ sha512sums = a64c3920587832c8b49dd5af0e03e1697fd7e4b8d0bba4e204e1cd641c5afc5f6a744050fcb11079a25d4d7d7755ed7d98bc20ab420f4a2b794adb91a9a153e7
pkgname = agda-cubical
-
diff --git a/PKGBUILD b/PKGBUILD
index 37637c8..74bd1ca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Potato Hatsue <berberman@yandex.com>
pkgname=agda-cubical
-pkgver=0.2
-_agdaver=2.6.1.2
+pkgver=0.3
+_agdaver=2.6.2
pkgrel=1
pkgdesc="An experimental library for Cubical Agda"
url="https://github.com/agda/cubical"
@@ -11,28 +11,32 @@ arch=('x86_64')
depends=("agda=$_agdaver")
makedepends=("ghc-libs")
options=('staticlibs')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/agda/cubical/archive/v$pkgver.tar.gz"
-cubical.agda-lib.in)
-sha512sums=('19defe1e9645e9c259eb619549412587f29f2f1463ccf8a620d45b0a940faa84754fb8795c3d2eafc9feb4e503d1a24e26ae4dbcd02e30af2597ef2f91b4daba'
- '721438844cd3c8f1b4b015ba55e548705ace58870ce8eadbaa280b7f34119d24a7f7d1fb7545c9ab121043cb542e7dc55ee0f06fe075caa5b69adabafc0c84fc')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/agda/cubical/archive/v$pkgver.tar.gz")
+sha512sums=('a64c3920587832c8b49dd5af0e03e1697fd7e4b8d0bba4e204e1cd641c5afc5f6a744050fcb11079a25d4d7d7755ed7d98bc20ab420f4a2b794adb91a9a153e7')
+
+# Note: these have to be kept in sync with the flags in `cubical.agda-lib`
+_AGDA_FLAGS="--cubical --no-import-sorts"
prepare() {
cd cubical-$pkgver
- rm cubical.agda-lib
+ # Allow to import the library as "cubical", not "cubical-$pkgver"
+ sed -i "s/name:\\s\\+cubical-$pkgver/name: cubical/" cubical.agda-lib
}
build() {
cd cubical-$pkgver
-
+
runhaskell --ghc-arg=-dynamic ./Everythings.hs gen-except Core Foundations Codata Experiments
- agda Cubical/README.agda
- agda Cubical/WithK.agda
+ agda $_AGDA_FLAGS Cubical/README.agda
+}
+check() {
+ cd cubical-$pkgver
+
+ agda $_AGDA_FLAGS Cubical/WithK.agda
}
package() {
- install -Dm644 cubical.agda-lib.in "$pkgdir"/usr/share/agda/lib/cubical.agda-lib
-
cd cubical-$pkgver
install -dm755 "$pkgdir"/usr/share/agda/lib/cubical
diff --git a/cubical.agda-lib.in b/cubical.agda-lib.in
deleted file mode 100644
index 222f12b..0000000
--- a/cubical.agda-lib.in
+++ /dev/null
@@ -1,3 +0,0 @@
-name: cubical
-include: cubical/
-depend:
--
2.33.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment