nixpkgs/pkgs/by-name/me/megahit/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

38 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, fetchpatch, cmake, zlib }:
stdenv.mkDerivation rec {
pname = "megahit";
version = "1.2.9";
src = fetchFromGitHub {
owner = "voutcn";
repo = "megahit";
rev = "v${version}";
sha256 = "1r5d9nkdmgjsbrpj43q9hy3s8jwsabaz3ji561v18hy47v58923c";
};
patches = [
# Fix gcc-13 build failure:
# https://github.com/voutcn/megahit/pull/366
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/voutcn/megahit/commit/4cb2f793503087163bda8592222f105f27e33e66.patch";
hash = "sha256-b5mhzif+OPcMjmg+BnaUc5CB6Acn/KTBOJEw+WYEhbs=";
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib ];
cmakeFlags = lib.optionals stdenv.hostPlatform.isStatic [
"-DSTATIC_BUILD=ON"
];
meta = with lib; {
description = "Ultra-fast single-node solution for large and complex metagenomics assembly via succinct de Bruijn graph";
license = licenses.gpl3;
homepage = "https://github.com/voutcn/megahit";
maintainers = with maintainers; [ luispedro ];
platforms = [ "x86_64-linux" ];
};
}