Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Adding dependency with cabal in gitlab-ci
Post
Adding dependency with cabal in gitlab-ci
I have a project I normally build with nix and cabal, however I also want to publish my documentation onto gitlab pages. It's impractical to run my nix on the gitlab CI, so I've just been using cabal. Here was my .gitlab-ci.yaml
:
default:
image: haskell:9
stages:
- pages
pages:
stage: pages
artifacts:
paths:
- public
script:
- cabal v2-haddock --builddir=out
- mv ./out/build/*/ghc-*/*-*/doc/html/*/ ./public
And here's my package.yaml
:
name: lib
version: 0.1.1.0
license: AGPL
author: Me
copyright: 2024 Me
extra-source-files:
- README.md
dependencies:
- base >= 4.14 && < 5
- containers >= 0.6.5 && < 0.7
library:
source-dirs:
src
This worked until I needed to use text-icu
. I added text-icu
to my nix and package.yaml
:
dependencies:
- base >= 4.14 && < 5
- containers >= 0.6.5 && < 0.7
+ - text
+ - text-icu >= 0.7 && < 0.9
And this works on my local machine just fine. But I can't use my nix on gitlab CI and gitlab's docker image doesn't have text-icu
. So I get an error:
Error: cabal: Could not resolve dependencies:
[__0] trying: lib-0.1.1.0 (user goal)
[__1] unknown package: text-icu (dependency of lib)
[__1] fail (backjumping, conflict set: lib, text-icu)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: lib, text-icu
How can I supply this dependency to the gitlab-ci so that cabal can access it?
1 comment thread