Merge pull request #207512 from wegank/libpmenergy

darwin.apple_sdk_11_0.libpm: init
This commit is contained in:
toonn 2023-01-19 03:00:37 +01:00 committed by GitHub
commit 0aa2211390
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -50,6 +50,7 @@ let
libcharset = callPackage ./libcharset.nix {};
libunwind = callPackage ./libunwind.nix {};
libnetwork = callPackage ./libnetwork.nix {};
libpm = callPackage ./libpm.nix {};
# Avoid introducing a new objc4 if stdenv already has one, to prevent
# conflicting LLVM modules.
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";
};
};
}