about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/li/libstaden-read/package.nix
blob: dd2d93ae30a3ca4a92a4f21a336f3c648ffa8463 (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
{ lib
, stdenv
, autoreconfHook
, fetchFromGitHub
, bzip2
, xz
, zlib
}:

stdenv.mkDerivation (finalAttrs: {
  # Same name as the Debian library
  pname = "libstaden-read";
  version = "1.15.0";

  src = fetchFromGitHub {
    owner = "jkbonfield";
    repo = "io_lib";
    rev = "io_lib-" + builtins.replaceStrings ["."] ["-"] finalAttrs.version;
    fetchSubmodules = true;
    hash = "sha256-2Dlx+MXmqar81/Xmf0oE+6lWX461EDYijiZsZf/VD28=";
  };

  patches = [
    # Needed so that the lib can be detected
    ./libstaden-install-config-header.patch
  ];

  buildInputs = [ bzip2 xz zlib ];
  nativeBuildInputs = [ autoreconfHook ];

  # autoreconfHook does not descend into htscodecs folder
  preAutoreconf = ''
    pushd ./htscodecs
    autoreconf --install --force --verbose
    pushd
  '';

  meta = {
    description = "C library for reading/writing various DNA sequence formats";
    homepage = "https://staden.sourceforge.net";
    downloadPage = "https://github.com/jkbonfield/io_lib/releases";
    changelog = "https://github.com/jkbonfield/io_lib/blob/${finalAttrs.src.rev}/CHANGES";
    license = with lib.licenses; [ bsd3 free ];
    platforms = lib.platforms.all;
    maintainers = [ lib.maintainers.kupac ];
  };
})