python312Packages.linear-operator: 0.5.3 -> 0.6
[NixPkgs.git] / pkgs / development / compilers / dart / package-source-builders / media_kit_libs_linux / default.nix
blob60fe8cd5b47844856c8a3082a5257e075c666186
2   stdenv,
3 }:
5 # Implementation notes
7 # The patch exploits the fact that the download part is enclosed with "# ---"
8 # To use this module you will need to pass the CMake variable MIMALLOC_LIB
9 # example: -DMIMALLOC_LIB=${pkgs.mimalloc}/lib/mimalloc.o
11 # 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
13 { version, src, ... }:
15 stdenv.mkDerivation {
16   pname = "media_kit_libs_linux";
17   inherit version src;
18   inherit (src) passthru;
20   doBuild = false;
22   postPatch = ''
23     awk -i inplace 'BEGIN {opened = 0}; /# --*[^$]*/ { print (opened ? "]===]" : "#[===["); opened = !opened }; {print $0}' linux/CMakeLists.txt
24   '';
26   installPhase = ''
27     runHook preInstall
29     mkdir -p "$out"
30     cp -r ./* "$out"
32     runHook postInstall
33   '';