blob: e8f5a0ded03fe2d3c8e725ff617d47a431088a54 [file] [log] [blame]
Tim Windelschmidt778649e2025-07-23 03:50:27 +02001{ lib, super, ... }@inputs:
2let
3 # Passthrough default configuration without our custom super attribute. Perl
4 # requires itself which breaks when we don't pass through the default attributes.
5 perl = super.perl.override (_: (lib.filterAttrs (name: _: name != "super") inputs));
6in
Tim Windelschmidt98000a52025-03-06 14:22:15 +01007perl.overrideAttrs (old: {
8 patches = old.patches ++ [
9 ./static_build.patch
10 ];
11
12 preConfigure = old.preConfigure + ''
13 cat >> config.over <<EOF
14 osvers="musllinux"
15 EOF
16 '';
17
18 configureFlags = old.configureFlags ++ [
19 "-Dotherlibdirs=.../../lib/perl5/${old.version}" # Tell perl to use a relative libdir
20 # 1. Why isn't this the default?
21 # 2. Apparently nobody uses this option, because it is missing the quotes inside the config_h.SH
22 # 3. Why should a variable called "procselfexe" be used with a different path than /proc/self/exe?
23 # 4. I really dislike perl. - fionera
24 "-Dprocselfexe=\"/proc/self/exe\""
25 ];
26
27 env.NIX_CFLAGS_COMPILE = (old.NIX_CFLAGS_COMPILE or "") + " -Wno-error=implicit-function-declaration";
28})