Skip to content

Commit ad63bd8

Browse files
sgillespiekderme
authored andcommitted
build: Permanently disable linking against systemd
systemd is used by cardano-node for the scribe-backend, but we never use this, so we disable it unconditionally. Our distributed builds (binary and docker) are statically linked, so it would not be available anyways.
1 parent a3be746 commit ad63bd8

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

cabal.project

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ package cardano-db-tool
3636
package cardano-smash-server
3737
ghc-options: -Wall -Werror -Wredundant-constraints -Wincomplete-uni-patterns -Wincomplete-record-updates -Wpartial-fields -Wunused-imports -Wunused-packages
3838

39+
package cardano-node
40+
-- We are using cardano-node as a library and we never use the systemd scribe, so there
41+
-- is no benefit to linking against it
42+
flags: -systemd
43+
3944
package postgresql-libpq
4045
flags: +use-pkg-config
4146

flake.nix

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@
190190
packages.katip.doExactConfig = true;
191191
# Split data to reduce closure size
192192
packages.ekg.components.library.enableSeparateDataOutput = true;
193-
# Systemd can't be statically linked
194-
packages.cardano-node.flags.systemd =
195-
!pkgs.stdenv.hostPlatform.isMusl;
196193
})
197194

198195
({
@@ -248,20 +245,6 @@
248245
packages.cardano-chain-gen.components.tests.cardano-chain-gen =
249246
postgresTest;
250247
})
251-
252-
({ lib, pkgs, ... }: {
253-
# TODO[sgillespie]: The following line is currently required to avoid
254-
# the following error:
255-
#
256-
# error: The Haskell package set does not contain the package:
257-
# lobemo-scribe-systemd (build dependency). If you are using Stackage,
258-
# make sure that you are using a snapshot that contains the
259-
# package. Otherwise you may need to update the Hackage snapshot you are
260-
# using, usually by updating haskell.nix.
261-
#
262-
# This started happening here: https://github.com/input-output-hk/hackage.nix/commit/958f69d793847b532874a66201a491423f2ec551
263-
packages.cardano-node.flags.systemd = lib.mkForce false;
264-
})
265248
];
266249
})).appendOverlays [
267250
# Collect local package `exe`s

0 commit comments

Comments
 (0)