Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f71b91f4ebc9
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a838caa33a78
Choose a head ref
  • 13 commits
  • 11 files changed
  • 8 contributors

Commits on Jul 17, 2020

  1. nixos/manual: add a section about enabling OpenCL for AMD GPUs

    - Begin a new chapter "GPU Acceleration", this should also cover
      VA-API, OpenGL, Vulkan, etc.
    - Add a general blurb about OpenCL and how to check whether OpenCL
      devices are found.
    - Add a section about enabling OpenCL for AMD GPUs specifically.
    danieldk committed Jul 17, 2020
    Copy the full SHA
    45edd3b View commit details
  2. spacebar: 0.5.0 -> 1.1.0

    Also update owner, description, & homepage
    cmacrae committed Jul 17, 2020
    Copy the full SHA
    8bc2e52 View commit details
  3. nomacs: 3.14.2 -> 3.15.1616

    r-ryantm committed Jul 17, 2020
    Copy the full SHA
    f243f7a View commit details

Commits on Jul 18, 2020

  1. nixos/docker: explicitly load kernel modules

    This is analogous to #70447.
    
    With security.lockKernelModules=true, docker commands result in the following
    error without at least loading veth:
    
    $ docker run hello-world
    /nix/store/mr50kaan2vs4gc40ymwncb2vci25aq7z-docker-19.03.2/libexec/docker/docker: Error response from daemon: failed to create endpoint epic_kare on network bridge: failed to add the host (veth8b381f3) <=> sandbox (veth348e197) pair interfaces: operation not supported.
    ERRO[0003] error waiting for container: context canceled
    ryneeverett committed Jul 18, 2020
    Copy the full SHA
    f12581a View commit details
  2. Copy the full SHA
    6d00504 View commit details
  3. Merge pull request #93359 from r-ryantm/auto-update/nomacs

    nomacs: 3.14.2 -> 3.15.1616
    danieldk authored Jul 18, 2020
    Copy the full SHA
    26a0141 View commit details
  4. Merge pull request #93290 from danieldk/manual-opencl-amd

    nixos/manual: add a section about enabling OpenCL for AMD GPUs
    danieldk authored Jul 18, 2020
    Copy the full SHA
    cace440 View commit details
  5. Merge pull request #93130 from cmacrae/spacebar/move_owner

    spacebar: 0.5.0 -> 1.1.0
    dywedir authored Jul 18, 2020
    Copy the full SHA
    effb57d View commit details
  6. Copy the full SHA
    0f19b9b View commit details
  7. Merge pull request #93394 from NixOS/revert-89017-package-grouping

    Revert "Group packages by language/builder via dummy maintainer"
    zowoq authored Jul 18, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ttuegel Thomas Tuegel
    Copy the full SHA
    f138879 View commit details
  8. Merge pull request #93388 from danieldk/more-local-rocr-ext-dir

    rocm-runtime: make ROCR_EXT_DIR handling more local
    danieldk authored Jul 18, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ttuegel Thomas Tuegel
    Copy the full SHA
    ae33b7d View commit details
  9. Verified

    This commit was signed with the committer’s verified signature.
    ttuegel Thomas Tuegel
    Copy the full SHA
    eb66a32 View commit details
  10. tdm: Fix the build

    Was failing in the desktop-file validation stage [0]:
    /nix/store/XXX-tdm.desktop/share/applications/tdm.desktop: error: value
    "False" for boolean key "Terminal" in group "Desktop Entry" contains
    invalid characters, boolean values must be "false" or "true"
    
    [0]: https://hydra.nixos.org/build/123852137
    primeos committed Jul 18, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    ttuegel Thomas Tuegel
    Copy the full SHA
    a838caa View commit details
8 changes: 0 additions & 8 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -5832,14 +5832,6 @@
githubId = 16385648;
name = "Niko Pavlinek";
};
nixpkgs-go = {
email = "go@nixpkgs";
name = "Nixpkgs Go Packages";
};
nixpkgs-rust = {
email = "rust@nixpkgs";
name = "Nixpkgs Rust Packages";
};
nixy = {
email = "nixy@nixy.moe";
github = "nixy";
1 change: 1 addition & 0 deletions nixos/doc/manual/configuration/configuration.xml
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
<xi:include href="user-mgmt.xml" />
<xi:include href="file-systems.xml" />
<xi:include href="x-windows.xml" />
<xi:include href="gpu-accel.xml" />
<xi:include href="xfce.xml" />
<xi:include href="networking.xml" />
<xi:include href="linux-kernel.xml" />
104 changes: 104 additions & 0 deletions nixos/doc/manual/configuration/gpu-accel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="sec-gpu-accel">
<title>GPU acceleration</title>

<para>
NixOS provides various APIs that benefit from GPU hardware
acceleration, such as VA-API and VDPAU for video playback; OpenGL and
Vulkan for 3D graphics; and OpenCL for general-purpose computing.
This chapter describes how to set up GPU hardware acceleration (as far
as this is not done automatically) and how to verify that hardware
acceleration is indeed used.
</para>

<para>
Most of the aforementioned APIs are agnostic with regards to which
display server is used. Consequently, these instructions should apply
both to the X Window System and Wayland compositors.
</para>

<section xml:id="sec-gpu-accel-opencl">
<title>OpenCL</title>

<para>
<link xlink:href="https://en.wikipedia.org/wiki/OpenCL">OpenCL</link> is a
general compute API. It is used by various applications such as
Blender and Darktable to accelerate certain operations.
</para>

<para>
OpenCL applications load drivers through the <emphasis>Installable Client
Driver</emphasis> (ICD) mechanism. In this mechanism, an ICD file
specifies the path to the OpenCL driver for a particular GPU family.
In NixOS, there are two ways to make ICD files visible to the ICD
loader. The first is through the <varname>OCL_ICD_VENDORS</varname>
environment variable. This variable can contain a directory which
is scanned by the ICL loader for ICD files. For example:

<screen><prompt>$</prompt> export \
OCL_ICD_VENDORS=`nix-build '&lt;nixpkgs&gt;' --no-out-link -A rocm-opencl-icd`/etc/OpenCL/vendors/</screen>
</para>

<para>
The second mechanism is to add the OpenCL driver package to
<xref linkend="opt-hardware.opengl.extraPackages"/>. This links the
ICD file under <filename>/run/opengl-driver</filename>, where it will
be visible to the ICD loader.
</para>

<para>
The proper installation of OpenCL drivers can be verified through
the <command>clinfo</command> command of the <package>clinfo</package>
package. This command will report the number of hardware devides
that is found and give detailed information for each device:
</para>

<screen><prompt>$</prompt> clinfo | head -n3
Number of platforms 1
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.</screen>

<section xml:id="sec-gpu-accel-opencl-amd">
<title>AMD</title>

<para>
Modern AMD <link
xlink:href="https://en.wikipedia.org/wiki/Graphics_Core_Next">Graphics
Core Next</link> (GCN) GPUs are supported through the
<package>rocm-opencl-icd</package> package. Adding this package to
<xref linkend="opt-hardware.opengl.extraPackages"/> enables OpenCL
support. However, OpenCL Image support is provided through the
non-free <package>rocm-runtime-ext</package> package. This package can
be added to the same configuration option, but requires that
<varname>allowUnfree</varname> option is is enabled for nixpkgs. Full
OpenCL support on supported AMD GPUs is thus enabled as follows:

<programlisting><xref linkend="opt-hardware.opengl.extraPackages"/> = [
rocm-opencl-icd
rocm-runtime-ext
];</programlisting>
</para>

<para>
It is also possible to use the OpenCL Image extension without a
system-wide installation of the <package>rocm-runtime-ext</package>
package by setting the <varname>ROCR_EXT_DIR</varname> environment
variable to the directory that contains the extension:

<screen><prompt>$</prompt> export \
ROCR_EXT_DIR=`nix-build '&lt;nixpkgs&gt;' --no-out-link -A rocm-runtime-ext`/lib/rocm-runtime-ext</screen>
</para>

<para>
With either approach, you can verify that OpenCL Image support
is indeed working with the <command>clinfo</command> command:

<screen><prompt>$</prompt> clinfo | grep Image
Image support Yes</screen>
</para>
</section>
</section>
</chapter>
1 change: 1 addition & 0 deletions nixos/modules/virtualisation/docker.nix
Original file line number Diff line number Diff line change
@@ -149,6 +149,7 @@ in
###### implementation

config = mkIf cfg.enable (mkMerge [{
boot.kernelModules = [ "bridge" "veth" ];
environment.systemPackages = [ cfg.package ]
++ optional cfg.enableNvidia pkgs.nvidia-docker;
users.groups.docker.gid = config.ids.gids.docker;
4 changes: 2 additions & 2 deletions pkgs/applications/graphics/nomacs/default.nix
Original file line number Diff line number Diff line change
@@ -18,13 +18,13 @@

mkDerivation rec {
pname = "nomacs";
version = "3.14.2";
version = "3.15.1616";

src = fetchFromGitHub {
owner = "nomacs";
repo = "nomacs";
rev = version;
sha256 = "1vms13kyg7cpqi2hxvrrhlnl7cq92ijr7dm1kl5ryglpcagqv811";
sha256 = "0g1saqf31zncqdiwk7aaf951j3g33bg0vcjcr5mvg600jxiinw8j";
};

enableParallelBuilding = true;
6 changes: 1 addition & 5 deletions pkgs/build-support/rust/default.nix
Original file line number Diff line number Diff line change
@@ -241,9 +241,5 @@ stdenv.mkDerivation (args // {
meta = {
# default to Rust's platforms
platforms = rustc.meta.platforms;
} // meta // {
# add an extra maintainer to every package
maintainers = (meta.maintainers or []) ++
[ stdenv.lib.maintainers.nixpkgs-rust ];
};
} // meta;
})
2 changes: 1 addition & 1 deletion pkgs/development/go-modules/generic/default.nix
Original file line number Diff line number Diff line change
@@ -236,7 +236,7 @@ let
} // meta // {
# add an extra maintainer to every package
maintainers = (meta.maintainers or []) ++
[ lib.maintainers.kalbasit lib.maintainers.nixpkgs-go ];
[ lib.maintainers.kalbasit ];
};
});
in if disabled then
6 changes: 1 addition & 5 deletions pkgs/development/go-packages/generic/default.nix
Original file line number Diff line number Diff line change
@@ -239,11 +239,7 @@ let
# Add default meta information
homepage = "https://${goPackagePath}";
platforms = go.meta.platforms or lib.platforms.all;
} // meta // {
# add an extra maintainer to every package
maintainers = (meta.maintainers or []) ++
[ lib.maintainers.nixpkgs-go ];
};
} // meta;
});
in if disabled then
throw "${package.name} not supported for go ${go.meta.branch}"
39 changes: 19 additions & 20 deletions pkgs/development/libraries/rocm-runtime/rocr-ext-dir.diff
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
diff --git a/src/core/util/lnx/os_linux.cpp b/src/core/util/lnx/os_linux.cpp
index fdbe19a..42d4ef8 100644
--- a/src/core/util/lnx/os_linux.cpp
+++ b/src/core/util/lnx/os_linux.cpp
@@ -161,8 +161,17 @@ static_assert(sizeof(Mutex) == sizeof(pthread_mutex_t*), "OS abstraction size mi
static_assert(sizeof(Thread) == sizeof(os_thread*), "OS abstraction size mismatch");
diff --git a/src/core/runtime/runtime.cpp b/src/core/runtime/runtime.cpp
index dd6a15c..fb6de49 100644
--- a/src/core/runtime/runtime.cpp
+++ b/src/core/runtime/runtime.cpp
@@ -1358,7 +1358,17 @@ void Runtime::LoadExtensions() {
core::HsaApiTable::HSA_EXT_FINALIZER_API_TABLE_ID);

LibHandle LoadLib(std::string filename) {
- void* ret = dlopen(filename.c_str(), RTLD_LAZY);
- if (ret == nullptr) debug_print("LoadLib(%s) failed: %s\n", filename.c_str(), dlerror());
+ std::string extDirFilename = GetEnvVar("ROCR_EXT_DIR") + "/" + filename;
+ void* ret = dlopen(extDirFilename.c_str(), RTLD_LAZY);
+
+ // Attempt to load from the directory hardcoded by rocrExtDir.
+ if (ret == nullptr) {
+ std::string runpathFilename = std::string("@rocrExtDir@") + "/" + filename;
+ ret = dlopen(runpathFilename.c_str(), RTLD_LAZY);
+
+ if (ret == nullptr) debug_print("LoadLib(%s) failed: %s\n", filename.c_str(), dlerror());
// Update Hsa Api Table with handle of Image extension Apis
- extensions_.LoadImage(kImageLib[os_index(os::current_os)]);
+ //
+ // Use ROCR_EXT_DIR when it is non-empty. Otherwise, try to load the
+ // library from the OpenGL driver path.
+ std::string extDirVar = os::GetEnvVar("ROCR_EXT_DIR");
+ if (!extDirVar.empty()) {
+ extensions_.LoadImage(extDirVar + "/" + kImageLib[os_index(os::current_os)]);
+ } else {
+ std::string globalDriverDir("@rocrExtDir@");
+ extensions_.LoadImage(globalDriverDir + "/" + kImageLib[os_index(os::current_os)]);
+ }
+
return *(LibHandle*)&ret;
hsa_api_table_.LinkExts(&extensions_.image_api,
core::HsaApiTable::HSA_EXT_IMAGE_API_TABLE_ID);
}

2 changes: 1 addition & 1 deletion pkgs/games/tdm/default.nix
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ let
name = pname;
exec = "@out@/bin/${pname}";
icon = pname;
terminal = "False";
terminal = "false";
comment = "The Dark Mod - stealth FPS inspired by the Thief series";
type = "Application";
categories = "Game;";
10 changes: 5 additions & 5 deletions pkgs/os-specific/darwin/spacebar/default.nix
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@

stdenv.mkDerivation rec {
pname = "spacebar";
version = "0.5.0";
version = "1.1.0";

src = fetchFromGitHub {
owner = "somdoron";
owner = "cmacrae";
repo = pname;
rev = "v${version}";
sha256 = "0v8v4xsc67qpzm859r93ggq7rr7hmaj6dahdlg6g3ppj81cq0khz";
sha256 = "0w0mkf4kb21aicb85zbp3m6nvk6m5306mchbd5nm988kgirmxnl4";
};

buildInputs = [ Carbon Cocoa ScriptingBridge ];
@@ -21,8 +21,8 @@ stdenv.mkDerivation rec {
'';

meta = with stdenv.lib; {
description = "A status bar for yabai tiling window management";
homepage = "https://github.com/somdoron/spacebar";
description = "A minimal status bar for macOS";
homepage = "https://github.com/cmacrae/spacebar";
platforms = platforms.darwin;
maintainers = [ maintainers.cmacrae ];
license = licenses.mit;