diff --git a/pkgs/development/libraries/science/biology/bpp-popgen/default.nix b/pkgs/development/libraries/science/biology/bpp-popgen/default.nix new file mode 100644 index 000000000000..af5d1d00d4d9 --- /dev/null +++ b/pkgs/development/libraries/science/biology/bpp-popgen/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, cmake, bpp-core, bpp-seq }: + +stdenv.mkDerivation rec { + pname = "bpp-popgen"; + + inherit (bpp-core) version; + + src = fetchFromGitHub { + owner = "BioPP"; + repo = pname; + rev = "v${version}"; + sha256 = "0bz0fhrq3dri6a0hvfc3zlvrns8mrzzlnicw5pyfa812gc1qwfvh"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ bpp-core bpp-seq ]; + + preCheck = '' + export LD_LIBRARY_PATH=$(pwd)/src + ''; + + 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 // { + changelog = "https://github.com/BioPP/bpp-popgen/blob/master/ChangeLog"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 164669e55915..34bd7b3db021 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24394,6 +24394,8 @@ in bpp-phyl = callPackage ../development/libraries/science/biology/bpp-phyl { }; + bpp-popgen = callPackage ../development/libraries/science/biology/bpp-popgen { }; + bpp-seq = callPackage ../development/libraries/science/biology/bpp-seq { }; cd-hit = callPackage ../applications/science/biology/cd-hit { };