nixpkgs/pkgs/by-name/oc/octopus-caller/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

48 lines
1.5 KiB
Nix

{lib, stdenv, fetchurl, fetchFromGitHub, cmake, boost179, gmp, htslib, zlib, xz, pkg-config}:
stdenv.mkDerivation rec {
pname = "octopus";
version = "0.7.4";
src = fetchFromGitHub {
owner = "luntergroup";
repo = "octopus";
rev = "v${version}";
sha256 = "sha256-FAogksVxUlzMlC0BqRu22Vchj6VX+8yNlHRLyb3g1sE=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ boost179 gmp htslib zlib xz ];
patches = [ (fetchurl {
url = "https://github.com/luntergroup/octopus/commit/17a597d192bcd5192689bf38c5836a98b824867a.patch";
sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY=";
}) ];
postPatch = ''
# Disable -Werror to avoid build failure on fresh toolchains like
# gcc-13.
substituteInPlace lib/date/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace lib/ranger/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace lib/tandem/CMakeLists.txt --replace-fail ' -Werror ' ' '
substituteInPlace src/CMakeLists.txt --replace-fail ' -Werror ' ' '
# Fix gcc-13 build due to missing <cstdint> header.
sed -e '1i #include <cstdint>' -i src/core/tools/vargen/utils/assembler.hpp
'';
postInstall = ''
mkdir $out/bin
mv $out/octopus $out/bin
'';
meta = with lib; {
description = "Bayesian haplotype-based mutation calling";
mainProgram = "octopus";
license = licenses.mit;
homepage = "https://github.com/luntergroup/octopus";
maintainers = with maintainers; [ jbedo ];
platforms = platforms.x86_64;
};
}