diff options
Diffstat (limited to 'nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil')
-rw-r--r-- | nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix | 15 | ||||
-rw-r--r-- | nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix | 29 |
2 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix new file mode 100644 index 000000000000..a6f484ba4e8d --- /dev/null +++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/default.nix @@ -0,0 +1,15 @@ +{ stdenv, appleDerivation }: + +# all symbols are located in libSystem +appleDerivation { + installPhase = '' + mkdir -p $out/include + cp *.h $out/include + ''; + + meta = with stdenv.lib; { + maintainers = with maintainers; [ copumpkin ]; + platforms = platforms.darwin; + license = licenses.apsl20; + }; +} diff --git a/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix new file mode 100644 index 000000000000..0115ce537e27 --- /dev/null +++ b/nixpkgs/pkgs/os-specific/darwin/apple-source-releases/libutil/new.nix @@ -0,0 +1,29 @@ +{ stdenv, appleDerivation, xcbuildHook }: + +# TODO: make this the official libutil expression once we've integrated xcbuild in the bootstrap +appleDerivation { + nativeBuildInputs = [ xcbuildHook ]; + + prePatch = '' + substituteInPlace tzlink.c \ + --replace '#include <xpc/xpc.h>' "" + ''; + + xcbuildFlags = "-target util"; + + installPhase = '' + mkdir -p $out/lib $out/include + + cp Products/Release/*.dylib $out/lib + cp Products/Release/*.h $out/include + + # TODO: figure out how to get this to be right the first time around + install_name_tool -id $out/lib/libutil.dylib $out/lib/libutil.dylib + ''; + + meta = with stdenv.lib; { + maintainers = with maintainers; [ copumpkin ]; + platforms = platforms.darwin; + license = licenses.apsl20; + }; +} |