Files
nixpkgs/pkgs/by-name/gr/grenedalf/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

86 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
autoconf,
pkg-config,
libz,
bzip2,
xz,
libdeflate,
htslib,
fetchurl,
}:
let
# Grenedalf is binded to htslib 1.16 and does not link with libcurl
htslib_gr = htslib.overrideDerivation (oldAttrs: rec {
version = "1.16";
name = "${oldAttrs.pname}-nocurl-${version}";
src = fetchurl {
url = "https://github.com/samtools/htslib/releases/download/${version}/htslib-${version}.tar.bz2";
sha256 = "sha256-YGt8ev9zc0zwM+zRVvQFKfpXkvVFJJUqKJOMoIkNeSQ=";
};
configureFlags = [
"--disable-libcurl"
"--disable-plugins"
];
});
in
stdenv.mkDerivation (finalAttrs: {
pname = "grenedalf";
version = "0.6.2";
src = fetchFromGitHub {
owner = "lczech";
repo = "grenedalf";
tag = "v${finalAttrs.version}";
hash = "sha256-DJ7nZjOvYFQlN/L+S2QcMVvH/M9Dhla4VXl2nxc22m4=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
pkg-config
autoconf
];
buildInputs = [
libz
bzip2
xz
libdeflate
htslib_gr
];
cmakeFlags = [
"-DHTSLIB_DIR=${htslib_gr}"
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ../bin/grenedalf $out/bin
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/lczech/grenedalf";
description = "Collection of commands for working with population genetic data";
longDescription = ''
grenedalf is a collection of commands for working with population genetic
data, in particular from pool sequencing. Its main focus are statistical
analyses such as Tajima's D and Fst. The statistics follow the approaches
of PoPoolation and PoPoolation2, as well as poolfstat and npstat. However,
compared to those, grenedalf is significantly more scalable, more user
friendly, and offers more settings and input file formats.
'';
platforms = platforms.all;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ bzizou ];
};
})