summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/da/dalphaball/package.nix
blob: 1561aaf9bbd8a816ae83b4ede0475808971cb75e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  lib,
  stdenv,
  fetchFromGitHub,
  gfortran,
  gmp,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "dalphaball";
  version = "0-unstable-2023-06-15";

  src = fetchFromGitHub {
    owner = "outpace-bio";
    repo = "DAlphaBall";
    rev = "7b9dc05fa2a40f7ea36c6d89973d150eaed459d9";
    hash = "sha256-mUxEL9b67z/mG+0pcM5uQ/jPAfEUpJlXOXPmqDea+U4=";
  };

  sourceRoot = "${finalAttrs.src.name}/src";
  strictDeps = true;

  nativeBuildInputs = [
    gfortran
  ];

  buildInputs = [
    gfortran.cc.lib
    gmp
  ];

  installPhase = ''
    runHook preInstall
    install -Dm755 DAlphaBall.gcc $out/bin/DAlphaBall
    runHook postInstall
  '';

  meta = {
    description = "Computes the surface area and volume of unions of many balls";
    mainProgram = "DAlphaBall";
    homepage = "https://github.com/outpace-bio/DAlphaBall";
    license = lib.licenses.lgpl21Only;
    maintainers = with lib.maintainers; [ aschleck ];
    platforms = lib.platforms.unix;
  };
})