about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/biology/aragorn/default.nix
blob: 4ee8501e8e13635c931166325c34e7baea86f932 (plain) (blame)
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
47
48
49
50
51
52
{ lib
, stdenv
, fetchurl
, installShellFiles
}:
let
  man = fetchurl {
    url = "https://web.archive.org/web/20230608093053if_/http://www.ansikte.se/ARAGORN/Downloads/aragorn.1";
    hash = "sha256-bjD22dpkQZcGR0TwMxdpaed4VZZO2NUOoAw4o66iyS4=";
  };
in

stdenv.mkDerivation (finalAttrs: {
  version = "1.2.41";
  pname = "aragorn";

  src = fetchurl {
    url = "http://www.ansikte.se/ARAGORN/Downloads/aragorn${finalAttrs.version}.c";
    hash = "sha256-kqMcxcCwrRbU17AZkZibd18H0oFd8TX+bj6riPXpf0o=";
  };

  dontUnpack = true;

  nativeBuildInputs = [
    installShellFiles
  ];

  buildPhase = ''
    runHook preBuild

    $CC -O3 -ffast-math -finline-functions -o aragorn $src

    runHook postBuild
  '';

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin && cp aragorn $out/bin
    installManPage ${man}

    runHook postInstall
  '';

  meta = with lib; {
    description = "Detects tRNA, mtRNA, and tmRNA genes in nucleotide sequences";
    homepage = "http://www.ansikte.se/ARAGORN/";
    license = licenses.gpl3Plus;
    maintainers = [ maintainers.bzizou ];
    platforms = platforms.unix;
  };
})