push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
}:
# Implementation notes
# The patch exploits the fact that the download part is enclosed with "# ---"
# To use this module you will need to pass the CMake variable MIMALLOC_LIB
# example: -DMIMALLOC_LIB=${pkgs.mimalloc}/lib/mimalloc.o
# Direct link for the original CMakeLists.txt: https://raw.githubusercontent.com/media-kit/media-kit/main/libs/linux/media_kit_libs_linux/linux/CMakeLists.txt
{ version, src, ... }:
stdenv.mkDerivation {
pname = "media_kit_libs_linux";
inherit version src;
inherit (src) passthru;
dontBuild = true;
postPatch =
lib.optionalString (lib.versionAtLeast version "1.2.1") ''
sed -i '/if(MIMALLOC_USE_STATIC_LIBS)/,/unset(MIMALLOC_USE_STATIC_LIBS CACHE)/d' linux/CMakeLists.txt
''
+ lib.optionalString (lib.versionOlder version "1.2.1") ''
awk -i inplace 'BEGIN {opened = 0}; /# --*[^$]*/ { print (opened ? "]===]" : "#[===["); opened = !opened }; {print $0}' linux/CMakeLists.txt
'';
installPhase = ''
runHook preInstall
cp -r . $out
runHook postInstall
'';
}