about summary refs log tree commit diff
path: root/pkgs/applications/science/physics
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2022-10-22 21:52:40 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2022-10-22 21:52:40 -0400
commit5375f831940da9f32eeee19082d3c3176e1debf8 (patch)
treea7421372f478cf9c55fcd581d90069540e163fbf /pkgs/applications/science/physics
parent8ac43eab7f09a2c114ca9a17e3d24f570b2752c9 (diff)
downloadnixlib-5375f831940da9f32eeee19082d3c3176e1debf8.tar
nixlib-5375f831940da9f32eeee19082d3c3176e1debf8.tar.gz
nixlib-5375f831940da9f32eeee19082d3c3176e1debf8.tar.bz2
nixlib-5375f831940da9f32eeee19082d3c3176e1debf8.tar.lz
nixlib-5375f831940da9f32eeee19082d3c3176e1debf8.tar.xz
nixlib-5375f831940da9f32eeee19082d3c3176e1debf8.tar.zst
nixlib-5375f831940da9f32eeee19082d3c3176e1debf8.zip
dawncut: init at 1.54a
Diffstat (limited to 'pkgs/applications/science/physics')
-rw-r--r--pkgs/applications/science/physics/dawncut/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/applications/science/physics/dawncut/default.nix b/pkgs/applications/science/physics/dawncut/default.nix
new file mode 100644
index 000000000000..8c0bc1ae6394
--- /dev/null
+++ b/pkgs/applications/science/physics/dawncut/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, stdenv
+, fetchurl
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dawncut";
+  version = "1.54a";
+
+  src = fetchurl {
+    name = "${pname}-${version}.tar.gz";
+    url = "https://geant4.kek.jp/~tanaka/src/dawncut_${builtins.replaceStrings ["."] ["_"] version}.taz";
+    hash = "sha256-Ux4fDi7TXePisYAxCMDvtzLYOgxnbxQIO9QacTRrT6k=";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile.architecture \
+      --replace 'CXX      := g++' ""
+  '';
+
+  dontConfigure = true;
+
+  NIX_CFLAGS_COMPILE="-std=c++98";
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm 500 dawncut "$out/bin/dawncut"
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "A tool to generate a 3D scene data clipped with an arbitrary plane";
+    license = licenses.unfree;
+    homepage = "https://geant4.kek.jp/~tanaka/DAWN/About_DAWNCUT.html";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ veprbl ];
+  };
+}