Skip to content

Commit 064bce2

Browse files
Julian OspaldJaredCorduan
authored andcommitted
Fix build for cabal users that don't have systemd
This is mainly due to a cabal bug and should be removed in the future: haskell/cabal#5444 There are various distros, where installing development files of libsystemd won't be an option: - Alpine (doesn't have systemd at all) - Gentoo (not installable when eudev is installed) - Exherbo (not installable when eudev is installed) Users are expected to run the script and then execute cabal like so: cabal build --project-file=cabal.nosystemd.project all
1 parent ed81c6e commit 064bce2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

scripts/gen-cabal-nosystemd.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
3+
# force systemd off until there's a solution to
4+
# https://github.com/haskell/cabal/issues/5444
5+
6+
set -eux
7+
8+
root="$(dirname "$(dirname "$(realpath "$0")")")"
9+
10+
cd "${root}"
11+
12+
perl -00 -ne 'print if not /.*scribe-systemd.*/' cabal.project > cabal.nosystemd.project
13+
echo "" >> cabal.nosystemd.project
14+
echo "flags: -systemd" >> cabal.nosystemd.project
15+
16+
if [ -e cabal.project.freeze ] ; then
17+
cp cabal.project.freeze cabal.nosystemd.project.freeze
18+
fi

0 commit comments

Comments
 (0)