darwin.apple_sdk_11_0.libpm: init

This commit is contained in:
Weijia Wang 2023-01-18 14:58:43 +01:00
parent c6a66632f9
commit 846e4de6e8
2 changed files with 24 additions and 0 deletions

View file

@ -50,6 +50,7 @@ let
libcharset = callPackage ./libcharset.nix {}; libcharset = callPackage ./libcharset.nix {};
libunwind = callPackage ./libunwind.nix {}; libunwind = callPackage ./libunwind.nix {};
libnetwork = callPackage ./libnetwork.nix {}; libnetwork = callPackage ./libnetwork.nix {};
libpm = callPackage ./libpm.nix {};
# Avoid introducing a new objc4 if stdenv already has one, to prevent # Avoid introducing a new objc4 if stdenv already has one, to prevent
# conflicting LLVM modules. # conflicting LLVM modules.
objc4 = if stdenv ? objc4 then stdenv.objc4 else callPackage ./libobjc.nix {}; objc4 = if stdenv ? objc4 then stdenv.objc4 else callPackage ./libobjc.nix {};

View file

@ -0,0 +1,23 @@
{ stdenvNoCC, MacOSX-SDK, checkReexportsHook }:
stdenvNoCC.mkDerivation {
pname = "libpm";
version = MacOSX-SDK.version;
dontUnpack = true;
dontBuild = true;
nativeBuildInputs = [ checkReexportsHook ];
installPhase = ''
mkdir -p $out/lib
cp ${MacOSX-SDK}/usr/lib/libpm* $out/lib
'';
passthru = {
tbdRewrites = {
const."/usr/lib/libpmenergy.dylib" = "${placeholder "out"}/lib/libpmenergy.dylib";
const."/usr/lib/libpmsample.dylib" = "${placeholder "out"}/lib/libpmsample.dylib";
};
};
}