Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 43 lines 952 B view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5}: 6 7stdenv.mkDerivation rec { 8 pname = "dawncut"; 9 version = "1.54a"; 10 11 src = fetchurl { 12 name = "${pname}-${version}.tar.gz"; 13 url = "https://geant4.kek.jp/~tanaka/src/dawncut_${ 14 builtins.replaceStrings [ "." ] [ "_" ] version 15 }.taz"; 16 hash = "sha256-Ux4fDi7TXePisYAxCMDvtzLYOgxnbxQIO9QacTRrT6k="; 17 }; 18 19 postPatch = '' 20 substituteInPlace Makefile.architecture \ 21 --replace 'CXX := g++' "" 22 ''; 23 24 dontConfigure = true; 25 26 env.NIX_CFLAGS_COMPILE = "-std=c++98"; 27 28 installPhase = '' 29 runHook preInstall 30 31 install -Dm 500 dawncut "$out/bin/dawncut" 32 33 runHook postInstall 34 ''; 35 36 meta = with lib; { 37 description = "Tool to generate a 3D scene data clipped with an arbitrary plane"; 38 license = licenses.unfree; 39 homepage = "https://geant4.kek.jp/~tanaka/DAWN/About_DAWNCUT.html"; 40 platforms = platforms.unix; 41 maintainers = with maintainers; [ veprbl ]; 42 }; 43}