mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 21:10:08 +00:00
Merge master into staging-next
This commit is contained in:
@@ -65,97 +65,6 @@ for your specific card(s).
|
||||
Library maintainers should consult [NVCC Docs](https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/)
|
||||
and release notes for their software package.
|
||||
|
||||
## Adding a new CUDA release {#adding-a-new-cuda-release}
|
||||
|
||||
> **WARNING**
|
||||
>
|
||||
> This section of the docs is still very much in progress. Feedback is welcome in GitHub Issues tagging @NixOS/cuda-maintainers or on [Matrix](https://matrix.to/#/#cuda:nixos.org).
|
||||
|
||||
The CUDA Toolkit is a suite of CUDA libraries and software meant to provide a development environment for CUDA-accelerated applications. Until the release of CUDA 11.4, NVIDIA had only made the CUDA Toolkit available as a multi-gigabyte runfile installer, which we provide through the [`cudaPackages.cudatoolkit`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.cudatoolkit) attribute. From CUDA 11.4 and onwards, NVIDIA has also provided CUDA redistributables (“CUDA-redist”): individually packaged CUDA Toolkit components meant to facilitate redistribution and inclusion in downstream projects. These packages are available in the [`cudaPackages`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages) package set.
|
||||
|
||||
All new projects should use the CUDA redistributables available in [`cudaPackages`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages) in place of [`cudaPackages.cudatoolkit`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.cudatoolkit), as they are much easier to maintain and update.
|
||||
|
||||
### Updating CUDA redistributables {#updating-cuda-redistributables}
|
||||
|
||||
1. Go to NVIDIA's index of CUDA redistributables: <https://developer.download.nvidia.com/compute/cuda/redist/>
|
||||
2. Make a note of the new version of CUDA available.
|
||||
3. Run
|
||||
|
||||
```bash
|
||||
nix run github:connorbaker/cuda-redist-find-features -- \
|
||||
download-manifests \
|
||||
--log-level DEBUG \
|
||||
--version <newest CUDA version> \
|
||||
https://developer.download.nvidia.com/compute/cuda/redist \
|
||||
./pkgs/development/cuda-modules/cuda/manifests
|
||||
```
|
||||
|
||||
This will download a copy of the manifest for the new version of CUDA.
|
||||
4. Run
|
||||
|
||||
```bash
|
||||
nix run github:connorbaker/cuda-redist-find-features -- \
|
||||
process-manifests \
|
||||
--log-level DEBUG \
|
||||
--version <newest CUDA version> \
|
||||
https://developer.download.nvidia.com/compute/cuda/redist \
|
||||
./pkgs/development/cuda-modules/cuda/manifests
|
||||
```
|
||||
|
||||
This will generate a `redistrib_features_<newest CUDA version>.json` file in the same directory as the manifest.
|
||||
5. Update the `cudaVersionMap` attribute set in `pkgs/development/cuda-modules/cuda/extension.nix`.
|
||||
|
||||
### Updating cuTensor {#updating-cutensor}
|
||||
|
||||
1. Repeat the steps present in [Updating CUDA redistributables](#updating-cuda-redistributables) with the following changes:
|
||||
- Use the index of cuTensor redistributables: <https://developer.download.nvidia.com/compute/cutensor/redist>
|
||||
- Use the newest version of cuTensor available instead of the newest version of CUDA.
|
||||
- Use `pkgs/development/cuda-modules/cutensor/manifests` instead of `pkgs/development/cuda-modules/cuda/manifests`.
|
||||
- Skip the step of updating `cudaVersionMap` in `pkgs/development/cuda-modules/cuda/extension.nix`.
|
||||
|
||||
### Updating supported compilers and GPUs {#updating-supported-compilers-and-gpus}
|
||||
|
||||
1. Update `nvccCompatibilities` in `pkgs/development/cuda-modules/_cuda/db/bootstrap/nvcc.nix` to include the newest release of NVCC, as well as any newly supported host compilers.
|
||||
2. Update `cudaCapabilityToInfo` in `pkgs/development/cuda-modules/_cuda/db/bootstrap/cuda.nix` to include any new GPUs supported by the new release of CUDA.
|
||||
|
||||
### Updating the CUDA Toolkit runfile installer {#updating-the-cuda-toolkit}
|
||||
|
||||
> **WARNING**
|
||||
>
|
||||
> While the CUDA Toolkit runfile installer is still available in Nixpkgs as the [`cudaPackages.cudatoolkit`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.cudatoolkit) attribute, its use is not recommended and should it be considered deprecated. Please migrate to the CUDA redistributables provided by the [`cudaPackages`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages) package set.
|
||||
>
|
||||
> To ensure packages relying on the CUDA Toolkit runfile installer continue to build, it will continue to be updated until a migration path is available.
|
||||
|
||||
1. Go to NVIDIA's CUDA Toolkit runfile installer download page: <https://developer.nvidia.com/cuda-downloads>
|
||||
2. Select the appropriate OS, architecture, distribution, and version, and installer type.
|
||||
|
||||
- For example: Linux, x86_64, Ubuntu, 22.04, runfile (local)
|
||||
- NOTE: Typically, we use the Ubuntu runfile. It is unclear if the runfile for other distributions will work.
|
||||
|
||||
3. Take the link provided by the installer instructions on the webpage after selecting the installer type and get its hash by running:
|
||||
|
||||
```bash
|
||||
nix store prefetch-file --hash-type sha256 <link>
|
||||
```
|
||||
|
||||
4. Update `pkgs/development/cuda-modules/cudatoolkit/releases.nix` to include the release.
|
||||
|
||||
### Updating the CUDA package set {#updating-the-cuda-package-set}
|
||||
|
||||
1. Include a new `cudaPackages_<major>_<minor>` package set in `pkgs/top-level/all-packages.nix`.
|
||||
|
||||
- NOTE: Changing the default CUDA package set should occur in a separate PR, allowing time for additional testing.
|
||||
|
||||
2. Successfully build the closure of the new package set, updating `pkgs/development/cuda-modules/cuda/overrides.nix` as needed. Below are some common failures:
|
||||
|
||||
| Unable to ... | During ... | Reason | Solution | Note |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Find headers | `configurePhase` or `buildPhase` | Missing dependency on a `dev` output | Add the missing dependency | The `dev` output typically contain the headers |
|
||||
| Find libraries | `configurePhase` | Missing dependency on a `dev` output | Add the missing dependency | The `dev` output typically contain CMake configuration files |
|
||||
| Find libraries | `buildPhase` or `patchelf` | Missing dependency on a `lib` or `static` output | Add the missing dependency | The `lib` or `static` output typically contain the libraries |
|
||||
|
||||
In the scenario you are unable to run the resulting binary: this is arguably the most complicated as it could be any combination of the previous reasons. This type of failure typically occurs when a library attempts to load or open a library it depends on that it does not declare in its `DT_NEEDED` section. As a first step, ensure that dependencies are patched with [`autoAddDriverRunpath`](https://search.nixos.org/packages?channel=unstable&type=packages&query=autoAddDriverRunpath). Failing that, try running the application with [`nixGL`](https://github.com/guibou/nixGL) or a similar wrapper tool. If that works, it likely means that the application is attempting to load a library that is not in the `RPATH` or `RUNPATH` of the binary.
|
||||
|
||||
## Running Docker or Podman containers with CUDA support {#cuda-docker-podman}
|
||||
|
||||
It is possible to run Docker or Podman containers with CUDA support. The recommended mechanism to perform this task is to use the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/index.html).
|
||||
@@ -201,7 +110,7 @@ $ nix run nixpkgs#jq -- -r '.devices[].name' < /var/run/cdi/nvidia-container-too
|
||||
all
|
||||
```
|
||||
|
||||
### Specifying what devices to expose to the container {#specifying-what-devices-to-expose-to-the-container}
|
||||
### Specifying what devices to expose to the container {#cuda-specifying-what-devices-to-expose-to-the-container}
|
||||
|
||||
You can choose what devices are exposed to your containers by using the identifier on the generated CDI specification. Like follows:
|
||||
|
||||
@@ -222,7 +131,7 @@ GPU 1: NVIDIA GeForce RTX 2080 SUPER (UUID: <REDACTED>)
|
||||
By default, the NVIDIA Container Toolkit will use the GPU index to identify specific devices. You can change the way to identify what devices to expose by using the `hardware.nvidia-container-toolkit.device-name-strategy` NixOS attribute.
|
||||
:::
|
||||
|
||||
### Using docker-compose {#using-docker-compose}
|
||||
### Using docker-compose {#cuda-using-docker-compose}
|
||||
|
||||
It's possible to expose GPU's to a `docker-compose` environment as well. With a `docker-compose.yaml` file like follows:
|
||||
|
||||
@@ -256,3 +165,142 @@ services:
|
||||
- nvidia.com/gpu=0
|
||||
- nvidia.com/gpu=1
|
||||
```
|
||||
|
||||
## Contributing {#cuda-contributing}
|
||||
|
||||
::: {.warning}
|
||||
This section of the docs is still very much in progress. Feedback is welcome in GitHub Issues tagging @NixOS/cuda-maintainers or on [Matrix](https://matrix.to/#/#cuda:nixos.org).
|
||||
:::
|
||||
|
||||
### Package set maintenance {#cuda-package-set-maintenance}
|
||||
|
||||
The CUDA Toolkit is a suite of CUDA libraries and software meant to provide a development environment for CUDA-accelerated applications. Until the release of CUDA 11.4, NVIDIA had only made the CUDA Toolkit available as a multi-gigabyte runfile installer, which we provide through the [`cudaPackages.cudatoolkit`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.cudatoolkit) attribute. From CUDA 11.4 and onwards, NVIDIA has also provided CUDA redistributables (“CUDA-redist”): individually packaged CUDA Toolkit components meant to facilitate redistribution and inclusion in downstream projects. These packages are available in the [`cudaPackages`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages) package set.
|
||||
|
||||
All new projects should use the CUDA redistributables available in [`cudaPackages`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages) in place of [`cudaPackages.cudatoolkit`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.cudatoolkit), as they are much easier to maintain and update.
|
||||
|
||||
#### Updating redistributables {#cuda-updating-redistributables}
|
||||
|
||||
1. Go to NVIDIA's index of CUDA redistributables: <https://developer.download.nvidia.com/compute/cuda/redist/>
|
||||
2. Make a note of the new version of CUDA available.
|
||||
3. Run
|
||||
|
||||
```bash
|
||||
nix run github:connorbaker/cuda-redist-find-features -- \
|
||||
download-manifests \
|
||||
--log-level DEBUG \
|
||||
--version <newest CUDA version> \
|
||||
https://developer.download.nvidia.com/compute/cuda/redist \
|
||||
./pkgs/development/cuda-modules/cuda/manifests
|
||||
```
|
||||
|
||||
This will download a copy of the manifest for the new version of CUDA.
|
||||
4. Run
|
||||
|
||||
```bash
|
||||
nix run github:connorbaker/cuda-redist-find-features -- \
|
||||
process-manifests \
|
||||
--log-level DEBUG \
|
||||
--version <newest CUDA version> \
|
||||
https://developer.download.nvidia.com/compute/cuda/redist \
|
||||
./pkgs/development/cuda-modules/cuda/manifests
|
||||
```
|
||||
|
||||
This will generate a `redistrib_features_<newest CUDA version>.json` file in the same directory as the manifest.
|
||||
5. Update the `cudaVersionMap` attribute set in `pkgs/development/cuda-modules/cuda/extension.nix`.
|
||||
|
||||
#### Updating cuTensor {#cuda-updating-cutensor}
|
||||
|
||||
1. Repeat the steps present in [Updating CUDA redistributables](#cuda-updating-redistributables) with the following changes:
|
||||
- Use the index of cuTensor redistributables: <https://developer.download.nvidia.com/compute/cutensor/redist>
|
||||
- Use the newest version of cuTensor available instead of the newest version of CUDA.
|
||||
- Use `pkgs/development/cuda-modules/cutensor/manifests` instead of `pkgs/development/cuda-modules/cuda/manifests`.
|
||||
- Skip the step of updating `cudaVersionMap` in `pkgs/development/cuda-modules/cuda/extension.nix`.
|
||||
|
||||
#### Updating supported compilers and GPUs {#cuda-updating-supported-compilers-and-gpus}
|
||||
|
||||
1. Update `nvccCompatibilities` in `pkgs/development/cuda-modules/_cuda/data/nvcc.nix` to include the newest release of NVCC, as well as any newly supported host compilers.
|
||||
2. Update `cudaCapabilityToInfo` in `pkgs/development/cuda-modules/_cuda/data/cuda.nix` to include any new GPUs supported by the new release of CUDA.
|
||||
|
||||
#### Updating the CUDA Toolkit runfile installer {#cuda-updating-the-cuda-toolkit}
|
||||
|
||||
::: {.warning}
|
||||
While the CUDA Toolkit runfile installer is still available in Nixpkgs as the [`cudaPackages.cudatoolkit`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.cudatoolkit) attribute, its use is not recommended, and it should be considered deprecated. Please migrate to the CUDA redistributables provided by the [`cudaPackages`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages) package set.
|
||||
|
||||
To ensure packages relying on the CUDA Toolkit runfile installer continue to build, it will continue to be updated until a migration path is available.
|
||||
:::
|
||||
|
||||
1. Go to NVIDIA's CUDA Toolkit runfile installer download page: <https://developer.nvidia.com/cuda-downloads>
|
||||
2. Select the appropriate OS, architecture, distribution, and version, and installer type.
|
||||
|
||||
- For example: Linux, x86_64, Ubuntu, 22.04, runfile (local)
|
||||
- NOTE: Typically, we use the Ubuntu runfile. It is unclear if the runfile for other distributions will work.
|
||||
|
||||
3. Take the link provided by the installer instructions on the webpage after selecting the installer type and get its hash by running:
|
||||
|
||||
```bash
|
||||
nix store prefetch-file --hash-type sha256 <link>
|
||||
```
|
||||
|
||||
4. Update `pkgs/development/cuda-modules/cudatoolkit/releases.nix` to include the release.
|
||||
|
||||
#### Updating the CUDA package set {#cuda-updating-the-cuda-package-set}
|
||||
|
||||
1. Include a new `cudaPackages_<major>_<minor>` package set in `pkgs/top-level/all-packages.nix`.
|
||||
|
||||
- NOTE: Changing the default CUDA package set should occur in a separate PR, allowing time for additional testing.
|
||||
|
||||
2. Successfully build the closure of the new package set, updating `pkgs/development/cuda-modules/cuda/overrides.nix` as needed. Below are some common failures:
|
||||
|
||||
| Unable to ... | During ... | Reason | Solution | Note |
|
||||
| -------------- | -------------------------------- | ------------------------------------------------ | -------------------------- | ------------------------------------------------------------ |
|
||||
| Find headers | `configurePhase` or `buildPhase` | Missing dependency on a `dev` output | Add the missing dependency | The `dev` output typically contains the headers |
|
||||
| Find libraries | `configurePhase` | Missing dependency on a `dev` output | Add the missing dependency | The `dev` output typically contains CMake configuration files |
|
||||
| Find libraries | `buildPhase` or `patchelf` | Missing dependency on a `lib` or `static` output | Add the missing dependency | The `lib` or `static` output typically contains the libraries |
|
||||
|
||||
Failure to run the resulting binary is typically the most challenging to diagnose, as it may involve a combination of the aforementioned issues. This type of failure typically occurs when a library attempts to load or open a library it depends on that it does not declare in its `DT_NEEDED` section. Try the following debugging steps:
|
||||
|
||||
1. First ensure that dependencies are patched with [`autoAddDriverRunpath`](https://search.nixos.org/packages?channel=unstable&type=packages&query=autoAddDriverRunpath).
|
||||
2. Failing that, try running the application with [`nixGL`](https://github.com/guibou/nixGL) or a similar wrapper tool.
|
||||
3. If that works, it likely means that the application is attempting to load a library that is not in the `RPATH` or `RUNPATH` of the binary.
|
||||
|
||||
### Writing tests {#cuda-writing-tests}
|
||||
|
||||
::: {.caution}
|
||||
The existence of `passthru.testers` and `passthru.tests` should be considered an implementation detail -- they are not meant to be a public or stable interface.
|
||||
:::
|
||||
|
||||
In general, there are two attribute sets in `passthru` that are used to build and run tests for CUDA packages: `passthru.testers` and `passthru.tests`. Each attribute set may contain an attribute set named `cuda`, which contains CUDA-specific derivations. The `cuda` attribute set is used to separate CUDA-specific derivations from those which support multiple implementations (e.g., OpenCL, ROCm, etc.) or have different licenses. For an example of such generic derivations, see the `magma` package.
|
||||
|
||||
::: {.note}
|
||||
Derivations are nested under the `cuda` attribute due to an OfBorg quirk: if evaluation fails (e.g., because of unfree licenses), the entire enclosing attribute set is discarded. This prevents other attributes in the set from being discovered, evaluated, or built.
|
||||
:::
|
||||
|
||||
#### `passthru.testers` {#cuda-passthru-testers}
|
||||
|
||||
Attributes added to `passthru.testers` are derivations which produce an executable which runs a test. The produced executable should:
|
||||
|
||||
- Take care to set up the environment, make temporary directories, and so on.
|
||||
- Be registered as the derivation's `meta.mainProgram` so that it can be run directly.
|
||||
|
||||
::: {.note}
|
||||
Testers which always require CUDA should be placed in `passthru.testers.cuda`, while those which are generic should be placed in `passthru.testers`.
|
||||
:::
|
||||
|
||||
The `passthru.testers` attribute set allows running tests outside the Nix sandbox. There are a number of reasons why this is useful, since such a test:
|
||||
|
||||
- Can be run on non-NixOS systems, when wrapped with utilities like `nixGL` or `nix-gl-host`.
|
||||
- Has network access patterns which are difficult or impossible to sandbox.
|
||||
- Is free to produce output which is not deterministic, such as timing information.
|
||||
|
||||
#### `passthru.tests` {#cuda-passthru-tests}
|
||||
|
||||
Attributes added to `passthru.tests` are derivations which run tests inside the Nix sandbox. Tests should:
|
||||
|
||||
- Use the executables produced by `passthru.testers`, where possible, to avoid duplication of test logic.
|
||||
- Include `requiredSystemFeatures = [ "cuda" ];`, possibly conditioned on the value of `cudaSupport` if they are generic, to ensure that they are only run on systems exposing a CUDA-capable GPU.
|
||||
|
||||
::: {.note}
|
||||
Tests which always require CUDA should be placed in `passthru.tests.cuda`, while those which are generic should be placed in `passthru.tests`.
|
||||
:::
|
||||
|
||||
This is useful for tests which are deterministic (e.g., checking exit codes) and which can be provided with all necessary resources in the sandbox.
|
||||
|
||||
@@ -2756,33 +2756,53 @@
|
||||
"cuda": [
|
||||
"index.html#cuda"
|
||||
],
|
||||
"adding-a-new-cuda-release": [
|
||||
"index.html#adding-a-new-cuda-release"
|
||||
],
|
||||
"updating-cuda-redistributables": [
|
||||
"index.html#updating-cuda-redistributables"
|
||||
],
|
||||
"updating-cutensor": [
|
||||
"index.html#updating-cutensor"
|
||||
],
|
||||
"updating-supported-compilers-and-gpus": [
|
||||
"index.html#updating-supported-compilers-and-gpus"
|
||||
],
|
||||
"updating-the-cuda-toolkit": [
|
||||
"index.html#updating-the-cuda-toolkit"
|
||||
],
|
||||
"updating-the-cuda-package-set": [
|
||||
"index.html#updating-the-cuda-package-set"
|
||||
"cuda-contributing": [
|
||||
"index.html#cuda-contributing"
|
||||
],
|
||||
"cuda-docker-podman": [
|
||||
"index.html#cuda-docker-podman"
|
||||
],
|
||||
"specifying-what-devices-to-expose-to-the-container": [
|
||||
"cuda-package-set-maintenance": [
|
||||
"index.html#cuda-package-set-maintenance",
|
||||
"index.html#adding-a-new-cuda-release"
|
||||
],
|
||||
"cuda-passthru-testers": [
|
||||
"index.html#cuda-passthru-testers"
|
||||
],
|
||||
"cuda-passthru-tests": [
|
||||
"index.html#cuda-passthru-tests"
|
||||
],
|
||||
"cuda-specifying-what-devices-to-expose-to-the-container": [
|
||||
"index.html#cuda-specifying-what-devices-to-expose-to-the-container",
|
||||
"index.html#specifying-what-devices-to-expose-to-the-container"
|
||||
],
|
||||
"using-docker-compose": [
|
||||
"cuda-updating-redistributables": [
|
||||
"index.html#cuda-updating-redistributables",
|
||||
"index.html#updating-cuda-redistributables"
|
||||
],
|
||||
"cuda-updating-cutensor": [
|
||||
"index.html#cuda-updating-cutensor",
|
||||
"index.html#updating-cutensor"
|
||||
],
|
||||
"cuda-updating-supported-compilers-and-gpus": [
|
||||
"index.html#cuda-updating-supported-compilers-and-gpus",
|
||||
"index.html#updating-supported-compilers-and-gpus"
|
||||
],
|
||||
"cuda-updating-the-cuda-package-set": [
|
||||
"index.html#cuda-updating-the-cuda-package-set",
|
||||
"index.html#updating-the-cuda-package-set"
|
||||
],
|
||||
"cuda-updating-the-cuda-toolkit": [
|
||||
"index.html#cuda-updating-the-cuda-toolkit",
|
||||
"index.html#updating-the-cuda-toolkit"
|
||||
],
|
||||
"cuda-using-docker-compose": [
|
||||
"index.html#cuda-using-docker-compose",
|
||||
"index.html#using-docker-compose"
|
||||
],
|
||||
"cuda-writing-tests": [
|
||||
"index.html#cuda-writing-tests"
|
||||
],
|
||||
"cuelang": [
|
||||
"index.html#cuelang"
|
||||
],
|
||||
@@ -3027,7 +3047,7 @@
|
||||
"ex-buildGoModule": [
|
||||
"index.html#ex-buildGoModule"
|
||||
],
|
||||
"ssec-go-toolchain-versions" : [
|
||||
"ssec-go-toolchain-versions": [
|
||||
"index.html#ssec-go-toolchain-versions"
|
||||
],
|
||||
"buildGoModule-goModules-override": [
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
plymouth,
|
||||
pam,
|
||||
pkg-config,
|
||||
autoconf,
|
||||
automake,
|
||||
autoreconfHook,
|
||||
gettext,
|
||||
libtool,
|
||||
libxcb,
|
||||
glib,
|
||||
@@ -50,8 +50,8 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
autoreconfHook
|
||||
gettext
|
||||
yelp-tools
|
||||
yelp-xsl
|
||||
gobject-introspection
|
||||
@@ -88,6 +88,9 @@ stdenv.mkDerivation rec {
|
||||
(replaceVars ./fix-paths.patch {
|
||||
plymouth = "${plymouth}/bin/plymouth";
|
||||
})
|
||||
|
||||
# glib gettext is deprecated and broken, so use regular gettext instead
|
||||
./use-regular-gettext.patch
|
||||
];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6f2e706f..6307dd59 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -195,6 +195,8 @@ dnl Internationalization
|
||||
dnl ###########################################################################
|
||||
|
||||
IT_PROG_INTLTOOL(0.35.0)
|
||||
+AM_GNU_GETTEXT([external])
|
||||
+AM_GNU_GETTEXT_VERSION([0.21])
|
||||
AC_SUBST(GETTEXT_PACKAGE, lightdm)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", Gettext package)
|
||||
|
||||
@@ -726,6 +726,15 @@ stdenvNoCC.mkDerivation {
|
||||
echo "-isystem ${getDev libcxx}/include/c++/v1" >> $out/nix-support/libcxx-cxxflags
|
||||
echo "-stdlib=libc++" >> $out/nix-support/libcxx-ldflags
|
||||
''
|
||||
# GCC NG friendly libc++
|
||||
+ optionalString (libcxx != null && libcxx.isGNU or false) ''
|
||||
for dir in ${getDev libcxx}/include/c++/*; do
|
||||
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||
done
|
||||
for dir in ${getDev libcxx}/include/c++/*/${targetPlatform.config}; do
|
||||
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
|
||||
done
|
||||
''
|
||||
|
||||
##
|
||||
## Initial CFLAGS
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "abctl";
|
||||
version = "0.28.0";
|
||||
version = "0.29.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "airbytehq";
|
||||
repo = "abctl";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-h2QojJH9pvFUv64hJimUhknurp3pStEZbZYrgqkfH68=";
|
||||
hash = "sha256-tb0KBATOitgFN49gJVrctxPKjrFY7w6AdBa2AN+scBU=";
|
||||
};
|
||||
|
||||
checkFlags =
|
||||
@@ -33,7 +33,7 @@ buildGoModule rec {
|
||||
in
|
||||
[ "-skip=^${lib.concatStringsSep "$|^" skippedTests}$" ];
|
||||
|
||||
vendorHash = "sha256-CKku+zfU25LPQRuqsAQos3PX2bXUHEDQrD7sGeFnRKg=";
|
||||
vendorHash = "sha256-ZJbZDfVB6gxToinuUNLsjBEB+7+OgC19Cc2Q8Ej7kfo=";
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
|
||||
@@ -90,7 +90,6 @@ buildGoModule (finalAttrs: {
|
||||
maintainers = with lib.maintainers; [
|
||||
jk
|
||||
lrewega
|
||||
aaronjheng
|
||||
];
|
||||
mainProgram = "buf";
|
||||
};
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "chirpstack-udp-forwarder";
|
||||
version = "4.2.0";
|
||||
version = "4.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chirpstack";
|
||||
repo = "chirpstack-udp-forwarder";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-7xB85IOwOZ6cifw2TFWzNGNMPl8Pc9seqpSJdWdzStM=";
|
||||
hash = "sha256-BCflOG9v+tW5o0b/hZqlcg1BA+V/lpNzr3fJ9eg6qeY=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-ECq6Gfn52ZjS48h479XgTQnZHYSjnJK/T9j5NTlcxz4=";
|
||||
cargoHash = "sha256-2XTb9Wv61as7XhNMjJeryVq8nY835AxiONJjapdgCAw=";
|
||||
|
||||
nativeBuildInputs = [ protobuf ];
|
||||
|
||||
|
||||
9
pkgs/by-name/cl/claude-code/package-lock.json
generated
9
pkgs/by-name/cl/claude-code/package-lock.json
generated
@@ -6,14 +6,13 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@anthropic-ai/claude-code": "^1.0.48"
|
||||
"@anthropic-ai/claude-code": "^1.0.51"
|
||||
}
|
||||
},
|
||||
"node_modules/@anthropic-ai/claude-code": {
|
||||
"version": "1.0.48",
|
||||
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-1.0.48.tgz",
|
||||
"integrity": "sha512-h63VBAZZ6Pl/DlYW2PjbfUeicZ4r9VSl8dymD3d+1lZEHwCPgfMpu3g+30+FDMs79Xqc7qSDm6CRnMApxhbjqw==",
|
||||
"hasInstallScript": true,
|
||||
"version": "1.0.51",
|
||||
"resolved": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-1.0.51.tgz",
|
||||
"integrity": "sha512-annBc4ez7nDPbp+di6bjIQGiAdmdVln4k3gAYioym2MxOEl3py5s7SsoR+dNSmfgfIHUdKBTbtXnXD5rkmO5aA==",
|
||||
"license": "SEE LICENSE IN README.md",
|
||||
"bin": {
|
||||
"claude": "cli.js"
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "claude-code";
|
||||
version = "1.0.48";
|
||||
version = "1.0.51";
|
||||
|
||||
nodejs = nodejs_20; # required for sandboxed Nix builds on Darwin
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-${version}.tgz";
|
||||
hash = "sha256-nl7NGiREuFpbr0if273FfbSpjD/BG8a/uMXfYtiZgbE=";
|
||||
hash = "sha256-sAILRsi8ZViMfcpqykfnFQzHTJHRwRSZz45otMqa4U0=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-ppsyT+VXXaIP1ncuJx1I8M6eLTk7zP1KStf5nnWSwSo=";
|
||||
npmDepsHash = "sha256-r/Na3lU7YQ8W5PUuL5EfPu1a/Rz6hBLw/9XmSrKHD1o=";
|
||||
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} package-lock.json
|
||||
|
||||
@@ -34,11 +34,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru.updateScript = gitUpdater { rev-prefix = "ctrtool-v"; };
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.mit;
|
||||
meta = {
|
||||
license = lib.licenses.mit;
|
||||
description = "Tool to extract data from a 3ds rom";
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.marius851000 ];
|
||||
platforms = with lib.platforms; linux ++ darwin;
|
||||
maintainers = with lib.maintainers; [ marius851000 ];
|
||||
mainProgram = "ctrtool";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
lib,
|
||||
copyDesktopItems,
|
||||
electron_34,
|
||||
electron_37,
|
||||
fetchFromGitHub,
|
||||
deltachat-rpc-server,
|
||||
makeDesktopItem,
|
||||
@@ -19,36 +19,36 @@
|
||||
|
||||
let
|
||||
deltachat-rpc-server' = deltachat-rpc-server.overrideAttrs rec {
|
||||
version = "1.159.4";
|
||||
version = "1.159.5";
|
||||
src = fetchFromGitHub {
|
||||
owner = "chatmail";
|
||||
repo = "core";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-OLE3BoQNgpOHYuMUFBmk+raXimJGOsXySkfP+UTDk/8=";
|
||||
hash = "sha256-qooN7XRWFqR/bVPAQ8e7KOYNnBD9E70uAesaLUUeXXs=";
|
||||
};
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
pname = "deltachat-core-rust";
|
||||
inherit version src;
|
||||
hash = "sha256-+h93tSiKxnnNXPGk7elMQrcIuw3G/j2/gugqSbqOrDw=";
|
||||
hash = "sha256-TmizhgXMYX0hn4GnsL1QiSyMdahebh0QFbk/cOA48jg=";
|
||||
};
|
||||
};
|
||||
electron = electron_34;
|
||||
electron = electron_37;
|
||||
pnpm = pnpm_9;
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "deltachat-desktop";
|
||||
version = "1.58.2";
|
||||
version = "1.60.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "deltachat";
|
||||
repo = "deltachat-desktop";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-JYuYuv+OmAQzdw2AM0Qn0Z0+qq8G1JrW5jl2MI21x6M=";
|
||||
hash = "sha256-WrP4C4zebbRdxy08oQzR3vkO2IBUfsRPnkU1aWqolB4=";
|
||||
};
|
||||
|
||||
pnpmDeps = pnpm.fetchDeps {
|
||||
inherit (finalAttrs) pname version src;
|
||||
hash = "sha256-pW8SKplbXLQ5OWLOrG36aAnP/j0y9QaYGIg+Q2/Ulfk=";
|
||||
hash = "sha256-PBCmyNmlH88y5s7+8WHcei8SP3Q0lIAAnAQn9uaFxLc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs =
|
||||
|
||||
@@ -60,7 +60,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
changelog = "https://github.com/bootandy/dust/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
aaronjheng
|
||||
defelo
|
||||
];
|
||||
mainProgram = "dust";
|
||||
|
||||
@@ -36,7 +36,6 @@ buildGoModule (finalAttrs: {
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [
|
||||
nshalman
|
||||
aaronjheng
|
||||
];
|
||||
mainProgram = "jsonnet";
|
||||
};
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "harper";
|
||||
version = "0.47.0";
|
||||
version = "0.50.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Automattic";
|
||||
repo = "harper";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-kVZG3Vfe+PABhrXY26AUlBxrpiL9UtmIka84s0yvsXI=";
|
||||
hash = "sha256-vhaIDzjOG43+zxJU1BTPNPTmbDkLqFo0NRfvYcJSvSo=";
|
||||
};
|
||||
|
||||
buildAndTestSubdir = "harper-ls";
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-M6HdwQZanMxTvDdw0giycoSJmaMVfGI8Vg9NjdYJaak=";
|
||||
cargoHash = "sha256-6f8zJyz36Da7OvqWBE1w5IsRa8dNulSxLrQiTqjEbKo=";
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hydra";
|
||||
version = "0-unstable-2025-06-15";
|
||||
# nixpkgs-update: no auto update
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
let
|
||||
pname = "lmstudio";
|
||||
|
||||
version_aarch64-darwin = "0.3.17-11";
|
||||
hash_aarch64-darwin = "sha256-z3QkWwzYrHw3l8Qm+FfnrfdtfhdpkLo67XTE/t2ji5Y=";
|
||||
version_x86_64-linux = "0.3.17-11";
|
||||
hash_x86_64-linux = "sha256-CCsGkhh5OSAhyt2CHKIEIh5OzllRWxm6ERuGqQW/0JE=";
|
||||
version_aarch64-darwin = "0.3.18-3";
|
||||
hash_aarch64-darwin = "sha256-U720DYnywuqzZuYewzDSIqKoA5+AV7IsupmQwxOG84k=";
|
||||
version_x86_64-linux = "0.3.18-3";
|
||||
hash_x86_64-linux = "sha256-KnOu1fUcx1HIaijnq5K5jfALWXuU4PISPT2bF4xP9NA=";
|
||||
|
||||
meta = {
|
||||
description = "LM Studio is an easy to use desktop app for experimenting with local and open-source Large Language Models (LLMs)";
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "namespace-cli";
|
||||
version = "0.0.428";
|
||||
version = "0.0.429";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "namespacelabs";
|
||||
repo = "foundation";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-W2IUEr7jN6GN03Gm7dJY8hl558eaMNdp0j33i+d8Qqs=";
|
||||
hash = "sha256-O/GS//bEEkqg0Wu2I4pyEPB/lURtfMB0vjam7Uk/mNA=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-5cZy89dJbekxba7BTxKtJkicRPUsl4PyLiNZnG564U4=";
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "pgroll";
|
||||
version = "0.14.0";
|
||||
version = "0.14.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xataio";
|
||||
repo = "pgroll";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-8yrChHTNcj0Hphme5PuECkkxmppk16y8+NoC2yJ/B7Y=";
|
||||
hash = "sha256-5g9adfp0kJ/Qou7TnTb6Pu04u2LXPfUct8Xkkodf1S8=";
|
||||
};
|
||||
|
||||
proxyVendor = true;
|
||||
|
||||
@@ -15,29 +15,25 @@
|
||||
lua53Packages,
|
||||
perlPackages,
|
||||
gtk3,
|
||||
nix-update-script,
|
||||
wrapGAppsHook3,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rehex";
|
||||
version = "0.63.0";
|
||||
version = "0.63.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "solemnwarning";
|
||||
repo = "rehex";
|
||||
tag = version;
|
||||
hash = "sha256-wFVAytrcRu3Ezy/VcbmXwl+X96QMa5KimjUoP07hmFg=";
|
||||
hash = "sha256-de92lBnn0tp7Awm6PLJw12GfYohXY9m59XPmw7npvOg=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/solemnwarning/rehex/commit/0cfe145e034019952383ad28a431f552a5567f89.patch";
|
||||
hash = "sha256-PmqvjAXjqZM1BuqHHyQC5qXubTDYlE3VR1DiCCx3aeU=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
which
|
||||
wrapGAppsHook3
|
||||
zip
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns ];
|
||||
|
||||
@@ -71,6 +67,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Reverse Engineers' Hex Editor";
|
||||
longDescription = ''
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "tombi";
|
||||
version = "0.4.25";
|
||||
version = "0.4.30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tombi-toml";
|
||||
repo = "tombi";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-EVr4qybyLtGgNde0uuNoQYv2jugNGJups5HUcs7n4KI=";
|
||||
hash = "sha256-jRal4zwuP3kniS4vfS97sYKuXC+3I3kLMaBKbpa3ZUg=";
|
||||
};
|
||||
|
||||
# Tests relies on the presence of network
|
||||
doCheck = false;
|
||||
cargoBuildFlags = [ "--package tombi-cli" ];
|
||||
cargoHash = "sha256-vtaif74fYBCP0AAL1NFXxHJ/casZGwTJsmwZLiWqY64=";
|
||||
cargoHash = "sha256-JZlWYzKK6un1IMpHZ/o7SibLHROIitDpVgIRds3m5Ns=";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Cargo.toml \
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
}:
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "xdg-terminal-exec";
|
||||
version = "0.13.1";
|
||||
version = "0.13.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Vladimir-csp";
|
||||
repo = "xdg-terminal-exec";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-fZ9GSY0Wm6V86wxPmG7YQX882orpKyl9YBrDorxTemY=";
|
||||
hash = "sha256-W2g0cnJbgrEu/XPCz86Q7OIUBP4onu4nvbSQ7G43Ptg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ scdoc ];
|
||||
|
||||
@@ -1,59 +1,50 @@
|
||||
From 1eaf7ce77bb4eb73e5565ede220557c2ef0290b0 Mon Sep 17 00:00:00 2001
|
||||
From 46280d27a5c96b2efa7a61f49ee8dc14f7e10d0c Mon Sep 17 00:00:00 2001
|
||||
From: John Ericson <git@JohnEricson.me>
|
||||
Date: Sun, 22 Aug 2021 01:14:22 -0400
|
||||
Subject: [PATCH] Allow explicitly specifying the thread model for runtime libs
|
||||
Subject: [PATCH] Factor out thread model detection with `GCC_AC_THREAD_MODEL`
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Previously, they always scraped the thread mode from `$CC -v', now, that
|
||||
is the default but one may pass `--with-threads=MODEL` to be explicit
|
||||
instead.
|
||||
This macro deduplicates the
|
||||
|
||||
One use-case is bootstraping with a shorter critical path. The
|
||||
traditionally route was to build an entire "static stage" GCC, build
|
||||
libc, and then build GCC again supporting dynamic linking,
|
||||
multithreading, etc. But this is wasteful in that GCC itself is built
|
||||
twice.
|
||||
$CC -v 2>&1 | sed -n 's/^Thread model: //p'
|
||||
|
||||
With this change, rather than having to mess with spec files we can just
|
||||
configure the runtime libraries the way we want directly. In turn, that
|
||||
opens to just building libgcc twice rather than all of GCC.
|
||||
check that was occurring in various runtime libs.
|
||||
|
||||
Frankly, specs were always a rather indirect approach to coordinate this
|
||||
during GCC's bootstrap, since GCC itself really doesn't care what the
|
||||
threading model is, just that the runtime libraries agree among
|
||||
themselves. Relying on a hard-coded spec for this also keeps us one step
|
||||
further from the long-term goal of multi-target GCC, for what it's
|
||||
worth.
|
||||
Additionally, as a bit of an Easter egg, this also allows overriding
|
||||
what the compiler would return by setting the
|
||||
`gcc_cv_target_thread_file` cache variable first. I admit that it is in
|
||||
fact this Easter egg that led me to write the patch. The use-case for it
|
||||
is for making multilib builds where the library sets do not all share
|
||||
the same thread model easier. See also `THREAD_MODEL_SPEC` for more
|
||||
about the varying thread models use-case.
|
||||
|
||||
For the record, "single stage" builds of GCC have some precedent in
|
||||
downstream packaging, for example with [1]. That one, as far as I can
|
||||
tell, builds libgcc once, but with the headers of the libc
|
||||
implementation provided and then cyclic linking down later. They are
|
||||
both fine approaches, but I don't think one should have to be forced
|
||||
into cyclic dependencies if they don't want to. That opens the door to
|
||||
non-terminating programs due to, e.g., atomics used in a threads
|
||||
implementation being lowered to threads absent hardware support.
|
||||
Arguably one could could try to define on `THREAD_MODEL_SPEC` on more
|
||||
platforms (besides e.g. AIX) but the ramifications of this are a bit
|
||||
unclear. Setting `gcc_cv_target_thread_file` directly is a "low tech"
|
||||
solution that will work for now for sure. Of course, since setting a
|
||||
cache variable like this a hacky trick, I will not expect this to be at
|
||||
all stable/guaranteed to work, going forward.
|
||||
|
||||
Finally, I understand that such custom bootstrapping is not officially
|
||||
supported. I don't mean to imply it should be --- a lot more cleanup
|
||||
work to the build system would be necessary before supporting it
|
||||
wouldn't be a huge additional maintainer burden --- I just hope to add a
|
||||
reasonable knob for those comfortable with doing unsupported things
|
||||
already.
|
||||
Thanks to Arsen who on IRC discussed these things with me, including in
|
||||
particular making it a cache var not `--with-model` flag, to not
|
||||
prematurely foster expectations that this is stable.
|
||||
|
||||
[1]: https://github.com/richfelker/musl-cross-make
|
||||
Suggested-by: Arsen Arsenović <arsen@aarsen.me>
|
||||
---
|
||||
config/gthr.m4 | 32 ++++++++++++++++++++++++++++++++
|
||||
config/gthr.m4 | 23 +++++++++++++++++++++++
|
||||
libatomic/configure.ac | 4 +---
|
||||
libgcc/configure.ac | 4 +---
|
||||
libphobos/m4/druntime/os.m4 | 2 +-
|
||||
libstdc++-v3/acinclude.m4 | 8 +++-----
|
||||
5 files changed, 38 insertions(+), 12 deletions(-)
|
||||
5 files changed, 29 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/config/gthr.m4 b/config/gthr.m4
|
||||
index 11996247f15..7aed5d3df0d 100644
|
||||
index 11996247f15..e8fac4a5721 100644
|
||||
--- a/config/gthr.m4
|
||||
+++ b/config/gthr.m4
|
||||
@@ -5,6 +5,35 @@ dnl Public License, this file may be distributed as part of a program
|
||||
@@ -5,6 +5,26 @@ dnl Public License, this file may be distributed as part of a program
|
||||
dnl that contains a configuration script generated by Autoconf, under
|
||||
dnl the same distribution terms as the rest of that program.
|
||||
|
||||
@@ -62,34 +53,25 @@ index 11996247f15..7aed5d3df0d 100644
|
||||
+dnl usage: GCC_AC_THREAD_MODEL
|
||||
+AC_DEFUN([GCC_AC_THREAD_MODEL],
|
||||
+[
|
||||
+# With threads
|
||||
+# Specify the threading model for this GCC runtime library
|
||||
+# Pass with no value to take from compiler's metadata
|
||||
+# Pass with a value to specify a thread package
|
||||
+# 'single' means single threaded -- without threads.
|
||||
+AC_ARG_WITH(threads,
|
||||
+[AS_HELP_STRING([[--with-threads=MODEL]],
|
||||
+ [specify thread model for this GCC
|
||||
+ runtime library])],,
|
||||
+[with_threads=''])
|
||||
+
|
||||
+if test x"$with_threads" = x'yes'; then
|
||||
+ AC_MSG_ERROR([Cannot pass bare --with-threads, must pass explicit --with-threads=MODEL])
|
||||
+elif test x"$with_threads" = x'no'; then
|
||||
+ target_thread_file=single
|
||||
+elif test x"$with_threads" = x''; then
|
||||
+ AC_MSG_CHECKING([for thread model used by GCC])
|
||||
+ target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
|
||||
+ AC_MSG_RESULT([$target_thread_file])
|
||||
+else
|
||||
+ target_thread_file=$with_threads
|
||||
+fi
|
||||
+AC_CACHE_CHECK([for the threading model used by GCC], [gcc_cv_target_thread_file], [
|
||||
+ # Set new cache variable
|
||||
+ gcc_cv_target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
|
||||
+])
|
||||
+# Set variable name (not prefixed enough to be a good cache variable
|
||||
+# name) traditionally used for this purpose, to avoid having to change
|
||||
+# a bunch of configure scripts.
|
||||
+target_thread_file="$gcc_cv_target_thread_file"
|
||||
+])
|
||||
+
|
||||
+
|
||||
dnl Define header location by thread model
|
||||
|
||||
dnl usage: GCC_AC_THREAD_HEADER([thread_model])
|
||||
@@ -23,6 +52,9 @@ case $1 in
|
||||
@@ -23,6 +43,9 @@ case $1 in
|
||||
vxworks) thread_header=config/gthr-vxworks.h ;;
|
||||
win32) thread_header=config/i386/gthr-win32.h ;;
|
||||
mcf) thread_header=config/i386/gthr-mcf.h ;;
|
||||
@@ -100,7 +82,7 @@ index 11996247f15..7aed5d3df0d 100644
|
||||
AC_SUBST(thread_header)
|
||||
])
|
||||
diff --git a/libatomic/configure.ac b/libatomic/configure.ac
|
||||
index 85824fa7614..691f4948f6c 100644
|
||||
index aafae71028d..a1aa3bdf69f 100644
|
||||
--- a/libatomic/configure.ac
|
||||
+++ b/libatomic/configure.ac
|
||||
@@ -162,9 +162,7 @@ libtool_VERSION=3:0:2
|
||||
@@ -115,7 +97,7 @@ index 85824fa7614..691f4948f6c 100644
|
||||
case "$target" in
|
||||
*aarch64*)
|
||||
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
|
||||
index 4e8c036990f..acf54e24c79 100644
|
||||
index 85e4f1bc48b..d44493f9653 100644
|
||||
--- a/libgcc/configure.ac
|
||||
+++ b/libgcc/configure.ac
|
||||
@@ -305,9 +305,7 @@ AC_SUBST([use_tm_clone_registry])
|
||||
@@ -130,7 +112,7 @@ index 4e8c036990f..acf54e24c79 100644
|
||||
# Check for assembler CFI support.
|
||||
AC_CACHE_CHECK([whether assembler supports CFI directives], [libgcc_cv_cfi],
|
||||
diff --git a/libphobos/m4/druntime/os.m4 b/libphobos/m4/druntime/os.m4
|
||||
index 15cde3b04b8..28bd4d3d2bd 100644
|
||||
index ef8ca434407..7bb91362dbe 100644
|
||||
--- a/libphobos/m4/druntime/os.m4
|
||||
+++ b/libphobos/m4/druntime/os.m4
|
||||
@@ -32,7 +32,7 @@ case $1 in
|
||||
@@ -143,10 +125,10 @@ index 15cde3b04b8..28bd4d3d2bd 100644
|
||||
AC_SUBST(DCFG_THREAD_MODEL)
|
||||
])
|
||||
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
|
||||
index 51a08bcc8b1..71697f59d6d 100644
|
||||
index a0094c2dd95..66fc3abe4fd 100644
|
||||
--- a/libstdc++-v3/acinclude.m4
|
||||
+++ b/libstdc++-v3/acinclude.m4
|
||||
@@ -4342,9 +4342,7 @@ dnl Substs:
|
||||
@@ -4345,9 +4345,7 @@ dnl Substs:
|
||||
dnl thread_header
|
||||
dnl
|
||||
AC_DEFUN([GLIBCXX_ENABLE_THREADS], [
|
||||
@@ -157,7 +139,7 @@ index 51a08bcc8b1..71697f59d6d 100644
|
||||
GCC_AC_THREAD_HEADER([$target_thread_file])
|
||||
])
|
||||
|
||||
@@ -4354,7 +4352,8 @@ dnl Check if gthread implementation defines the types and functions
|
||||
@@ -4357,7 +4355,8 @@ dnl Check if gthread implementation defines the types and functions
|
||||
dnl required by the c++0x thread library. Conforming gthread
|
||||
dnl implementations can define __GTHREADS_CXX0X to enable use with c++0x.
|
||||
dnl
|
||||
@@ -167,7 +149,7 @@ index 51a08bcc8b1..71697f59d6d 100644
|
||||
dnl
|
||||
AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [
|
||||
GLIBCXX_ENABLE(libstdcxx-threads,auto,,[enable C++11 threads support])
|
||||
@@ -4369,7 +4368,6 @@ AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [
|
||||
@@ -4372,7 +4371,6 @@ AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions \
|
||||
-I${toplevel_srcdir}/libgcc -I${toplevel_builddir}/libgcc"
|
||||
|
||||
@@ -176,5 +158,5 @@ index 51a08bcc8b1..71697f59d6d 100644
|
||||
posix)
|
||||
CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
|
||||
--
|
||||
2.44.1
|
||||
2.47.2
|
||||
|
||||
|
||||
@@ -121,6 +121,21 @@ makeScopeWithSplicing' {
|
||||
};
|
||||
|
||||
gfortran = wrapCCWith rec {
|
||||
cc = gccPackages.gfortran-unwrapped;
|
||||
libcxx = targetGccPackages.libstdcxx;
|
||||
bintools = binutils;
|
||||
extraPackages = [
|
||||
targetGccPackages.libgcc
|
||||
];
|
||||
nixSupport.cc-cflags = [
|
||||
"-B${targetGccPackages.libgcc}/lib"
|
||||
"-B${targetGccPackages.libssp}/lib"
|
||||
"-B${targetGccPackages.libatomic}/lib"
|
||||
"-B${targetGccPackages.libgfortran}/lib/"
|
||||
];
|
||||
};
|
||||
|
||||
gfortranNoLibgfortran = wrapCCWith rec {
|
||||
cc = gccPackages.gfortran-unwrapped;
|
||||
libcxx = targetGccPackages.libstdcxx;
|
||||
bintools = binutils;
|
||||
@@ -211,7 +226,7 @@ makeScopeWithSplicing' {
|
||||
|
||||
libgfortran = callPackage ./libgfortran {
|
||||
stdenv = overrideCC stdenv buildGccPackages.gcc;
|
||||
inherit (buildGccPackages) gfortran;
|
||||
gfortran = buildGccPackages.gfortranNoLibgfortran;
|
||||
};
|
||||
|
||||
libstdcxx = callPackage ./libstdcxx {
|
||||
|
||||
@@ -51,21 +51,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Submitted:
|
||||
# - https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577639.html
|
||||
# - https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577640.html
|
||||
# - https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577638.html
|
||||
#
|
||||
# In Git: https://github.com/Ericson2314/gcc/tree/prog-target-15
|
||||
(getVersionFile "gcc/0001-find_a_program-First-search-with-machine-prefix.patch")
|
||||
(getVersionFile "gcc/0002-driver-for_each_pass-Pass-to-callback-whether-dir-is.patch")
|
||||
(getVersionFile "gcc/0003-find_a_program-Only-search-for-prefixed-paths-in-und.patch")
|
||||
|
||||
# Submitted: https://inbox.sourceware.org/gcc-patches/20210818203840.1550133-1-John.Ericson@Obsidian.Systems/T/#t
|
||||
# In Git: https://github.com/Ericson2314/gcc/tree/libgcc-custom-threading-model-15
|
||||
(getVersionFile "gcc/custom-threading-model.patch")
|
||||
|
||||
# TODO: fix up and send to upstream
|
||||
(getVersionFile "gcc/fix-collect2-paths.diff")
|
||||
];
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
configureFlags = [
|
||||
"--disable-dependency-tracking"
|
||||
"--with-threads=single"
|
||||
"gcc_cv_target_thread_file=single"
|
||||
# $CC cannot link binaries, let alone run then
|
||||
"cross_compiling=true"
|
||||
# Do not have dynamic linker without libc
|
||||
|
||||
@@ -158,7 +158,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
configureFlags = [
|
||||
"--disable-dependency-tracking"
|
||||
"--with-threads=single"
|
||||
"gcc_cv_target_thread_file=single"
|
||||
# $CC cannot link binaries, let alone run then
|
||||
"cross_compiling=true"
|
||||
];
|
||||
|
||||
@@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
configureFlags = [
|
||||
"--disable-dependency-tracking"
|
||||
"--with-toolexeclibdir=${builtins.placeholder "out"}/lib"
|
||||
"--with-threads=posix"
|
||||
"gcc_cv_target_thread_file=posix"
|
||||
"cross_compiling=true"
|
||||
"--disable-multilib"
|
||||
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
{
|
||||
# TODO: fix up and send to upstream
|
||||
"gcc/fix-collect2-paths.diff" = [
|
||||
{
|
||||
after = "15";
|
||||
path = ../15;
|
||||
}
|
||||
];
|
||||
|
||||
# Submitted (001--003):
|
||||
# - https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577639.html
|
||||
# - https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577640.html
|
||||
# - https://gcc.gnu.org/pipermail/gcc-patches/2021-August/577638.html
|
||||
#
|
||||
# In Git: https://github.com/Ericson2314/gcc/tree/prog-target-15
|
||||
"gcc/0001-find_a_program-First-search-with-machine-prefix.patch" = [
|
||||
{
|
||||
after = "15";
|
||||
@@ -23,6 +31,9 @@
|
||||
path = ../15;
|
||||
}
|
||||
];
|
||||
|
||||
# Submitted: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689429.html
|
||||
# In Git: https://github.com/Ericson2314/gcc/tree/libgcc-custom-threading-model-15
|
||||
"gcc/custom-threading-model.patch" = [
|
||||
{
|
||||
after = "15";
|
||||
|
||||
@@ -27,8 +27,10 @@
|
||||
# At least one back-end has to be enabled,
|
||||
# and we can't default to CUDA since it's unfree
|
||||
rocmSupport ? !cudaSupport,
|
||||
runCommand,
|
||||
static ? stdenv.hostPlatform.isStatic,
|
||||
stdenv,
|
||||
writeShellApplication,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -104,7 +106,7 @@ in
|
||||
|
||||
assert (builtins.match "[^[:space:]]*" gpuTargetString) != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "magma";
|
||||
inherit version;
|
||||
|
||||
@@ -241,6 +243,143 @@ stdenv.mkDerivation {
|
||||
passthru = {
|
||||
inherit cudaSupport rocmSupport gpuTargets;
|
||||
cudaPackages = effectiveCudaPackages;
|
||||
testers = {
|
||||
all =
|
||||
let
|
||||
magma = finalAttrs.finalPackage;
|
||||
in
|
||||
writeShellApplication {
|
||||
derivationArgs = {
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
};
|
||||
name = "magma-testers-all";
|
||||
text = ''
|
||||
logWithDate() {
|
||||
printf "%s: %s\n" "$(date --utc --iso-8601=seconds)" "$*"
|
||||
}
|
||||
|
||||
isIgnoredTest() {
|
||||
case $1 in
|
||||
# Skip the python scripts
|
||||
*.py) return 0 ;;
|
||||
|
||||
# These test require files, so we skip them
|
||||
testing_?io) ;&
|
||||
testing_?madd) ;&
|
||||
testing_?matrix) ;&
|
||||
testing_?matrixcapcup) ;&
|
||||
testing_?matrixinfo) ;&
|
||||
testing_?mcompressor) ;&
|
||||
testing_?mconverter) ;&
|
||||
testing_?preconditioner) ;&
|
||||
testing_?solver) ;&
|
||||
testing_?solver_rhs) ;&
|
||||
testing_?solver_rhs_scaling) ;&
|
||||
testing_?sort) ;&
|
||||
testing_?spmm) ;&
|
||||
testing_?spmv) ;&
|
||||
testing_?spmv_check) ;&
|
||||
testing_?sptrsv) ;&
|
||||
testing_dsspmv_mixed) ;&
|
||||
testing_zcspmv_mixed)
|
||||
logWithDate "skipping $1 because it requires input"
|
||||
return 0
|
||||
;;
|
||||
|
||||
# These test require outputing to files, so we skip them
|
||||
testing_?print)
|
||||
logWithDate "skipping $1 because it requires creating output"
|
||||
return 0
|
||||
;;
|
||||
|
||||
# These test succeed but exit with a non-zero code
|
||||
testing_[cdz]gglse) ;&
|
||||
testing_sgemm_fp16)
|
||||
logWithDate "skipping $1 because has a non-zero exit code"
|
||||
return 0
|
||||
;;
|
||||
|
||||
# These test have memory freeing/allocation errors:
|
||||
testing_?mdotc)
|
||||
logWithDate "skipping $1 because it fails to allocate or free memory"
|
||||
return 0
|
||||
;;
|
||||
|
||||
# Test is not ignored otherwise.
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
runTests() {
|
||||
local -nr outputArray="$1"
|
||||
local -i programExitCode=0
|
||||
local file
|
||||
|
||||
# TODO: Collect and sort filenames prior to iterating so the order isn't dependent on the filesystem.
|
||||
for file in "${magma.test}"/bin/*; do
|
||||
if isIgnoredTest "$(basename "$file")"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
logWithDate "Starting $file"
|
||||
|
||||
# Since errexit is set, we need to reset programExitCode every iteration and use an OR
|
||||
# to set it only when the test fails (which should not fail, avoiding tripping errexit).
|
||||
programExitCode=0
|
||||
|
||||
# A number of test cases require an input <=128, so we set the range to include [128, 1024].
|
||||
# Batch is kept small to keep tests fast.
|
||||
"$file" --range 128:1024:896 --batch 32 || programExitCode=$?
|
||||
|
||||
logWithDate "Finished $file with exit code $programExitCode"
|
||||
|
||||
if ((programExitCode)); then
|
||||
outputArray+=("$file")
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
main() {
|
||||
local -a failedPrograms=()
|
||||
runTests failedPrograms
|
||||
|
||||
if ((''${#failedPrograms[@]})); then
|
||||
logWithDate "The following programs had non-zero exit codes:"
|
||||
for file in "''${failedPrograms[@]}"; do
|
||||
# Using echo to avoid printing the date
|
||||
echo "- $file"
|
||||
done
|
||||
logWithDate "Exiting with code 1 because at least one test failed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
logWithDate "All tests passed!"
|
||||
exit 0
|
||||
}
|
||||
|
||||
main
|
||||
'';
|
||||
runtimeInputs = [ magma.test ];
|
||||
};
|
||||
};
|
||||
tests = {
|
||||
all =
|
||||
runCommand "magma-tests-all"
|
||||
{
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [ finalAttrs.passthru.testers.all ];
|
||||
requiredSystemFeatures = lib.optionals cudaSupport [ "cuda" ];
|
||||
}
|
||||
''
|
||||
if magma-testers-all; then
|
||||
touch "$out"
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
@@ -260,4 +399,4 @@ stdenv.mkDerivation {
|
||||
|| (cudaSupport && strings.versionOlder version "2.7.1" && cudaPackages_11 == null)
|
||||
|| (rocmSupport && strings.versionOlder version "2.8.0");
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "xsdata";
|
||||
version = "25.4";
|
||||
version = "25.7";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tefra";
|
||||
repo = "xsdata";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-2sHHDFv2p+O5ru9ajnmbk6ULm40h0hMyYiIAFh3PC8I=";
|
||||
hash = "sha256-npwJlyUYjoYzvwaZZK4PIqhJmTeYGDDfc4T4/ODcx4c=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
@@ -84,7 +84,7 @@ buildPythonPackage rec {
|
||||
description = "Naive XML & JSON bindings for Python";
|
||||
mainProgram = "xsdata";
|
||||
homepage = "https://github.com/tefra/xsdata";
|
||||
changelog = "https://github.com/tefra/xsdata/blob/${src.rev}/CHANGES.md";
|
||||
changelog = "https://github.com/tefra/xsdata/blob/${src.tag}/CHANGES.md";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user