about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/science/biology/bpp-seq/default.nix
blob: 2f6fbf9e362c77a3f4c9122136b9118e7accdb63 (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
{ stdenv, fetchFromGitHub, cmake, bpp-core }:

stdenv.mkDerivation rec {
  pname = "bpp-seq";

  inherit (bpp-core) version;

  src = fetchFromGitHub {
    owner = "BioPP";
    repo = pname;
    rev = "v${version}";
    sha256 = "1mc09g8jswzsa4wgrfv59jxn15ys3q8s0227p1j838wkphlwn2qk";
  };

  nativeBuildInputs = [ cmake ];
  buildInputs = [ bpp-core ];

  postFixup = ''
    substituteInPlace $out/lib/cmake/${pname}/${pname}-targets.cmake  \
      --replace 'set(_IMPORT_PREFIX' '#set(_IMPORT_PREFIX'
  '';
  # prevents cmake from exporting incorrect INTERFACE_INCLUDE_DIRECTORIES
  # of form /nix/store/.../nix/store/.../include,
  # probably due to relative vs absolute path issue

  doCheck = !stdenv.isDarwin;

  meta = bpp-core.meta // {
    homepage = "https://github.com/BioPP/bpp-seq";
    changelog = "https://github.com/BioPP/bpp-seq/blob/master/ChangeLog";
  };
}