nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 47 lines 1.1 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchurl, 5 python3Packages, 6 cmake, 7 python3, 8}: 9 10python3Packages.buildPythonApplication rec { 11 pname = "obitools3"; 12 version = "3.0.1b11"; 13 format = "setuptools"; 14 15 src = fetchurl { 16 url = "https://git.metabarcoding.org/obitools/${pname}/repository/v${version}/archive.tar.gz"; 17 sha256 = "1x7a0nrr9agg1pfgq8i1j8r1p6c0jpyxsv196ylix1dd2iivmas1"; 18 }; 19 20 nativeBuildInputs = [ 21 python3Packages.cython 22 cmake 23 ]; 24 25 postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 '' 26 substituteInPlace setup.py \ 27 --replace "'-msse2'," "" 28 ''; 29 30 preBuild = '' 31 substituteInPlace src/CMakeLists.txt --replace \$'{PYTHONLIB}' "$out/${python3.sitePackages}"; 32 export NIX_CFLAGS_COMPILE="-L $out/${python3.sitePackages} $NIX_CFLAGS_COMPILE" 33 ''; 34 35 dontConfigure = true; 36 37 doCheck = true; 38 39 meta = with lib; { 40 description = "Management of analyses and data in DNA metabarcoding"; 41 mainProgram = "obi"; 42 homepage = "https://git.metabarcoding.org/obitools/obitools3"; 43 license = licenses.cecill20; 44 maintainers = [ maintainers.bzizou ]; 45 platforms = platforms.all; 46 }; 47}