idiosyn/overlay/fixes.nix

205 lines
6.3 KiB
Nix
Raw Permalink Normal View History

2024-10-13 11:24:31 +02:00
{ self, nixpkgs, ... }: final: prev:
2024-08-28 00:23:03 +02:00
let
2024-10-13 20:28:12 +02:00
inherit (nixpkgs) lib;
inherit (lib) toList;
2024-10-13 11:24:31 +02:00
inherit (prev.stdenv) buildPlatform hostPlatform;
inherit (self.lib) removePackages;
prev' = prev;
final' = final;
2024-08-28 00:23:03 +02:00
in {
2024-10-13 11:24:31 +02:00
gst_all_1 = prev.gst_all_1 // {
gst-plugins-bad = prev.gst_all_1.gst-plugins-bad.overrideAttrs (prevAttrs: {
buildInputs = prevAttrs.buildInputs or [ ] |> removePackages [ "libajantv2" ];
});
};
perlPackages = prev.perlPackages.overrideScope (final: prev: {
DBI = prev.DBI.overrideAttrs (prevAttrs: {
nativeBuildInputs = prevAttrs.nativeBuildInputs or [ ] ++ [
final'.stdenv.cc
final'.stdenv.cc.binutils
];
makeMakerFlags = prevAttrs.makeMakerFlags or [ ] ++ [
"CC=${final'.stdenv.cc.targetPrefix}cc"
"LD=${final'.stdenv.cc.targetPrefix}cc"
"CCFLAGS=-Doff64_t=off_t"
];
});
});
bind = prev.bind.overrideAttrs (prevAttrs: {
buildInputs = prevAttrs.buildInputs or [ ] |> removePackages [ "jemalloc" ];
});
diffutils = prev.diffutils.overrideAttrs (prevAttrs: {
configureFlags = prevAttrs.configureFlags or [ ] ++ [ "--disable-nls" ];
postPatch = ''
sed -E -i 's/test-getopt-(gnu|posix)//g' gnulib-tests/Makefile.in
'';
});
gnu-efi = prev.gnu-efi.overrideAttrs (prevAttrs: {
nativeBuildInputs = prevAttrs.nativeBuildInputs or [ ] ++ [ final.buildPackages.binutils ];
makeFlags = prevAttrs.makeFlags or [ ] ++ [ "CC=${final.stdenv.cc.targetPrefix}cc" ];
});
gsm = prev.gsm.overrideAttrs (prevAttrs: {
makeFlags = prevAttrs.makeFlags or [ ] ++ [ "CC=${final.stdenv.cc.targetPrefix}cc" ];
});
keyutils = prev.keyutils.overrideAttrs (prevAttrs: {
NIX_LDFLAGS = toList prevAttrs.NIX_LDFLAGS or [ ] ++ [ "--undefined-version" ];
});
kexec-tools = prev.kexec-tools.override { stdenv = final.gccStdenv; };
level-zero = prev.level-zero.overrideAttrs (prevAttrs: {
cmakeFlags = prevAttrs.cmakeFlags or [ ] ++ [ "-DCMAKE_CXX_FLAGS=-Wno-error=deprecated" ];
});
libcdio = prev.libcdio.overrideAttrs (prevAttrs: {
nativeBuildInputs = prevAttrs.nativeBuildInputs or [ ] ++ [ final.buildPackages.binutils ];
});
libjpeg = prev.libjpeg.overrideAttrs (prevAttrs: {
cmakeFlags = prevAttrs.cmakeFlags or [ ] ++ [ "-DFLOATTEST12=fp-contract" ];
});
liboping = prev.liboping.overrideAttrs (prevAttrs: {
configureFlags = prevAttrs.configureFlags or [ ] ++ [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
});
libselinux = prev.libselinux.override { enablePython = false; };
liburing = prev.liburing.overrideAttrs (finalAttrs: prevAttrs: {
version = "2.8";
src = final.fetchFromGitHub {
owner = "axboe";
repo = "liburing";
rev = "refs/tags/liburing-${finalAttrs.version}";
hash = "sha256-10zmoMDzO41oNRVXE/6FzDGPVRVJTJTARVUmc1b7f+o=";
};
});
llvmPackages = prev.llvmPackages // {
libcxx = prev.llvmPackages.libcxx.override {
devExtraCmakeFlags = [ "-DLIBCXX_HAS_MUSL_LIBC=1" ];
};
};
lua = prev.lua.overrideAttrs (prevAttrs: {
env = prevAttrs.env or { } // { LD = "${final.stdenv.cc.targetPrefix}ld"; };
makeFlags = prevAttrs.makeFlags or [ ] ++ [ "LD=${final.stdenv.cc.targetPrefix}ld" ];
});
netbsd = prev.netbsd.overrideScope (final: prev: {
compatIfNeeded = [ final.compat ];
compat = prev.compat.overrideAttrs (prevAttrs: {
makeFlags = prevAttrs.makeFlags ++ [ "OBJCOPY=:" ];
});
});
numactl = prev.numactl.overrideAttrs (prevAttrs: {
patches = prevAttrs.patches or [ ] ++ [
(final.fetchpatch {
url = "https://github.com/numactl/numactl/commit/f9deba0c8404529772468d6dd01389f7dbfa5ba9.patch";
hash = "sha256-TmWfD99YaSIHA5PSsWHE91GSsdsVgVU+qIow7LOwOGw=";
})
];
});
2024-10-13 11:24:31 +02:00
python3 = (prev.python3.overrideAttrs (prevAttrs: {
env = prevAttrs.env or { } // {
LD = "${final.stdenv.cc.bintools}/bin/${final.stdenv.cc.targetPrefix}ld";
};
configureFlags = prevAttrs.configureFlags or [ ] ++ [
"LD=${final.stdenv.cc.bintools}/bin/${final.stdenv.cc.targetPrefix}ld"
];
2024-08-28 16:02:10 +02:00
2024-10-13 11:24:31 +02:00
postFixup = prevAttrs.postFixup + ''
cat <<EOF >>"$out/nix-support/setup-hook"
setuptoolsDistutilsHook() {
export SETUPTOOLS_USE_DISTUTILS="stdlib"
}
addEnvHooks "\$hostOffset" setuptoolsDistutilsHook
EOF
'';
})).override {
2024-08-28 16:02:10 +02:00
packageOverrides = final: prev: {
2024-10-13 11:24:31 +02:00
defusedxml = prev.defusedxml.overrideAttrs {
2024-09-01 11:12:23 +02:00
doCheck = false;
doInstallCheck = false;
2024-10-13 11:24:31 +02:00
};
html5-parser = prev.html5-parser.overrideAttrs (prevAttrs: {
env = prevAttrs.env or { } // {
LD = "${final.stdenv.cc.targetPrefix}cc";
};
});
netifaces = prev.netifaces.overrideAttrs (prevAttrs: {
env = prevAttrs.env or { } // {
NIX_CFLAGS_COMPILE = toList prevAttrs.env.NIX_CFLAGS_COMPILE or [ ] ++ [
"-Wno-error=int-conversion"
] |> toString;
};
2024-09-01 11:12:23 +02:00
});
2024-10-13 11:24:31 +02:00
pycparser = prev.pycparser.overrideAttrs {
doCheck = false;
doInstallCheck = false;
};
2024-08-28 16:02:10 +02:00
};
};
2024-10-13 11:24:31 +02:00
python3Packages = final.python3.pkgs;
redis = prev.redis.overrideAttrs { doCheck = false; };
sane-backends = prev.sane-backends.overrideAttrs (prevAttrs: {
buildInputs = prevAttrs.buildInputs or [ ] |> removePackages [ "net-snmp" ];
});
sioyek = prev.sioyek.overrideAttrs (prevAttrs: {
env = prevAttrs.env or { } // {
NIX_CFLAGS_COMPILE = toList prevAttrs.env.NIX_CFLAGS_COMPILE or [ ]
++ [ "-DGL_CLAMP=GL_CLAMP_TO_EDGE" ] |> toString;
};
});
2024-10-13 11:24:31 +02:00
soundtouch = prev.soundtouch.overrideAttrs (prevAttrs: {
nativeBuildInputs = prevAttrs.nativeBuildInputs or [ ] ++ [ final.binutils ];
});
time = prev.time.overrideAttrs (prevAttrs: {
env = prevAttrs.env or { } // {
CFLAGS = toList prevAttrs.env.CFLAGS or [ ] ++ [
"-Wno-error=implicit-function-declaration"
] |> toString;
};
});
usrsctp = prev.usrsctp.overrideAttrs (prevAttrs: {
cmakeFlags = prevAttrs.cmakeFlags or [ ] ++ [ "-Dsctp_werror=0" ];
});
zeromq = prev.zeromq.overrideAttrs (prevAttrs: {
postPatch = prevAttrs.postPatch or "" + ''
substituteInPlace CMakeLists.txt \
--replace-fail 'CACHELINE_SIZE EQUAL "undefined"' 'CACHELINE_SIZE STREQUAL "undefined"'
'';
});
2024-10-13 11:24:31 +02:00
zlib = prev.zlib.override { splitStaticOutput = false; };
2024-10-13 20:28:12 +02:00
}