summaryrefslogtreecommitdiff
path: root/skip/cabal
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
committerdavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
commitf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch)
tree76fe6267f8307e7630fc6f53ff99a9767ad40de0 /skip/cabal
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
Diffstat (limited to 'skip/cabal')
-rw-r--r--skip/cabal/cabal.project.freeze47
-rw-r--r--skip/cabal/cabal.xibuild52
2 files changed, 61 insertions, 38 deletions
diff --git a/skip/cabal/cabal.project.freeze b/skip/cabal/cabal.project.freeze
index 07c927e..f4c0bd7 100644
--- a/skip/cabal/cabal.project.freeze
+++ b/skip/cabal/cabal.project.freeze
@@ -1,65 +1,68 @@
active-repositories: hackage.haskell.org:merge
-constraints: any.Cabal ==3.6.2.0,
- Cabal -bundled-binary-generic,
- any.HTTP ==4000.3.16,
- HTTP -conduit10 -mtl1 +network-uri -warn-as-error -warp-tests,
+constraints: any.Cabal ==3.8.1.0,
+ any.Cabal-syntax ==3.8.1.0,
+ any.HTTP ==4000.4.1,
+ HTTP -conduit10 +network-uri -warn-as-error -warp-tests,
any.array ==0.5.4.0,
any.async ==2.2.4,
async -bench,
- any.base ==4.15.0.0,
- any.base-orphans ==0.8.6,
+ any.base ==4.15.1.0,
+ any.base-orphans ==0.8.7,
any.base16-bytestring ==1.0.2.0,
any.base64-bytestring ==1.2.1.0,
any.binary ==0.8.8.0,
any.bytestring ==0.10.12.1,
- cabal-install -debug-conflict-sets -debug-expensive-assertions -debug-tracetree +lukko +native-dns,
+ cabal-install +lukko +native-dns,
+ any.cabal-install-solver ==3.8.1.0,
+ cabal-install-solver -debug-conflict-sets -debug-expensive-assertions -debug-tracetree,
any.containers ==0.6.4.1,
any.cryptohash-sha256 ==0.11.102.1,
cryptohash-sha256 -exe +use-cbits,
any.deepseq ==1.4.5.0,
- any.directory ==1.3.6.1,
+ any.directory ==1.3.6.2,
any.echo ==0.1.4,
echo -example,
any.ed25519 ==0.0.5.0,
ed25519 +no-donna +test-doctests +test-hlint +test-properties,
any.edit-distance ==0.2.2.1,
+ any.exceptions ==0.10.4,
any.filepath ==1.4.2.1,
- any.ghc-bignum ==1.0,
- any.ghc-bignum-orphans ==0.1.1,
- any.ghc-boot-th ==9.0.1,
+ any.ghc-bignum ==1.1,
+ any.ghc-boot-th ==9.0.2,
any.ghc-prim ==0.7.0,
- any.hackage-security ==0.6.0.1,
- hackage-security +base48 +lukko -mtl21 -old-directory +use-network-uri,
- any.hashable ==1.4.0.0,
+ any.hackage-security ==0.6.2.2,
+ hackage-security +base48 -cabal-syntax +lukko -mtl21 -old-directory +use-network-uri,
+ any.hashable ==1.4.1.0,
hashable +containers +integer-gmp -random-initial-seed,
any.hsc2hs ==0.68.8,
hsc2hs -in-ghc-tree,
any.lukko ==0.1.1.3,
lukko +ofd-locking,
any.mtl ==2.2.2,
- any.network ==3.1.2.5,
+ any.network ==3.1.2.7,
network -devel,
any.network-uri ==2.6.4.1,
any.parsec ==3.1.14.0,
any.pretty ==1.1.3.6,
- any.process ==1.6.11.0,
- any.random ==1.2.1,
+ any.process ==1.6.15.0,
+ any.random ==1.2.1.1,
any.regex-base ==0.94.0.2,
any.regex-posix ==0.96.0.1,
regex-posix -_regex-posix-clib,
any.resolv ==0.1.2.0,
- any.rts ==1.0,
+ any.rts ==1.0.2,
+ any.safe-exceptions ==0.1.7.3,
any.splitmix ==0.1.0.4,
splitmix -optimised-mixer,
any.stm ==2.5.0.0,
any.tar ==0.5.1.1,
tar -old-bytestring -old-time,
any.template-haskell ==2.17.0.0,
- any.text ==1.2.4.1,
- any.th-compat ==0.1.3,
+ any.text ==1.2.5.0,
+ any.th-compat ==0.1.4,
any.time ==1.9.3,
any.transformers ==0.5.6.2,
any.unix ==2.7.2.2,
- any.zlib ==0.6.2.3,
+ any.zlib ==0.6.3.0,
zlib -bundled-c-zlib -non-blocking-ffi -pkg-config
-index-state: hackage.haskell.org 2021-11-17T20:47:55Z
+index-state: hackage.haskell.org 2022-08-16T18:13:49Z
diff --git a/skip/cabal/cabal.xibuild b/skip/cabal/cabal.xibuild
index 501b0e3..64bcd18 100644
--- a/skip/cabal/cabal.xibuild
+++ b/skip/cabal/cabal.xibuild
@@ -3,24 +3,37 @@
NAME="cabal"
DESC="The Haskell Cabal"
-MAKEDEPS="cabal-stage0"
-DEPS="gmp libffi musl zlib "
+MAKEDEPS="ghc gmp libffi zlib cabal-bootstrap"
-PKG_VER=3.6.2.0
+PKG_VER=3.8.1.0
SOURCE="https://hackage.haskell.org/package/cabal-install-$PKG_VER/cabal-install-$PKG_VER.tar.gz"
-ADDITIONAL="cabal.project.freeze "
+ADDITIONAL="
+cabal.project.freeze
+"
+
+cabal_update() {
+ cd $BUILD_ROOT
+ # Build a freeze file to make the build reproducible.
+ # This freeze file is stored in $source and thus tracked in Git.
+ HOME="$_cabal_home" cabal v2-update --allow-newer
+ (
+ cd "$BUILD_ROOT"
+ HOME="$_cabal_home" cabal v2-freeze \
+ --allow-newer --shadow-installed-packages
+ mv cabal.project.freeze "$startdir/"
+ )
+}
-prepare () {
- export cabal_home="$BUILD_ROOT/dist"
-
- ln -sf cabal.project.freeze \
- "cabal.project.freeze"
+prepare() {
+ apply_patches
+ ln -sf "$BUILD_ROOT/cabal.project.freeze" \
+ "$BUILD_ROOT/cabal.project.freeze"
}
-build () {
- HOME="$cabal_home" cabal v2-update
- HOME="$cabal_home" cabal v2-build all \
+build() {
+ HOME="$_cabal_home" cabal v2-update
+ HOME="$_cabal_home" cabal v2-build all \
--allow-newer \
--jobs=${JOBS:-1} \
--prefix=/usr \
@@ -28,13 +41,20 @@ build () {
--sysconfdir=/etc
}
-package () {
- HOME="$cabal_home" cabal list-bin --allow-newer all:exes | \
- xargs install -Dm755 -t "$PKG_DEST"/usr/bin
+package() {
+ # With v2- cabal no longer wants us to separate v2-build and
+ # v2-install, however, we don't want to build everything in a
+ # fakeroot. We work around this by copying binaries build in the
+ # previous step manually.
+ #
+ # See https://github.com/haskell/cabal/issues/6919#issuecomment-761563498
+ HOME="$_cabal_home" cabal list-bin --allow-newer all:exes | \
+ xargs install -Dm755 -t "$PKG_DEST"/usr/bin
mkdir -p "$PKG_DEST"/usr/share/man/man1
- HOME="$cabal_home" cabal man --raw \
+ HOME="$_cabal_home" cabal man --raw \
> "$PKG_DEST"/usr/share/man/man1/cabal.1
install -Dm644 LICENSE "$PKG_DEST/usr/share/licenses/cabal/LICENSE"
}
+