uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
12
pkgs/development/python-modules/jax/cache-fix.patch
Normal file
12
pkgs/development/python-modules/jax/cache-fix.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/jax/experimental/compilation_cache/file_system_cache.py b/jax/experimental/compilation_cache/file_system_cache.py
|
||||
index b85969de..92acd523 100644
|
||||
--- a/jax/experimental/compilation_cache/file_system_cache.py
|
||||
+++ b/jax/experimental/compilation_cache/file_system_cache.py
|
||||
@@ -33,6 +33,7 @@ class FileSystemCache(CacheInterface):
|
||||
path_to_key = os.path.join(self._path, key)
|
||||
if os.path.exists(path_to_key):
|
||||
with open(path_to_key, "rb") as file:
|
||||
+ os.utime(file.fileno())
|
||||
return file.read()
|
||||
else:
|
||||
return None
|
||||
100
pkgs/development/python-modules/jax/default.nix
Normal file
100
pkgs/development/python-modules/jax/default.nix
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
{ lib
|
||||
, absl-py
|
||||
, blas
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, jaxlib
|
||||
, lapack
|
||||
, numpy
|
||||
, opt-einsum
|
||||
, pytestCheckHook
|
||||
, pytest-xdist
|
||||
, pythonOlder
|
||||
, scipy
|
||||
, typing-extensions
|
||||
}:
|
||||
|
||||
let
|
||||
usingMKL = blas.implementation == "mkl" || lapack.implementation == "mkl";
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "jax";
|
||||
version = "0.3.6";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "google";
|
||||
repo = pname;
|
||||
rev = "jax-v${version}";
|
||||
hash = "sha256-eGdAEZFHadNTHgciP4KMYHdwksz9g6un0Ar+A/KV5TE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# See https://github.com/google/jax/issues/7944
|
||||
./cache-fix.patch
|
||||
|
||||
# See https://github.com/google/jax/issues/10292
|
||||
(fetchpatch {
|
||||
url = "https://github.com/google/jax/commit/cadc8046d56e0c1433cf48a2f106947d5f4ecbfd.patch";
|
||||
hash = "sha256-jrpIqt4LzWAswt/Cpwtfa5d1Yn31HcXkVH3ETmaigA0=";
|
||||
})
|
||||
];
|
||||
|
||||
# jaxlib is _not_ included in propagatedBuildInputs because there are
|
||||
# different versions of jaxlib depending on the desired target hardware. The
|
||||
# JAX project ships separate wheels for CPU, GPU, and TPU. Currently only the
|
||||
# CPU wheel is packaged.
|
||||
propagatedBuildInputs = [
|
||||
absl-py
|
||||
numpy
|
||||
opt-einsum
|
||||
scipy
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
jaxlib
|
||||
pytestCheckHook
|
||||
pytest-xdist
|
||||
];
|
||||
|
||||
# high parallelism will result in the tests getting stuck
|
||||
dontUsePytestXdist = true;
|
||||
|
||||
# NOTE: Don't run the tests in the expiremental directory as they require flax
|
||||
# which creates a circular dependency. See https://discourse.nixos.org/t/how-to-nix-ify-python-packages-with-circular-dependencies/14648/2.
|
||||
# Not a big deal, this is how the JAX docs suggest running the test suite
|
||||
# anyhow.
|
||||
pytestFlagsArray = [
|
||||
"--numprocesses=4"
|
||||
"-W ignore::DeprecationWarning"
|
||||
"tests/"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Exceeds tolerance when the machine is busy
|
||||
"test_custom_linear_solve_aux"
|
||||
] ++ lib.optionals usingMKL [
|
||||
# See
|
||||
# * https://github.com/google/jax/issues/9705
|
||||
# * https://discourse.nixos.org/t/getting-different-results-for-the-same-build-on-two-equally-configured-machines/17921
|
||||
# * https://github.com/NixOS/nixpkgs/issues/161960
|
||||
"test_custom_linear_solve_cholesky"
|
||||
"test_custom_root_with_aux"
|
||||
"testEigvalsGrad_shape"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"jax"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Differentiate, compile, and transform Numpy code";
|
||||
homepage = "https://github.com/google/jax";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ samuela ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue