From 8aaed36df32bcff840489b7083b4cb077a7cf97a Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 4 Jul 2022 08:20:07 +0100 Subject: [PATCH] archimedes: use latest toolchain, not gcc-6 Without the change archimedes fails to build with latest toolchains as: ld: archimedes.c:(.text+0xdac7): undefined reference to `rnd' ld: archimedes.c:(.text+0xdeab): undefined reference to `rnd' ld: archimedes.c:(.text+0xdf13): undefined reference to `rnd' ld: archimedes.c:(.text+0xe3ef): undefined reference to `rnd' ld: archimedes.o:archimedes.c:(.text+0xe456): more undefined references to `rnd' follow ld: archimedes.o: in function `EMC': archimedes.c:(.text+0xf11b): undefined reference to `creation' ld: archimedes.c:(.text+0xf5f5): undefined reference to `creation' ld: archimedes.c:(.text+0xf826): undefined reference to `creation' ld: archimedes.c:(.text+0xf9ce): undefined reference to `creation' The change happens to fix build against clang as well. --- .../science/electronics/archimedes/default.nix | 12 +++++++++++- pkgs/top-level/all-packages.nix | 4 +--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/electronics/archimedes/default.nix b/pkgs/applications/science/electronics/archimedes/default.nix index 8bceed08e1db..631f44e80633 100644 --- a/pkgs/applications/science/electronics/archimedes/default.nix +++ b/pkgs/applications/science/electronics/archimedes/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchurl, fetchpatch }: stdenv.mkDerivation rec { pname = "archimedes"; @@ -9,6 +9,16 @@ stdenv.mkDerivation rec { sha256 = "0jfpnd3pns5wxcxbiw49v5sgpmm5b4v8s4q1a5292hxxk2hzmb3z"; }; + patches = [ + # Pull patch pending upstream inclusion to support c99 toolchains: + # https://savannah.gnu.org/bugs/index.php?62703 + (fetchpatch { + name = "c99.patch"; + url = "https://savannah.gnu.org/bugs/download.php?file_id=53393"; + sha256 = "1xmy1w4ln1gynldk3srdi2h0fxpx465dsa1yxc3rzrrjpxh6087f"; + }) + ]; + meta = { description = "GNU package for semiconductor device simulations"; homepage = "https://www.gnu.org/software/archimedes"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ed03cb2a9aaa..a781d005836a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33156,9 +33156,7 @@ with pkgs; astral = callPackage ../applications/science/biology/astral { }; - archimedes = callPackage ../applications/science/electronics/archimedes { - stdenv = gcc6Stdenv; - }; + archimedes = callPackage ../applications/science/electronics/archimedes { }; bayescan = callPackage ../applications/science/biology/bayescan { };