diff options
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/electronics/fped/default.nix | 5 | ||||
-rw-r--r-- | pkgs/applications/science/physics/dawn/default.nix | 34 |
2 files changed, 39 insertions, 0 deletions
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"}" 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 ]; + }; +} |