Skip to content

Commit

Permalink
Merge staging-next into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 31, 2023
2 parents 351c8e7 + cfbf9d7 commit 75a4bcc
Show file tree
Hide file tree
Showing 63 changed files with 15,222 additions and 508 deletions.
62 changes: 62 additions & 0 deletions doc/languages-frameworks/cuda.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,65 @@ 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. Copy the `redistrib_*.json` corresponding to the release to `pkgs/development/compilers/cudatoolkit/redist/manifests`.
3. Generate the `redistrib_features_*.json` file by running:

```bash
nix run github:ConnorBaker/cuda-redist-find-features -- <path to manifest>
```

That command will generate the `redistrib_features_*.json` file in the same directory as the manifest.

4. Include the path to the new manifest in `pkgs/development/compilers/cudatoolkit/redist/extension.nix`.

### 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/compilers/cudatoolkit/versions.toml` 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/compilers/cudatoolkit/redist/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 [`cudaPackages.autoAddOpenGLRunpath`](https://search.nixos.org/packages?channel=unstable&type=packages&query=cudaPackages.autoAddOpenGLRunpath). 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.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6318,6 +6318,12 @@
githubId = 1447245;
name = "Robin Gloster";
};
gmemstr = {
email = "[email protected]";
github = "gmemstr";
githubId = 1878840;
name = "Gabriel Simmer";
};
gnxlxnxx = {
email = "[email protected]";
github = "gnxlxnxx";
Expand Down
6 changes: 3 additions & 3 deletions nixos/modules/services/security/kanidm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ in
default = { };
description = lib.mdDoc ''
Settings for Kanidm, see
[the documentation](https://github.com/kanidm/kanidm/blob/master/kanidm_book/src/server_configuration.md)
[the documentation](https://kanidm.github.io/kanidm/stable/server_configuration.html)
and [example configuration](https://github.com/kanidm/kanidm/blob/master/examples/server.toml)
for possible values.
'';
Expand All @@ -155,7 +155,7 @@ in
};
description = lib.mdDoc ''
Configure Kanidm clients, needed for the PAM daemon. See
[the documentation](https://github.com/kanidm/kanidm/blob/master/kanidm_book/src/client_tools.md#kanidm-configuration)
[the documentation](https://kanidm.github.io/kanidm/stable/client_tools.html#kanidm-configuration)
and [example configuration](https://github.com/kanidm/kanidm/blob/master/examples/config)
for possible values.
'';
Expand All @@ -173,7 +173,7 @@ in
};
description = lib.mdDoc ''
Configure Kanidm unix daemon.
See [the documentation](https://github.com/kanidm/kanidm/blob/master/kanidm_book/src/pam_and_nsswitch.md#the-unix-daemon)
See [the documentation](https://kanidm.github.io/kanidm/stable/integrations/pam_and_nsswitch.html#the-unix-daemon)
and [example configuration](https://github.com/kanidm/kanidm/blob/master/examples/unixd)
for possible values.
'';
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/editors/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ lib.makeScope pkgs.newScope (self:
inherit gconf;

inherit (pkgs.darwin) sigtool;
inherit (pkgs.darwin.apple_sdk.frameworks)
AppKit Carbon Cocoa GSS ImageCaptureCore ImageIO IOKit OSAKit Quartz
QuartzCore WebKit;
inherit (pkgs.darwin.apple_sdk_11_0.frameworks)
Accelerate AppKit Carbon Cocoa GSS ImageCaptureCore ImageIO IOKit OSAKit
Quartz QuartzCore UniformTypeIdentifiers WebKit;
};
in {
sources = import ./sources.nix {
Expand Down
13 changes: 11 additions & 2 deletions pkgs/applications/editors/emacs/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
, libtiff
, libwebp
, libxml2
, llvmPackages_6
, llvmPackages_14
, m17n_lib
, makeWrapper
, motif
Expand Down Expand Up @@ -99,6 +99,7 @@
else "lucid")

# macOS dependencies for NS and macPort
, Accelerate
, AppKit
, Carbon
, Cocoa
Expand All @@ -109,6 +110,7 @@
, OSAKit
, Quartz
, QuartzCore
, UniformTypeIdentifiers
, WebKit
}:

Expand All @@ -135,7 +137,7 @@ let
];

inherit (if variant == "macport"
then llvmPackages_6.stdenv
then llvmPackages_14.stdenv
else stdenv) mkDerivation;
in
mkDerivation (finalAttrs: (lib.optionalAttrs withNativeCompilation {
Expand Down Expand Up @@ -287,13 +289,15 @@ mkDerivation (finalAttrs: (lib.optionalAttrs withNativeCompilation {
GSS
ImageIO
] ++ lib.optionals (variant == "macport") [
Accelerate
AppKit
Carbon
Cocoa
IOKit
OSAKit
Quartz
QuartzCore
UniformTypeIdentifiers
WebKit
# TODO are these optional?
GSS
Expand Down Expand Up @@ -337,6 +341,11 @@ mkDerivation (finalAttrs: (lib.optionalAttrs withNativeCompilation {
++ lib.optional withXwidgets "--with-xwidgets"
;

# Fixes intermittent segfaults when compiled with LLVM >= 7.0.
# See https://github.com/NixOS/nixpkgs/issues/127902
env.NIX_CFLAGS_COMPILE = lib.optionalString (variant == "macport")
"-include ${./macport_noescape_noop.h}";

enableParallelBuilding = true;

installTargets = [ "tags" "install" ];
Expand Down
31 changes: 31 additions & 0 deletions pkgs/applications/editors/emacs/macport_noescape_noop.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef NOESCAPE_NOOP_H_
#define NOESCAPE_NOOP_H_

// First, do some work to get definitions for *_WIDTH. Normally, Emacs would
// have these defined by headers in-tree, but clang's headers clash with those.
// Due to how include paths work, we have to include clang headers if we want to
// mess with CoreFoundation definitions.
#pragma push_macro("__STDC_VERSION__")
// Make the preprocessor think that we're on C2x. The macros we want are gated
// on it.
#undef __STDC_VERSION__
#define __STDC_VERSION__ 202000L
// Include limits.h first, as stdint.h includes it.
#include <limits.h>

// XX: clang's stdint.h is shy and won't give us its defs unless it thinks it's
// in freestanding mode.
#undef __STDC_HOSTED__
#include <stdint.h>
#define __STDC_HOSTED__ 1

#pragma pop_macro("__STDC_VERSION__")

// Now, pull in the header that defines CF_NOESCAPE.
#include <CoreFoundation/CFBase.h>

// Redefine CF_NOESCAPE as empty.
#undef CF_NOESCAPE
#define CF_NOESCAPE

#endif // NOESCAPE_NOOP_H_
4 changes: 2 additions & 2 deletions pkgs/applications/emulators/openmsx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

stdenv.mkDerivation (finalAttrs: {
pname = "openmsx";
version = "19.0";
version = "19.1";

src = fetchFromGitHub {
owner = "openMSX";
repo = "openMSX";
rev = "RELEASE_${builtins.replaceStrings ["."] ["_"] finalAttrs.version}";
sha256 = "sha256-NR0+vOUkbyuVWdHLmKEewDDmR1ibi3dtbSq+6RaxrGo=";
sha256 = "sha256-5ULljLmEDGFp32rnrXKLfL6P3ad2STJUNngBuWlRCbc=";
fetchSubmodules = true;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

mkDerivation rec {
pname = "corekeyboard";
version = "4.4.0";
version = "4.5.0";

src = fetchFromGitLab {
owner = "cubocore/coreapps";
repo = pname;
rev = "v${version}";
sha256 = "sha256-zOH/w4QroMaVjWnFuWAJQ11RYlpXwIXRG9QYGDkfLVY=";
sha256 = "sha256-Hylz1x9Wsk0iVhpNBFZJChsl3gIvJDICgpITjIXDZAg=";
};

nativeBuildInputs = [
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/misc/valent/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

stdenv.mkDerivation rec {
pname = "valent";
version = "unstable-2023-07-31";
version = "unstable-2023-08-26";

src = fetchFromGitHub {
owner = "andyholmes";
repo = "valent";
rev = "698f39b496957d50c68437f16e74a7ac41eb5147";
rev = "89d1e5a0312a0371bfcd9a95486805917c3729c0";
fetchSubmodules = true;
hash = "sha256-AdW6oMRVIgat8XlH342PEwe6BfkzKVLSadGOTLGwzwo=";
hash = "sha256-28l+SkjVQkOA/5f5nT5BbqIV2BrMLmSK/YtDGYl1xjQ=";
};

nativeBuildInputs = [
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/cluster/werf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@

buildGoModule rec {
pname = "werf";
version = "1.2.252";
version = "1.2.253";

src = fetchFromGitHub {
owner = "werf";
repo = "werf";
rev = "v${version}";
hash = "sha256-dKbdEkC0+HFRWsOIteNDlKc1FHB24ECWyOqrVW9MITY=";
hash = "sha256-cHMMLV2NdYueL3qV0wpB4n0+2XZTvg4mfKTSgGZHqqY=";
};

vendorHash = "sha256-0PQDMncERGrPI5sSx76jE7MAz49CYvSORMa/Gc19agA=";
vendorHash = "sha256-vuEqimNRWQGwybzOkGVoevpyVpU8XyXqhAIa7I66ajs=";

proxyVendor = true;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ branch ? "stable", callPackage, fetchurl, lib, stdenv }:
let
versions = if stdenv.isLinux then {
stable = "0.0.28";
stable = "0.0.29";
ptb = "0.0.45";
canary = "0.0.166";
development = "0.0.217";
Expand All @@ -16,7 +16,7 @@ let
x86_64-linux = {
stable = fetchurl {
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
sha256 = "sha256-JwxVVm/QIBLoVyQ2Ff/MX06UNgZ+dAsD960GsCg1M+U=";
sha256 = "sha256-3vjOvkqMD7qKX2zRUbKrw5gHtE/v8WfH557rtagWIWc=";
};
ptb = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/remote/xrdp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ let
};

xrdp = stdenv.mkDerivation rec {
version = "0.9.22.1";
version = "0.9.23";
pname = "xrdp";

src = fetchFromGitHub {
owner = "neutrinolabs";
repo = "xrdp";
rev = "v${version}";
fetchSubmodules = true;
hash = "sha256-8gAP4wOqSmar8JhKRt4qRRwh23coIn0Q8Tt9ClHQSt8=";
hash = "sha256-14qsRfLn+26rm+vyMmOtaBEs8mWfSTIsIVseSC2FjXc=";
};

nativeBuildInputs = [ pkg-config autoconf automake which libtool nasm perl ];
Expand Down
Loading

0 comments on commit 75a4bcc

Please sign in to comment.