From 911f2954c600fc12eb9fa04d77ffd1594b289c0b Mon Sep 17 00:00:00 2001 From: oddlama Date: Fri, 12 Jul 2024 00:38:17 +0200 Subject: [PATCH] chore: update flake --- flake.lock | 101 +++---- pkgs/default.nix | 3 +- pkgs/jaxlib.nix | 451 ------------------------------ users/myuser/dev/gdb.nix | 4 +- users/myuser/neovim/languages.nix | 23 +- 5 files changed, 58 insertions(+), 524 deletions(-) delete mode 100644 pkgs/jaxlib.nix diff --git a/flake.lock b/flake.lock index 2f68190..2cf51be 100644 --- a/flake.lock +++ b/flake.lock @@ -28,11 +28,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1718371084, - "narHash": "sha256-abpBi61mg0g+lFFU0zY4C6oP6fBwPzbHPKBGw676xsA=", + "lastModified": 1720546205, + "narHash": "sha256-boCXsjYVxDviyzoEyAk624600f3ZBo/DKtUdvMTpbGY=", "owner": "ryantm", "repo": "agenix", - "rev": "3a56735779db467538fb2e577eda28a9daacaca6", + "rev": "de96bd907d5fbc3b14fc33ad37d1b9a3cb15edc6", "type": "github" }, "original": { @@ -51,11 +51,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1717947583, - "narHash": "sha256-vN/pfiAzYH4i3cUb5pLqkXgPoAPtaxjUXv5aRpbKShU=", + "lastModified": 1720397980, + "narHash": "sha256-vI92Y+f4iTDsoy+xg0n0I/bIY1xatvZ807spIgTjTc0=", "owner": "oddlama", "repo": "agenix-rekey", - "rev": "4551006c2807ab361ea4db5e171afb4798da4fc2", + "rev": "c071067f7d972552f5170cf8665643ed0ec19a6d", "type": "github" }, "original": { @@ -383,11 +383,11 @@ ] }, "locked": { - "lastModified": 1720056646, - "narHash": "sha256-BymcV4HWtx2VFuabDCM4/nEJcfivCx0S02wUCz11mAY=", + "lastModified": 1720661479, + "narHash": "sha256-nsGgA14vVn0GGiqEfomtVgviRJCuSR3UEopfP8ixW1I=", "owner": "nix-community", "repo": "disko", - "rev": "64679cd7f318c9b6595902b47d4585b1d51d5f9e", + "rev": "786965e1b1ed3fd2018d78399984f461e2a44689", "type": "github" }, "original": { @@ -436,22 +436,6 @@ "type": "github" } }, - "flake-compat_10": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-compat_2": { "flake": false, "locked": { @@ -549,11 +533,11 @@ "flake-compat_8": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "type": "github" }, "original": { @@ -565,11 +549,11 @@ "flake-compat_9": { "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -869,7 +853,10 @@ }, "git-hooks": { "inputs": { - "flake-compat": "flake-compat_7", + "flake-compat": [ + "nixvim", + "flake-compat" + ], "gitignore": "gitignore_5", "nixpkgs": [ "nixvim", @@ -1071,11 +1058,11 @@ ] }, "locked": { - "lastModified": 1720167120, - "narHash": "sha256-K9JYdlPiyaXp33JRg7CT8rMwH56e4ncXSsXW/YKnNXc=", + "lastModified": 1720646128, + "narHash": "sha256-BivO5yIQukDlJL+1875Sqf3GuOPxZDdA48dYDi3PkL8=", "owner": "nix-community", "repo": "home-manager", - "rev": "bbe6e94737289c8cb92d4d8f9199fbfe4f11c0ba", + "rev": "c085b984ff2808bf322f375b10fea5a415a9c43d", "type": "github" }, "original": { @@ -1183,11 +1170,11 @@ ] }, "locked": { - "lastModified": 1719832725, - "narHash": "sha256-dr8DkeS74KVNTgi8BE0BiUKALb+EKlMIV86G2xPYO64=", + "lastModified": 1720334033, + "narHash": "sha256-X9pEvvHTVWJphhbUYqXvlLedOndNqGB7rvhSvL2CIgU=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "2917972ed34ce292309b3a4976286f8b5c08db27", + "rev": "685e40e1348007d2cf76747a201bab43d86b38cb", "type": "github" }, "original": { @@ -1281,11 +1268,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1719895800, - "narHash": "sha256-xNbjISJTFailxass4LmdWeV4jNhAlmJPwj46a/GxE6M=", + "lastModified": 1720515935, + "narHash": "sha256-8b+fzR4W2hI5axwB+4nBwoA15awPKkck4ghhCt8v39M=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "6e253f12b1009053eff5344be5e835f604bb64cd", + "rev": "a111ce6b537df12a39874aa9672caa87f8677eda", "type": "github" }, "original": { @@ -1317,11 +1304,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1720031269, - "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", + "lastModified": 1720542800, + "narHash": "sha256-ZgnNHuKV6h2+fQ5LuqnUaqZey1Lqqt5dTUAiAnqH0QQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", + "rev": "feb2849fdeb70028c70d73b848214b00d324a497", "type": "github" }, "original": { @@ -1449,16 +1436,16 @@ }, "nixpkgs-stable_5": { "locked": { - "lastModified": 1718811006, - "narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=", + "lastModified": 1720386169, + "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "03d771e513ce90147b65fe922d87d3a0356fc125", + "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } @@ -1509,11 +1496,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1720210105, - "narHash": "sha256-AjcTv44xEAOxGqpoMxbfYcUwhCWLHESQIOIMcBFUCKk=", + "lastModified": 1720644298, + "narHash": "sha256-RlD6X9gtt1BocBa0YUBV49Rwct8UpY9L7N5uFWK5pgg=", "owner": "nix-community", "repo": "nixvim", - "rev": "367380bd8462419f0199d262b058fadfb43823ff", + "rev": "123c102a13d1aad053984af08ecc34e807e1f69d", "type": "github" }, "original": { @@ -1636,7 +1623,7 @@ }, "pre-commit-hooks_5": { "inputs": { - "flake-compat": "flake-compat_8", + "flake-compat": "flake-compat_7", "gitignore": "gitignore_6", "nixpkgs": [ "nixpkgs" @@ -1644,11 +1631,11 @@ "nixpkgs-stable": "nixpkgs-stable_5" }, "locked": { - "lastModified": 1719259945, - "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "lastModified": 1720524665, + "narHash": "sha256-ni/87oHPZm6Gv0ECYxr1f6uxB0UKBWJ6HvS7lwLU6oY=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "rev": "8d6a17d0cdf411c55f12602624df6368ad86fac1", "type": "github" }, "original": { @@ -1659,7 +1646,7 @@ }, "pre-commit-hooks_6": { "inputs": { - "flake-compat": "flake-compat_10", + "flake-compat": "flake-compat_9", "gitignore": "gitignore_7", "nixpkgs": [ "whisper-overlay", @@ -1779,7 +1766,7 @@ "base16-kitty": "base16-kitty", "base16-tmux": "base16-tmux", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_9", + "flake-compat": "flake-compat_8", "gnome-shell": "gnome-shell", "home-manager": [ "home-manager" diff --git a/pkgs/default.nix b/pkgs/default.nix index f66ae5a..d583bd5 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -38,8 +38,7 @@ inputs: [ #pythonPackagesExtensions = # prev.pythonPackagesExtensions # ++ [ - # (pythonFinal: _pythonPrev: { - # jaxlib = pythonFinal.callPackage ./jaxlib.nix {}; + # (_pythonFinal: pythonPrev: { # }) # ]; diff --git a/pkgs/jaxlib.nix b/pkgs/jaxlib.nix deleted file mode 100644 index a403e29..0000000 --- a/pkgs/jaxlib.nix +++ /dev/null @@ -1,451 +0,0 @@ -{ - lib, - pkgs, - # Build-time dependencies: - autoAddDriverRunpath, - bazel_6, - binutils, - buildBazelPackage, - buildPythonPackage, - curl, - cython, - fetchFromGitHub, - git, - jsoncpp, - nsync, - openssl, - pybind11, - setuptools, - symlinkJoin, - wheel, - build, - which, - # Python dependencies: - absl-py, - flatbuffers, - ml-dtypes, - numpy, - scipy, - six, - # Runtime dependencies: - double-conversion, - giflib, - libjpeg_turbo, - python, - snappy, - zlib, - config, - # CUDA flags: - cudaSupport ? config.cudaSupport, - cudaPackages, - # MKL: - mklSupport ? true, -} @ inputs: let - inherit - (cudaPackages) - cudaFlags - cudaVersion - cudnn - nccl - ; - - pname = "jaxlib"; - version = "0.4.28"; - - # It's necessary to consistently use backendStdenv when building with CUDA - # support, otherwise we get libstdc++ errors downstream - stdenv = throw "Use effectiveStdenv instead"; - effectiveStdenv = - if cudaSupport - then cudaPackages.backendStdenv - else inputs.stdenv; - - meta = with lib; { - description = "JAX is Autograd and XLA, brought together for high-performance machine learning research"; - homepage = "https://github.com/google/jax"; - license = licenses.asl20; - maintainers = with maintainers; [ndl]; - platforms = platforms.unix; - # aarch64-darwin is broken because of https://github.com/bazelbuild/rules_cc/pull/136 - # however even with that fix applied, it doesn't work for everyone: - # https://github.com/NixOS/nixpkgs/pull/184395#issuecomment-1207287129 - # NOTE: We always build with NCCL; if it is unsupported, then our build is broken. - broken = effectiveStdenv.isDarwin || nccl.meta.unsupported; - }; - - # These are necessary at build time and run time. - cuda_libs_joined = symlinkJoin { - name = "cuda-joined"; - paths = with cudaPackages; [ - cuda_cudart.lib # libcudart.so - cuda_cudart.static # libcudart_static.a - cuda_cupti.lib # libcupti.so - libcublas.lib # libcublas.so - libcufft.lib # libcufft.so - libcurand.lib # libcurand.so - libcusolver.lib # libcusolver.so - libcusparse.lib # libcusparse.so - ]; - }; - # These are only necessary at build time. - cuda_build_deps_joined = symlinkJoin { - name = "cuda-build-deps-joined"; - paths = with cudaPackages; [ - cuda_libs_joined - - # Binaries - cudaPackages.cuda_nvcc.bin # nvcc - - # Headers - cuda_cccl.dev # block_load.cuh - cuda_cudart.dev # cuda.h - cuda_cupti.dev # cupti.h - cuda_nvcc.dev # See https://github.com/google/jax/issues/19811 - cuda_nvml_dev # nvml.h - cuda_nvtx.dev # nvToolsExt.h - libcublas.dev # cublas_api.h - libcufft.dev # cufft.h - libcurand.dev # curand.h - libcusolver.dev # cusolver_common.h - libcusparse.dev # cusparse.h - ]; - }; - - backend_cc_joined = symlinkJoin { - name = "cuda-cc-joined"; - paths = [ - effectiveStdenv.cc - binutils.bintools # for ar, dwp, nm, objcopy, objdump, strip - ]; - }; - - # Copy-paste from TF derivation. - # Most of these are not really used in jaxlib compilation but it's simpler to keep it - # 'as is' so that it's more compatible with TF derivation. - tf_system_libs = [ - "absl_py" - "astor_archive" - "astunparse_archive" - # Not packaged in nixpkgs - # "com_github_googleapis_googleapis" - # "com_github_googlecloudplatform_google_cloud_cpp" - # Issue with transitive dependencies after https://github.com/grpc/grpc/commit/f1d14f7f0b661bd200b7f269ef55dec870e7c108 - # "com_github_grpc_grpc" - # ERROR: /build/output/external/bazel_tools/tools/proto/BUILD:25:6: no such target '@com_google_protobuf//:cc_toolchain': - # target 'cc_toolchain' not declared in package '' defined by /build/output/external/com_google_protobuf/BUILD.bazel - # "com_google_protobuf" - # Fails with the error: external/org_tensorflow/tensorflow/core/profiler/utils/tf_op_utils.cc:46:49: error: no matching function for call to 're2::RE2::FullMatch(absl::lts_2020_02_25::string_view&, re2::RE2&)' - # "com_googlesource_code_re2" - "curl" - "cython" - "dill_archive" - "double_conversion" - "flatbuffers" - "functools32_archive" - "gast_archive" - "gif" - "hwloc" - "icu" - "jsoncpp_git" - "libjpeg_turbo" - "lmdb" - "nasm" - "opt_einsum_archive" - "org_sqlite" - "pasta" - "png" - # ERROR: /build/output/external/pybind11/BUILD.bazel: no such target '@pybind11//:osx': - # target 'osx' not declared in package '' defined by /build/output/external/pybind11/BUILD.bazel - # "pybind11" - "six_archive" - "snappy" - "tblib_archive" - "termcolor_archive" - "typing_extensions_archive" - "wrapt" - "zlib" - ]; - - arch = - # KeyError: ('Linux', 'arm64') - if effectiveStdenv.hostPlatform.isLinux && effectiveStdenv.hostPlatform.linuxArch == "arm64" - then "aarch64" - else effectiveStdenv.hostPlatform.linuxArch; - - xla = effectiveStdenv.mkDerivation { - pname = "xla-src"; - version = "unstable"; - - src = fetchFromGitHub { - owner = "openxla"; - repo = "xla"; - # Update this according to https://github.com/google/jax/blob/jaxlib-v${version}/third_party/xla/workspace.bzl. - rev = "e8247c3ea1d4d7f31cf27def4c7ac6f2ce64ecd4"; - hash = "sha256-ZhgMIVs3Z4dTrkRWDqaPC/i7yJz2dsYXrZbjzqvPX3E="; - }; - - dontBuild = true; - - # This is necessary for patchShebangs to know the right path to use. - nativeBuildInputs = [python]; - - # Main culprits we're targeting are third_party/tsl/third_party/gpus/crosstool/clang/bin/*.tpl - postPatch = '' - patchShebangs . - ''; - - installPhase = '' - cp -r . $out - ''; - }; - - bazel-build = buildBazelPackage rec { - name = "bazel-build-${pname}-${version}"; - - # See https://github.com/google/jax/blob/main/.bazelversion for the latest. - bazel = bazel_6; - - src = fetchFromGitHub { - owner = "google"; - repo = "jax"; - # google/jax contains tags for jax and jaxlib. Only use jaxlib tags! - rev = "refs/tags/${pname}-v${version}"; - hash = "sha256-qSHPwi3is6Ts7pz5s4KzQHBMbcjGp+vAOsejW3o36Ek="; - }; - - nativeBuildInputs = [ - cython - pkgs.flatbuffers - git - setuptools - wheel - build - which - ]; - - buildInputs = - [ - curl - double-conversion - giflib - jsoncpp - libjpeg_turbo - numpy - openssl - pkgs.flatbuffers - pkgs.protobuf - pybind11 - scipy - six - snappy - zlib - ] - ++ lib.optionals (!effectiveStdenv.isDarwin) [nsync]; - - # We don't want to be quite so picky regarding bazel version - postPatch = '' - rm -f .bazelversion - ''; - - bazelRunTarget = "//jaxlib/tools:build_wheel"; - runTargetFlags = [ - "--output_path=$out" - "--cpu=${arch}" - # This has no impact whatsoever... - "--jaxlib_git_hash='12345678'" - ]; - - removeRulesCC = false; - - GCC_HOST_COMPILER_PREFIX = lib.optionalString cudaSupport "${backend_cc_joined}/bin"; - GCC_HOST_COMPILER_PATH = lib.optionalString cudaSupport "${backend_cc_joined}/bin/gcc"; - - # The version is automatically set to ".dev" if this variable is not set. - # https://github.com/google/jax/commit/e01f2617b85c5bdffc5ffb60b3d8d8ca9519a1f3 - JAXLIB_RELEASE = "1"; - - preConfigure = - # Dummy ldconfig to work around "Can't open cache file /nix/store/-glibc-2.38-44/etc/ld.so.cache" error - '' - mkdir dummy-ldconfig - echo "#!${effectiveStdenv.shell}" > dummy-ldconfig/ldconfig - chmod +x dummy-ldconfig/ldconfig - export PATH="$PWD/dummy-ldconfig:$PATH" - '' - + - # Construct .jax_configure.bazelrc. See https://github.com/google/jax/blob/b9824d7de3cb30f1df738cc42e486db3e9d915ff/build/build.py#L259-L345 - # for more info. We assume - # * `cpu = None` - # * `enable_nccl = True` - # * `target_cpu_features = "release"` - # * `rocm_amdgpu_targets = None` - # * `enable_rocm = False` - # * `build_gpu_plugin = False` - # * `use_clang = False` (Should we use `effectiveStdenv.cc.isClang` instead?) - # - # Note: We should try just running https://github.com/google/jax/blob/ceb198582b62b9e6f6bdf20ab74839b0cf1db16e/build/build.py#L259-L266 - # instead of duplicating the logic here. Perhaps we can leverage the - # `--configure_only` flag (https://github.com/google/jax/blob/ceb198582b62b9e6f6bdf20ab74839b0cf1db16e/build/build.py#L544-L548)? - '' - cat < ./.jax_configure.bazelrc - build --strategy=Genrule=standalone - build --repo_env PYTHON_BIN_PATH="${python}/bin/python" - build --action_env=PYENV_ROOT - build --python_path="${python}/bin/python" - build --distinct_host_configuration=false - build --define PROTOBUF_INCLUDE_PATH="${pkgs.protobuf}/include" - '' - + lib.optionalString cudaSupport '' - build --config=cuda - build --action_env CUDA_TOOLKIT_PATH="${cuda_build_deps_joined}" - build --action_env CUDNN_INSTALL_PATH="${cudnn}" - build --action_env TF_CUDA_PATHS="${cuda_build_deps_joined},${cudnn},${nccl}" - build --action_env TF_CUDA_VERSION="${lib.versions.majorMinor cudaVersion}" - build --action_env TF_CUDNN_VERSION="${lib.versions.major cudnn.version}" - build:cuda --action_env TF_CUDA_COMPUTE_CAPABILITIES="${builtins.concatStringsSep "," cudaFlags.realArches}" - '' - + - # Note that upstream conditions this on `wheel_cpu == "x86_64"`. We just - # rely on `effectiveStdenv.hostPlatform.avxSupport` instead. So far so - # good. See https://github.com/google/jax/blob/b9824d7de3cb30f1df738cc42e486db3e9d915ff/build/build.py#L322 - # for upstream's version. - lib.optionalString (effectiveStdenv.hostPlatform.avxSupport && effectiveStdenv.hostPlatform.isUnix) - '' - build --config=avx_posix - '' - + lib.optionalString mklSupport '' - build --config=mkl_open_source_only - '' - + '' - CFG - ''; - - # Make sure Bazel knows about our configuration flags during fetching so that the - # relevant dependencies can be downloaded. - bazelFlags = - [ - "-c opt" - # See https://bazel.build/external/advanced#overriding-repositories for - # information on --override_repository flag. - "--override_repository=xla=${xla}" - ] - ++ lib.optionals effectiveStdenv.cc.isClang [ - # bazel depends on the compiler frontend automatically selecting these flags based on file - # extension but our clang doesn't. - # https://github.com/NixOS/nixpkgs/issues/150655 - "--cxxopt=-x" - "--cxxopt=c++" - "--host_cxxopt=-x" - "--host_cxxopt=c++" - ]; - - # We intentionally overfetch so we can share the fetch derivation across all the different configurations - fetchAttrs = { - TF_SYSTEM_LIBS = lib.concatStringsSep "," tf_system_libs; - # we have to force @mkl_dnn_v1 since it's not needed on darwin - bazelTargets = [ - bazelRunTarget - "@mkl_dnn_v1//:mkl_dnn" - ]; - bazelFlags = - bazelFlags - ++ [ - "--config=avx_posix" - "--config=mkl_open_source_only" - ] - ++ lib.optionals cudaSupport [ - # ideally we'd add this unconditionally too, but it doesn't work on darwin - # we make this conditional on `cudaSupport` instead of the system, so that the hash for both - # the cuda and the non-cuda deps can be computed on linux, since a lot of contributors don't - # have access to darwin machines - "--config=cuda" - ]; - - sha256 = - ( - if cudaSupport - then {x86_64-linux = "sha256-vUoAPkYKEnHkV4fw6BI0mCeuP2e8BMCJnVuZMm9LwSA=";} - else { - x86_64-linux = "sha256-uOoAyMBLHPX6jzdN43b5wZV5eW0yI8sCDD7BSX2h4oQ="; - aarch64-linux = "sha256-+SnGKY9LIT1Qhu/x6Uh7sHRaAEjlc//qyKj1m4t16PA="; - } - ) - .${effectiveStdenv.system} - or (throw "jaxlib: unsupported system: ${effectiveStdenv.system}"); - }; - - buildAttrs = { - outputs = ["out"]; - - TF_SYSTEM_LIBS = lib.concatStringsSep "," ( - tf_system_libs - ++ lib.optionals (!effectiveStdenv.isDarwin) [ - "nsync" # fails to build on darwin - ] - ); - }; - - inherit meta; - }; - platformTag = - if effectiveStdenv.hostPlatform.isLinux - then "manylinux2014_${arch}" - else if effectiveStdenv.system == "x86_64-darwin" - then "macosx_10_9_${arch}" - else if effectiveStdenv.system == "aarch64-darwin" - then "macosx_11_0_${arch}" - else throw "Unsupported target platform: ${effectiveStdenv.hostPlatform}"; -in - buildPythonPackage { - inherit meta pname version; - format = "wheel"; - - src = let - cp = "cp${builtins.replaceStrings ["."] [""] python.pythonVersion}"; - in "${bazel-build}/jaxlib-${version}-${cp}-${cp}-${platformTag}.whl"; - - # Note that jaxlib looks for "ptxas" in $PATH. See https://github.com/NixOS/nixpkgs/pull/164176#discussion_r828801621 - # for more info. - postInstall = lib.optionalString cudaSupport '' - mkdir -p $out/bin - ln -s ${cudaPackages.cuda_nvcc.bin}/bin/ptxas $out/bin/ptxas - - find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do - patchelf --add-rpath "${ - lib.makeLibraryPath [ - cuda_libs_joined - cudnn - nccl - ] - }" "$lib" - done - ''; - - nativeBuildInputs = lib.optionals cudaSupport [autoAddDriverRunpath]; - - dependencies = [ - absl-py - curl - double-conversion - flatbuffers - giflib - jsoncpp - libjpeg_turbo - ml-dtypes - numpy - scipy - six - snappy - ]; - - pythonImportsCheck = [ - "jaxlib" - # `import jaxlib` loads surprisingly little. These imports are actually bugs that appeared in the 0.4.11 upgrade. - "jaxlib.cpu_feature_guard" - "jaxlib.xla_client" - ]; - - # Without it there are complaints about libcudart.so.11.0 not being found - # because RPATH path entries added above are stripped. - dontPatchELF = cudaSupport; - } diff --git a/users/myuser/dev/gdb.nix b/users/myuser/dev/gdb.nix index 28071ab..9f79bc0 100644 --- a/users/myuser/dev/gdb.nix +++ b/users/myuser/dev/gdb.nix @@ -23,8 +23,8 @@ ''; }); in { - home.packages = [ - pwndbgWithDebuginfod + home.packages = builtins.trace "WARN: reenable pwndbg later!" [ + #pwndbgWithDebuginfod pkgs.hotspot ]; diff --git a/users/myuser/neovim/languages.nix b/users/myuser/neovim/languages.nix index 3d584fd..ad3bd28 100644 --- a/users/myuser/neovim/languages.nix +++ b/users/myuser/neovim/languages.nix @@ -10,20 +10,19 @@ plugins = { treesitter = { enable = true; - # TODO (autocmd * zR needed) folding = true; - indent = true; + settings = { + indent.enable = true; - incrementalSelection = { - enable = true; - keymaps = { - initSelection = ""; - nodeIncremental = ""; - scopeIncremental = ""; - nodeDecremental = ""; + incremental_selection = { + enable = true; + keymaps = { + init_selection = ""; + node_incremental = ""; + scope_incremental = ""; + node_decremental = ""; + }; }; }; - - nixvimInjections = true; }; # Cargo.toml dependency completion @@ -37,7 +36,7 @@ rustaceanvim = { enable = true; settings = { - server.settings.files.excludeDirs = [".direnv"]; + server.default_settings.files.excludeDirs = [".direnv"]; dap.autoloadConfigurations = true; dap.adapter = let code-lldb = pkgs.vscode-extensions.vadimcn.vscode-lldb;