blob: c2677b5342c16db2055dce7ad19a11c4e471c607 [file] [log] [blame]
Tim Windelschmidt98000a52025-03-06 14:22:15 +01001{ pkgs }: with pkgs;
2if (!stdenv.hostPlatform.isStatic) then perl else
3perl.overrideAttrs (old: {
4 patches = old.patches ++ [
5 ./static_build.patch
6 ];
7
8 preConfigure = old.preConfigure + ''
9 cat >> config.over <<EOF
10 osvers="musllinux"
11 EOF
12 '';
13
14 configureFlags = old.configureFlags ++ [
15 "-Dotherlibdirs=.../../lib/perl5/${old.version}" # Tell perl to use a relative libdir
16 # 1. Why isn't this the default?
17 # 2. Apparently nobody uses this option, because it is missing the quotes inside the config_h.SH
18 # 3. Why should a variable called "procselfexe" be used with a different path than /proc/self/exe?
19 # 4. I really dislike perl. - fionera
20 "-Dprocselfexe=\"/proc/self/exe\""
21 ];
22
23 env.NIX_CFLAGS_COMPILE = (old.NIX_CFLAGS_COMPILE or "") + " -Wno-error=implicit-function-declaration";
24})