summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-06-18 07:58:32 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-06-18 08:00:58 +0100
commit5ee88ab21d1d16d22b768c7b40d3b7741caeff8d (patch)
tree549c0b189b5f5a52f80f7dc18223b380d1b46134 /pkgs/applications/science
parentac86fdf42efe6382f9d62205d922ee3628cc24c5 (diff)
parent6b99e9620ee37b55610c7f23d3e46f2baa108d23 (diff)
downloadnixpkgs-5ee88ab21d1d16d22b768c7b40d3b7741caeff8d.tar
nixpkgs-5ee88ab21d1d16d22b768c7b40d3b7741caeff8d.tar.gz
nixpkgs-5ee88ab21d1d16d22b768c7b40d3b7741caeff8d.tar.bz2
nixpkgs-5ee88ab21d1d16d22b768c7b40d3b7741caeff8d.tar.lz
nixpkgs-5ee88ab21d1d16d22b768c7b40d3b7741caeff8d.tar.xz
nixpkgs-5ee88ab21d1d16d22b768c7b40d3b7741caeff8d.tar.zst
nixpkgs-5ee88ab21d1d16d22b768c7b40d3b7741caeff8d.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/electronics/fped/default.nix5
-rw-r--r--pkgs/applications/science/physics/dawn/default.nix34
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 ];
+  };
+}