| Tim Windelschmidt | 778649e | 2025-07-23 03:50:27 +0200 | [diff] [blame^] | 1 | { lib, super, ... }@inputs: |
| 2 | let |
| 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)); |
| 6 | in |
| Tim Windelschmidt | 98000a5 | 2025-03-06 14:22:15 +0100 | [diff] [blame] | 7 | perl.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 | }) |