nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 apple-sdk,
4 stdenvNoCC,
5}:
6
7stdenvNoCC.mkDerivation (finalAttrs: {
8 pname = "libunwind";
9 inherit (apple-sdk) version;
10
11 # No `-lunwind` is provided because you get it automatically from linking with libSystem.
12 # It’s also not possible to link libunwind directly, otherwise. Darwin requires going through libSystem.
13 buildCommand = ''
14 mkdir -p "$out/lib/pkgconfig"
15 cat <<EOF > "$out/lib/pkgconfig/libunwind.pc"
16 Name: libunwind
17 Description: An implementation of the HP libunwind interface
18 Version: ${finalAttrs.version}
19 EOF
20 '';
21
22 meta = {
23 description = "Compatibility package for libunwind on Darwin";
24 teams = [ lib.teams.darwin ];
25 platforms = lib.platforms.darwin;
26 pkgConfigModules = [ "libunwind" ];
27 };
28})