diff options
Diffstat (limited to 'pkgs/os-specific/bsd/netbsd/pkgs/libpthread')
-rw-r--r-- | pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix | 5 | ||||
-rw-r--r-- | pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix | 42 |
3 files changed, 34 insertions, 19 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix deleted file mode 100644 index 485a12837bcb4..0000000000000 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/base.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - path = "lib/libpthread"; - version = "9.2"; - sha256 = "0mlmc31k509dwfmx5s2x010wxjc44mr6y0cbmk30cfipqh8c962h"; -} - diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix index 3896562501fc5..41a447e2b4083 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/headers.nix @@ -1,9 +1,10 @@ { lib, mkDerivation }: -mkDerivation (import ./base.nix // { +mkDerivation { + path = "lib/libpthread"; pname = "libpthread-headers"; installPhase = "includesPhase"; dontBuild = true; noCC = true; meta.platforms = lib.platforms.netbsd; -}) +} diff --git a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix index c2a0d407718e9..8e0ef5fd1b74e 100644 --- a/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix +++ b/pkgs/os-specific/bsd/netbsd/pkgs/libpthread/package.nix @@ -1,15 +1,35 @@ -{ lib, mkDerivation -, headers -, common, libc, librt, sys +{ + lib, + stdenvLibcMinimal, + mkDerivation, + headers, + libcMinimal, + librt, }: -mkDerivation (import ./base.nix // { - pname = "libpthread"; - installPhase = null; - noCC = false; - dontBuild = false; - buildInputs = [ headers ]; +mkDerivation { + path = "lib/libpthread"; + + libcMinimal = true; + + outputs = [ + "out" + "dev" + "man" + ]; + SHLIBINSTALLDIR = "$(out)/lib"; - extraPaths = [ common libc.src librt.src sys.src ]; + + # Hack around GCC's limits.h missing the include_next we want See + # https://gcc.gnu.org/legacy-ml/gcc/2003-10/msg01278.html + NIX_CFLAGS_COMPILE_BEFORE = "-isystem ${stdenvLibcMinimal.cc.libc.dev}/include"; + + extraPaths = [ + "common" + libcMinimal.path + librt.path + "sys" + ]; + meta.platforms = lib.platforms.netbsd; -}) +} |