nixpkgs/pkgs/by-name/da/dawn/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

44 lines
999 B
Nix

{ lib
, stdenv
, fetchurl
, tk
, makeWrapper
}:
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#"
'';
nativeBuildInputs = [ makeWrapper ];
dontConfigure = true;
preInstall = ''
mkdir -p "$out/bin"
'';
postInstall = ''
wrapProgram "$out/bin/DAWN_GUI" \
--prefix PATH : ${lib.makeBinPath [ tk ]}
'';
meta = with lib; {
description = "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 ];
};
}