From c6132dcf238b8ddc01174290fe31ed5001a58c01 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 7 Jun 2023 23:43:37 +0100 Subject: pkgsCross.mingwW64.windows.mcfgthreads: add gcc13 compatible version Upstream `gcc-13` merged `mcfgthreads` support with a caveat: it's headers interface is not compatible with the patch `nixpkgs` was carrying in `gcc-12` and before. To keep both new (`gcc13`) and old (`_pre_gcc13`) version I held back previous `windows.mcfgthreads` attribute as `windows.mcfgthreads_pre_gcc_13`. It is used for `gcc` before 13. The change fixes the build of `pkgsCross.mingwW64.stdenv` itself and example program: $ nix build --impure --expr 'with import ./. {}; pkgsCross.mingwW64.re2c.override { stdenv = pkgsCross.mingwW64.gcc11Stdenv; }' --- pkgs/os-specific/windows/default.nix | 4 ++++ pkgs/os-specific/windows/mcfgthreads/default.nix | 11 +++------- .../os-specific/windows/mcfgthreads/pre_gcc_13.nix | 24 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 pkgs/os-specific/windows/mcfgthreads/pre_gcc_13.nix (limited to 'pkgs/os-specific/windows') diff --git a/pkgs/os-specific/windows/default.nix b/pkgs/os-specific/windows/default.nix index c34f97a17db25..8d6dd50548e51 100644 --- a/pkgs/os-specific/windows/default.nix +++ b/pkgs/os-specific/windows/default.nix @@ -33,6 +33,10 @@ lib.makeScope newScope (self: with self; { stdenv = crossThreadsStdenv; }; + mcfgthreads_pre_gcc_13 = callPackage ./mcfgthreads/pre_gcc_13.nix { + stdenv = crossThreadsStdenv; + }; + mcfgthreads = callPackage ./mcfgthreads { stdenv = crossThreadsStdenv; }; diff --git a/pkgs/os-specific/windows/mcfgthreads/default.nix b/pkgs/os-specific/windows/mcfgthreads/default.nix index 45c80ab89796f..e0635efd0a540 100644 --- a/pkgs/os-specific/windows/mcfgthreads/default.nix +++ b/pkgs/os-specific/windows/mcfgthreads/default.nix @@ -2,22 +2,17 @@ stdenv.mkDerivation { pname = "mcfgthreads"; - version = "git"; + version = "unstable-2023-06-06"; src = fetchFromGitHub { owner = "lhmouse"; repo = "mcfgthread"; - rev = "c446cf4fcdc262fc899a188a4bb7136284c34222"; - sha256 = "1ib90lrd4dz8irq4yvzwhxqa86i5vxl2q2z3z04sf1i8hw427p2f"; + rev = "f0a335ce926906d634c787249a89220045bf0f7e"; + hash = "sha256-PLGIyoLdWgWvkHgRe0vHLIvnCxFpmHtbjS8xRhNM9Xw="; }; outputs = [ "out" "dev" ]; - # Don't want prebuilt binaries sneaking in. - postUnpack = '' - rm -r "$sourceRoot/debug" "$sourceRoot/release" - ''; - nativeBuildInputs = [ autoreconfHook ]; diff --git a/pkgs/os-specific/windows/mcfgthreads/pre_gcc_13.nix b/pkgs/os-specific/windows/mcfgthreads/pre_gcc_13.nix new file mode 100644 index 0000000000000..6be64814c93aa --- /dev/null +++ b/pkgs/os-specific/windows/mcfgthreads/pre_gcc_13.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, autoreconfHook }: + +stdenv.mkDerivation { + pname = "mcfgthreads"; + version = "git"; # unstable-2021-03-12, not in any branch + + src = fetchFromGitHub { + owner = "lhmouse"; + repo = "mcfgthread"; + rev = "c446cf4fcdc262fc899a188a4bb7136284c34222"; + sha256 = "1ib90lrd4dz8irq4yvzwhxqa86i5vxl2q2z3z04sf1i8hw427p2f"; + }; + + outputs = [ "out" "dev" ]; + + # Don't want prebuilt binaries sneaking in. + postUnpack = '' + rm -r "$sourceRoot/debug" "$sourceRoot/release" + ''; + + nativeBuildInputs = [ + autoreconfHook + ]; +} -- cgit 1.4.1