Merge pull request #232469 from natsukium/autodock-vina/init

autodock-vina: init at 1.2.3

authored by

Martin Weinelt and committed by
GitHub
5a193fb4 6698e5f4

+117
+57
pkgs/applications/science/chemistry/autodock-vina/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , boost 5 + , glibc 6 + }: 7 + let 8 + boost' = boost.override { 9 + enableShared = false; 10 + }; 11 + in 12 + stdenv.mkDerivation (finalAttrs: { 13 + pname = "autodock-vina"; 14 + version = "1.2.3"; 15 + 16 + src = fetchFromGitHub { 17 + owner = "ccsb-scripps"; 18 + repo = "autodock-vina"; 19 + rev = "refs/tags/v${finalAttrs.version}"; 20 + hash = "sha256-oOpwhRmpS5WfnuqxkjxGsGtrofPxUt8bH9ggzm5rrR8="; 21 + }; 22 + 23 + sourceRoot = 24 + if stdenv.isDarwin 25 + then "source/build/mac/release" 26 + else "source/build/linux/release"; 27 + 28 + buildInputs = [ 29 + boost' 30 + ] ++ lib.optionals stdenv.isLinux [ 31 + glibc.static 32 + ]; 33 + 34 + makeFlags = [ 35 + "GPP=${stdenv.cc.targetPrefix}c++" 36 + "BASE=${boost'}" 37 + "BOOST_INCLUDE=${lib.getDev boost'}/include" 38 + ]; 39 + 40 + installPhase = '' 41 + runHook preInstall 42 + 43 + install -Dm755 vina vina_split -t $out/bin/ 44 + 45 + runHook postInstall 46 + ''; 47 + 48 + meta = with lib; { 49 + description = "One of the fastest and most widely used open-source docking engines"; 50 + homepage = "https://vina.scripps.edu/"; 51 + changelog = "https://github.com/ccsb-scripps/AutoDock-Vina/releases/tag/v${finalAttrs.version}"; 52 + license = licenses.asl20; 53 + maintainers = with maintainers; [ natsukium ]; 54 + platforms = platforms.unix; 55 + mainProgram = "vina"; 56 + }; 57 + })
+56
pkgs/applications/science/chemistry/autodock-vina/python-bindings.nix
··· 1 + { lib 2 + , buildPythonPackage 3 + , autodock-vina 4 + , boost 5 + , swig 6 + , setuptools 7 + , numpy 8 + }: 9 + 10 + buildPythonPackage { 11 + inherit (autodock-vina) pname version src meta; 12 + 13 + format = "pyproject"; 14 + 15 + sourceRoot = "source/build/python"; 16 + 17 + postPatch = '' 18 + # wildcards are not allowed 19 + # https://github.com/ccsb-scripps/AutoDock-Vina/issues/176 20 + substituteInPlace setup.py \ 21 + --replace "python_requires='>=3.5.*'" "python_requires='>=3.5'" 22 + 23 + # setupPyBuildFlags are not applied with `format = "pyproject"` 24 + substituteInPlace setup.py \ 25 + --replace "= locate_boost()" "= '${lib.getDev boost}/include', '${boost}/lib'" 26 + 27 + # this line attempts to delete the source code 28 + substituteInPlace setup.py \ 29 + --replace "shutil.rmtree('src')" "..." 30 + 31 + # np.int is deprecated 32 + # https://github.com/ccsb-scripps/AutoDock-Vina/pull/167 and so on 33 + substituteInPlace vina/vina.py \ 34 + --replace "np.int" "int" 35 + ''; 36 + 37 + nativeBuildInputs = [ 38 + setuptools 39 + swig 40 + ]; 41 + 42 + buildInputs = [ 43 + boost 44 + ]; 45 + 46 + propagatedBuildInputs = [ 47 + numpy 48 + ]; 49 + 50 + # upstrem has no tests 51 + doCheck = false; 52 + 53 + pythonImportsCheck = [ 54 + "vina" 55 + ]; 56 + }
+2
pkgs/top-level/all-packages.nix
··· 38030 38030 gstreamerSupport = true; 38031 38031 }; 38032 38032 38033 + autodock-vina = callPackage ../applications/science/chemistry/autodock-vina { }; 38034 + 38033 38035 dkh = callPackage ../applications/science/chemistry/dkh { }; 38034 38036 38035 38037 openmolcas = callPackage ../applications/science/chemistry/openmolcas { };
+2
pkgs/top-level/python-packages.nix
··· 13017 13017 13018 13018 vilfo-api-client = callPackage ../development/python-modules/vilfo-api-client { }; 13019 13019 13020 + vina = callPackage ../applications/science/chemistry/autodock-vina/python-bindings.nix { }; 13021 + 13020 13022 vincenty = callPackage ../development/python-modules/vincenty { }; 13021 13023 13022 13024 vine = callPackage ../development/python-modules/vine { };