From 538442183767c52b2c40f5e45e3b7fae139a3583 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 19 Jul 2024 22:07:01 -0700 Subject: [PATCH 1/5] freebsd.libstdthreads: init --- pkgs/os-specific/bsd/freebsd/pkgs/libstdthreads.nix | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 pkgs/os-specific/bsd/freebsd/pkgs/libstdthreads.nix diff --git a/pkgs/os-specific/bsd/freebsd/pkgs/libstdthreads.nix b/pkgs/os-specific/bsd/freebsd/pkgs/libstdthreads.nix new file mode 100644 index 000000000000..2f5fd7c6afd1 --- /dev/null +++ b/pkgs/os-specific/bsd/freebsd/pkgs/libstdthreads.nix @@ -0,0 +1,5 @@ +{ mkDerivation }: +mkDerivation { + path = "lib/libstdthreads"; + extraPaths = [ "lib/libc/Versions.def" ]; +} From 616637d813b260d397a4bac3fe7202a15e4f3607 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 19 Jul 2024 22:12:52 -0700 Subject: [PATCH 2/5] source-highlight: update gnu config scripts --- pkgs/tools/text/source-highlight/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/text/source-highlight/default.nix b/pkgs/tools/text/source-highlight/default.nix index d20b3692f31c..07ed74f91c73 100644 --- a/pkgs/tools/text/source-highlight/default.nix +++ b/pkgs/tools/text/source-highlight/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchpatch, fetchurl, boost }: +{ lib, stdenv, fetchpatch, fetchurl, boost, updateAutotoolsGnuConfigScriptsHook }: stdenv.mkDerivation rec { pname = "source-highlight"; @@ -43,6 +43,9 @@ stdenv.mkDerivation rec { ''; strictDeps = true; + # necessary to build on FreeBSD native pending inclusion of + # https://git.savannah.gnu.org/cgit/config.git/commit/?id=e4786449e1c26716e3f9ea182caf472e4dbc96e0 + nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; buildInputs = [ boost ]; configureFlags = [ From 488168b7c1d3732831ef9cf03ab28095135fec81 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 19 Jul 2024 22:21:18 -0700 Subject: [PATCH 3/5] mpfr: update gnu config scripts --- pkgs/development/libraries/mpfr/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index dec33a63d155..2ba09fc226fd 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -3,6 +3,7 @@ , fetchurl , gmp , writeScript +, updateAutotoolsGnuConfigScriptsHook }: # Note: this package is used for bootstrapping fetchurl, and thus @@ -25,6 +26,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "doc" "info" ]; strictDeps = true; + # necessary to build on FreeBSD native pending inclusion of + # https://git.savannah.gnu.org/cgit/config.git/commit/?id=e4786449e1c26716e3f9ea182caf472e4dbc96e0 + nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ]; # mpfr.h requires gmp.h propagatedBuildInputs = [ gmp ]; From df7a52b48a0c7bdad72f5c81a4b9c0d8442cbfe3 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 19 Jul 2024 22:21:57 -0700 Subject: [PATCH 4/5] libipt: Add libstdthreads dependency on FreeBSD This lib is part of the FreeBSD base system, but is not included in the stdenv. --- pkgs/development/libraries/libipt/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libipt/default.nix b/pkgs/development/libraries/libipt/default.nix index ed88ed8f2828..61ec0ce67d88 100644 --- a/pkgs/development/libraries/libipt/default.nix +++ b/pkgs/development/libraries/libipt/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake }: +{ lib, stdenv, fetchFromGitHub, cmake, freebsd }: stdenv.mkDerivation rec { pname = "libipt"; @@ -12,6 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; + buildInputs = lib.optional stdenv.isFreeBSD freebsd.libstdthreads; meta = with lib; { description = "Intel Processor Trace decoder library"; From beb34f1b960494e167c1674e31d0beddf51cd647 Mon Sep 17 00:00:00 2001 From: Audrey Dutcher Date: Fri, 19 Jul 2024 22:19:55 -0700 Subject: [PATCH 5/5] gdb: mark support for FreeBSD --- pkgs/development/tools/misc/gdb/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix index 21dafb9bbce7..7f97eebce157 100644 --- a/pkgs/development/tools/misc/gdb/default.nix +++ b/pkgs/development/tools/misc/gdb/default.nix @@ -155,7 +155,7 @@ stdenv.mkDerivation rec { license = lib.licenses.gpl3Plus; # GDB upstream does not support ARM darwin - platforms = with platforms; linux ++ cygwin ++ ["x86_64-darwin"]; + platforms = with platforms; linux ++ cygwin ++ freebsd ++ ["x86_64-darwin"]; maintainers = with maintainers; [ pierron globin lsix ]; }; }