mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-13 19:43:02 +08:00
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
63 lines
1.3 KiB
Nix
63 lines
1.3 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
poetry-core,
|
|
scikit-learn,
|
|
numpy,
|
|
scipy,
|
|
colorama,
|
|
jupyter,
|
|
matplotlib,
|
|
nbconvert,
|
|
nbformat,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "bayesian-optimization";
|
|
version = "1.5.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bayesian-optimization";
|
|
repo = "BayesianOptimization";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-pDgvdQhlJ5aMRGdi2qXRXVCdJRvrOP/Nr0SSZyHH1WM=";
|
|
};
|
|
|
|
build-system = [ poetry-core ];
|
|
|
|
propagatedBuildInputs = [
|
|
scikit-learn
|
|
numpy
|
|
scipy
|
|
colorama
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
jupyter
|
|
matplotlib
|
|
nbconvert
|
|
nbformat
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [ "bayes_opt" ];
|
|
|
|
meta = with lib; {
|
|
broken = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64;
|
|
description = ''
|
|
A Python implementation of global optimization with gaussian processes
|
|
'';
|
|
homepage = "https://github.com/bayesian-optimization/BayesianOptimization";
|
|
changelog = "https://github.com/bayesian-optimization/BayesianOptimization/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.juliendehos ];
|
|
};
|
|
}
|