From 5375f831940da9f32eeee19082d3c3176e1debf8 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sat, 22 Oct 2022 21:52:40 -0400 Subject: dawncut: init at 1.54a --- .../science/physics/dawncut/default.nix | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 pkgs/applications/science/physics/dawncut/default.nix (limited to 'pkgs/applications') 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 ]; + }; +} -- cgit 1.4.1