Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade nix dependencies #516

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/haskell-ci-github-containerimage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 7a1346f32cba7028846e88cc6c56c4123ab5faad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=B3man=20Joost?= <[email protected]>
Date: Wed, 1 Jan 2025 10:05:46 +1000
Subject: [PATCH] use newer ubuntu image

Currently a bug in the older versions prevents the caching step to
work:

/__e/node20/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /__e/node20/bin/node)
---
.github/workflows/haskell-ci.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml
index 4e6aede..0feae24 100644
--- a/.github/workflows/haskell-ci.yml
+++ b/.github/workflows/haskell-ci.yml
@@ -19,11 +19,11 @@ on:
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
timeout-minutes:
60
container:
- image: buildpack-deps:bionic
+ image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
--
2.47.0

82 changes: 21 additions & 61 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# This GitHub workflow config has been generated by a script via
#
# haskell-ci '--hlint' '--hlint-job' '9.4.7' '--haddock' '--apt' 'elinks tmux vim less notmuch libnotmuch-dev libtalloc-dev' '--github-patches' '.github/haskell-ci-github.patch' 'github' 'purebred.cabal'
# haskell-ci 'github' 'purebred.cabal' '--config' 'cabal.haskell-ci'
#
# To regenerate the script (for example after adjusting tested-with) run
#
# haskell-ci regenerate
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.17.20231010
# version: 0.18.1
#
# REGENDATA ("0.17.20231010",["--hlint","--hlint-job","9.4.7","--haddock","--apt","elinks tmux vim less notmuch libnotmuch-dev libtalloc-dev","--github-patches",".github/haskell-ci-github.patch","github","purebred.cabal"])
# REGENDATA ("0.18.1",["github","purebred.cabal","--config","cabal.haskell-ci"])
#
name: Haskell-CI
on:
Expand All @@ -19,11 +19,11 @@ on:
jobs:
linux:
name: Haskell-CI - Linux - ${{ matrix.compiler }}
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
timeout-minutes:
60
container:
image: buildpack-deps:bionic
image: buildpack-deps:jammy
continue-on-error: ${{ matrix.allow-failure }}
strategy:
matrix:
Expand Down Expand Up @@ -61,31 +61,21 @@ jobs:
- compiler: ghc-8.8.4
compilerKind: ghc
compilerVersion: 8.8.4
setup-method: hvr-ppa
setup-method: ghcup
allow-failure: false
fail-fast: false
steps:
- name: apt
run: |
apt-get update
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
if [ "${{ matrix.setup-method }}" = ghcup ]; then
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update
apt-get install -y elinks less libnotmuch-dev libtalloc-dev notmuch tmux vim
else
apt-add-repository -y 'ppa:hvr/ghc'
apt-get update
apt-get install -y "$HCNAME" elinks less libnotmuch-dev libtalloc-dev notmuch tmux vim
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
fi
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.20.0/x86_64-linux-ghcup-0.1.20.0 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
apt-get update
apt-get install -y elinks less libnotmuch-dev libtalloc-dev notmuch tmux vim
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
Expand All @@ -97,22 +87,13 @@ jobs:
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
HCDIR=/opt/$HCKIND/$HCVER
if [ "${{ matrix.setup-method }}" = ghcup ]; then
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
else
HC=$HCDIR/bin/$HCKIND
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
fi

HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
Expand Down Expand Up @@ -159,11 +140,6 @@ jobs:
- name: update cabal index
run: |
$CABAL v2-update -v
- name: cache (tools)
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-6a3a2bb8
path: ~/.haskell-ci-tools
- name: install cabal-plan
run: |
mkdir -p $HOME/.cabal/bin
Expand All @@ -173,18 +149,6 @@ jobs:
rm -f cabal-plan.xz
chmod a+x $HOME/.cabal/bin/cabal-plan
cabal-plan --version
- name: install hlint
run: |
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then HLINTVER=$(cd /tmp && (${CABAL} v2-install -v $ARG_COMPILER --dry-run hlint --constraint='hlint >=3.5 && <3.6' | perl -ne 'if (/\bhlint-(\d+(\.\d+)*)\b/) { print "$1"; last; }')); echo "HLint version $HLINTVER" ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then if [ ! -e $HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint ]; then echo "Downloading HLint version $HLINTVER"; mkdir -p $HOME/.haskell-ci-tools; curl --write-out 'Status Code: %{http_code} Redirects: %{num_redirects} Total time: %{time_total} Total Dsize: %{size_download}\n' --silent --location --output $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz "https://github.com/ndmitchell/hlint/releases/download/v$HLINTVER/hlint-$HLINTVER-x86_64-linux.tar.gz"; tar -xzv -f $HOME/.haskell-ci-tools/hlint-$HLINTVER.tar.gz -C $HOME/.haskell-ci-tools; fi ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then mkdir -p $CABAL_DIR/bin && ln -sf "$HOME/.haskell-ci-tools/hlint-$HLINTVER/hlint" $CABAL_DIR/bin/hlint ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then hlint --version ; fi
- name: save cache (tools)
uses: actions/cache/save@v3
if: always()
with:
key: ${{ runner.os }}-${{ matrix.compiler }}-tools-6a3a2bb8
path: ~/.haskell-ci-tools
- name: checkout
uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -248,17 +212,13 @@ jobs:
- name: tests
run: |
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
- name: hlint
run: |
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_purebred} && hlint -XHaskell2010 src) ; fi
if [ $((HCNUMVER >= 90400 && HCNUMVER < 90600)) -ne 0 ] ; then (cd ${PKGDIR_purebred} && hlint -XHaskell2010 app) ; fi
- name: cabal check
run: |
cd ${PKGDIR_purebred} || false
${CABAL} -vnormal check
- name: haddock
run: |
$CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all ; fi
- name: unconstrained build
run: |
rm -f cabal.project.local
Expand Down
15 changes: 0 additions & 15 deletions .nix/bimap.nix

This file was deleted.

26 changes: 0 additions & 26 deletions .nix/brick.nix

This file was deleted.

18 changes: 0 additions & 18 deletions .nix/hsnotmuch.nix

This file was deleted.

13 changes: 1 addition & 12 deletions .nix/overlays.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
let
haskellCompilerVersion = "ghc924";
haskellCompilerVersion = "ghc92";
haskellPackagesOverlay = self: super: with super.haskell.lib; {
haskellPackages = super.haskell.packages.${haskellCompilerVersion}.override {
overrides = hself: hsuper: {
purebred = hsuper.callPackage ./purebred.nix { };
purebred-email = hsuper.callPackage ./purebred-email.nix { };
purebred-icu = hsuper.callPackage ./purebred-icu.nix { };
brick = hsuper.callPackage ./brick.nix { };
text-zipper = hsuper.callPackage ./text-zipper.nix { };
bimap = hsuper.callPackage ./bimap.nix { };
vty = hsuper.callPackage ./vty.nix { };
vty-unix = hsuper.callPackage ./vty-unix.nix { };
vty-crossplatform = hsuper.callPackage ./vty-crossplatform.nix { };
notmuch = hsuper.callPackage ./hsnotmuch.nix {
notmuch = self.pkgs.notmuch;
talloc = self.pkgs.talloc;
};
};
};
make-purebred-with-packages = with-icu:
Expand Down
25 changes: 0 additions & 25 deletions .nix/purebred-email.nix

This file was deleted.

13 changes: 0 additions & 13 deletions .nix/text-zipper.nix

This file was deleted.

11 changes: 0 additions & 11 deletions .nix/vty-crossplatform.nix

This file was deleted.

21 changes: 0 additions & 21 deletions .nix/vty-unix.nix

This file was deleted.

19 changes: 0 additions & 19 deletions .nix/vty.nix

This file was deleted.

10 changes: 10 additions & 0 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- Configuration for haskell-ci

-- Avoid HVR's PPA due to outage on 2022-04-27
ghcup-jobs: True

-- With GHC < 9, haddock fails due to a parse error in the benchmarks.
-- https://github.com/haskell-CI/haskell-ci/issues/605
haddock: >= 9
github-patches: .github/haskell-ci-github.patch .github/haskell-ci-github-containerimage.patch
apt: elinks tmux vim less notmuch libnotmuch-dev libtalloc-dev
Loading
Loading