From 4c33f198e31bd6c95ae7b063bda6a0d6c233946e Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 8 Jun 2022 08:32:27 +0100 Subject: fped: add -fcommon workaround Workaround build failure on -fno-common toolchains like upstream gcc-10. Otherwise build fails as: ld: postscript.o:postscript.h:29: multiple definition of `postscript_params'; fped.o:postscript.h:29: first defined here --- pkgs/applications/science/electronics/fped/default.nix | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pkgs/applications/science') diff --git a/pkgs/applications/science/electronics/fped/default.nix b/pkgs/applications/science/electronics/fped/default.nix index f1c458f40d9..b1244b79a89 100644 --- a/pkgs/applications/science/electronics/fped/default.nix +++ b/pkgs/applications/science/electronics/fped/default.nix @@ -14,6 +14,11 @@ stdenv.mkDerivation { sha256 = "0xv364a00zwxhd9kg1z9sch5y0cxnrhk546asspyb9bh58sdzfy7"; }; + # Workaround build failure on -fno-common toolchains: + # ld: postscript.o:postscript.h:29: multiple definition of + # `postscript_params'; fped.o:postscript.h:29: first defined here + NIX_CFLAGS_COMPILE = "-fcommon"; + # This uses '/bin/bash', '/usr/local' and 'lex' by default makeFlags = [ "PREFIX=${placeholder "out"}" -- cgit 1.4.1 From 3e4d46ba0abbfeed91f0aa8478ec480cafe1e758 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Thu, 16 Jun 2022 18:57:04 -0400 Subject: dawn: init at 3.91a --- pkgs/applications/science/physics/dawn/default.nix | 34 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/applications/science/physics/dawn/default.nix (limited to 'pkgs/applications/science') diff --git a/pkgs/applications/science/physics/dawn/default.nix b/pkgs/applications/science/physics/dawn/default.nix new file mode 100644 index 00000000000..609a0e1c4cd --- /dev/null +++ b/pkgs/applications/science/physics/dawn/default.nix @@ -0,0 +1,34 @@ +{ lib +, stdenv +, fetchurl +}: + +stdenv.mkDerivation rec { + pname = "dawn"; + version = "3.91a"; + + src = fetchurl { + url = "https://geant4.kek.jp/~tanaka/src/dawn_${builtins.replaceStrings ["."] ["_"] version}.tgz"; + hash = "sha256-gdhV6tERdoGxiCQt0L46JOAF2b1AY/0r2pp6eU689fQ="; + }; + + postPatch = '' + substituteInPlace Makefile \ + --replace 'CC =' 'CC = $(CXX) #' \ + --replace 'INSTALL_DIR =' "INSTALL_DIR = $out/bin#" + ''; + + dontConfigure = true; + + preInstall = '' + mkdir -p "$out/bin" + ''; + + meta = with lib; { + description = "A vectorized 3D PostScript processor with analytical hidden line/surface removal"; + license = licenses.unfree; + homepage = "https://geant4.kek.jp/~tanaka/DAWN/About_DAWN.html"; + platforms = platforms.unix; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09faa28ac73..fca699a6360 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -33287,6 +33287,8 @@ with pkgs; ### SCIENCE/PHYSICS + dawn = callPackage ../applications/science/physics/dawn {}; + elmerfem = callPackage ../applications/science/physics/elmerfem {}; mcfm = callPackage ../applications/science/physics/MCFM { -- cgit 1.4.1