Merge pull request #231973 from obsidiansystems/netbsd-libcpu

libcpuid: Fix NetBSD cross build
This commit is contained in:
John Ericson
2023-05-19 09:13:08 -04:00
committed by GitHub

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook }:
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook }:
stdenv.mkDerivation rec {
pname = "libcpuid";
@@ -11,6 +11,16 @@ stdenv.mkDerivation rec {
sha256 = "sha256-lhoHqdS5tke462guORg+PURjVmjAgviT5KJHp6PyvUA=";
};
patches = [
# Fixes cross-compilation to NetBSD
# https://github.com/anrieff/libcpuid/pull/190
(fetchpatch {
name = "pass-pthread-to-linker.patch";
url = "https://github.com/anrieff/libcpuid/commit/c28436e7239f28dab0e2a3bcdbce95f41e1363b1.patch";
sha256 = "sha256-J2mB010JcE4si0rERjcrL9kJgbWHKaQCIZPDkmRvcq4=";
})
];
nativeBuildInputs = [ autoreconfHook ];
meta = with lib; {