Merge master into staging-next

This commit is contained in:
github-actions[bot]
2024-10-15 00:14:09 +00:00
committed by GitHub
43 changed files with 1552 additions and 1507 deletions
+101
View File
@@ -149,3 +149,104 @@ All new projects should use the CUDA redistributables available in [`cudaPackage
| 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 {#running-docker-or-podman-containers-with-cuda-support}
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).
The NVIDIA Container Toolkit can be enabled in NixOS like follows:
```nix
{
hardware.nvidia-container-toolkit.enable = true;
}
```
This will automatically enable a service that generates a CDI specification (located at `/var/run/cdi/nvidia-container-toolkit.json`) based on the auto-detected hardware of your machine. You can check this service by running:
```ShellSession
$ systemctl status nvidia-container-toolkit-cdi-generator.service
```
::: {.note}
Depending on what settings you had already enabled in your system, you might need to restart your machine in order for the NVIDIA Container Toolkit to generate a valid CDI specification for your machine.
:::
Once that a valid CDI specification has been generated for your machine on boot time, both Podman and Docker (> 25) will use this spec if you provide them with the `--device` flag:
```ShellSession
$ podman run --rm -it --device=nvidia.com/gpu=all ubuntu:latest nvidia-smi -L
GPU 0: NVIDIA GeForce RTX 4090 (UUID: <REDACTED>)
GPU 1: NVIDIA GeForce RTX 2080 SUPER (UUID: <REDACTED>)
```
```ShellSession
$ docker run --rm -it --device=nvidia.com/gpu=all ubuntu:latest nvidia-smi -L
GPU 0: NVIDIA GeForce RTX 4090 (UUID: <REDACTED>)
GPU 1: NVIDIA GeForce RTX 2080 SUPER (UUID: <REDACTED>)
```
You can check all the identifiers that have been generated for your auto-detected hardware by checking the contents of the `/var/run/cdi/nvidia-container-toolkit.json` file:
```ShellSession
$ nix run nixpkgs#jq -- -r '.devices[].name' < /var/run/cdi/nvidia-container-toolkit.json
0
1
all
```
### Specifying what devices to expose to the container {#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:
```ShellSession
$ podman run --rm -it --device=nvidia.com/gpu=0 ubuntu:latest nvidia-smi -L
GPU 0: NVIDIA GeForce RTX 4090 (UUID: <REDACTED>)
```
You can repeat the `--device` argument as many times as necessary if you have multiple GPU's and you want to pick up which ones to expose to the container:
```ShellSession
$ podman run --rm -it --device=nvidia.com/gpu=0 --device=nvidia.com/gpu=1 ubuntu:latest nvidia-smi -L
GPU 0: NVIDIA GeForce RTX 4090 (UUID: <REDACTED>)
GPU 1: NVIDIA GeForce RTX 2080 SUPER (UUID: <REDACTED>)
```
::: {.note}
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}
It's possible to expose GPU's to a `docker-compose` environment as well. With a `docker-compose.yaml` file like follows:
```yaml
services:
some-service:
image: ubuntu:latest
command: sleep infinity
deploy:
resources:
reservations:
devices:
- driver: cdi
device_ids:
- nvidia.com/gpu=all
```
In the same manner, you can pick specific devices that will be exposed to the container:
```yaml
services:
some-service:
image: ubuntu:latest
command: sleep infinity
deploy:
resources:
reservations:
devices:
- driver: cdi
device_ids:
- nvidia.com/gpu=0
- nvidia.com/gpu=1
```
@@ -1,8 +1,8 @@
{
x86_64-linux = "/nix/store/vi6fh1mhzl5m0knn3y056wnl07sri6c5-nix-2.24.8";
i686-linux = "/nix/store/s4wdfq4dzii2jhy1mv2h7b5hpzhf40hm-nix-2.24.8";
aarch64-linux = "/nix/store/g50zn4kdcnlgkwbvyi9f9icj9i2x83i5-nix-2.24.8";
riscv64-linux = "/nix/store/8ws83k3wc9a639hp6dyprsmvb24fd14w-nix-riscv64-unknown-linux-gnu-2.24.8";
x86_64-darwin = "/nix/store/1dhc9a68j5lcnkgdrcm2kbydnbzrlldg-nix-2.24.8";
aarch64-darwin = "/nix/store/7gv39q83hm8b7cwcpx1vlcs424qmp67p-nix-2.24.8";
x86_64-linux = "/nix/store/2nhrwv91g6ycpyxvhmvc0xs8p92wp4bk-nix-2.24.9";
i686-linux = "/nix/store/idaxj9ji6ggpn1h47a35mf0c8ns4ma39-nix-2.24.9";
aarch64-linux = "/nix/store/7b5q44l2p70bf6m6dprr8f0587ypwq1z-nix-2.24.9";
riscv64-linux = "/nix/store/mgw3il1qk59750g5hbf02km79rgyx00y-nix-riscv64-unknown-linux-gnu-2.24.9";
x86_64-darwin = "/nix/store/rp8rc0pfgham7d7spj5s9syzb138dmmd-nix-2.24.9";
aarch64-darwin = "/nix/store/1n95r340s7p3vdwqh7m94q0a42crahqq-nix-2.24.9";
}
@@ -1,14 +1,20 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.gpu-screen-recorder;
package = cfg.package.override {
inherit (config.security) wrapperDir;
};
in {
in
{
options = {
programs.gpu-screen-recorder = {
package = lib.mkPackageOption pkgs "gpu-screen-recorder" {};
package = lib.mkPackageOption pkgs "gpu-screen-recorder" { };
enable = lib.mkOption {
type = lib.types.bool;
@@ -28,12 +34,6 @@ in {
capabilities = "cap_sys_admin+ep";
source = "${package}/bin/gsr-kms-server";
};
security.wrappers."gpu-screen-recorder" = {
owner = "root";
group = "root";
capabilities = "cap_sys_nice+ep";
source = "${package}/bin/gpu-screen-recorder";
};
};
meta.maintainers = with lib.maintainers; [ timschumi ];
@@ -77,50 +77,63 @@
};
config = {
config = lib.mkIf config.hardware.nvidia-container-toolkit.enable {
virtualisation.docker = {
daemon.settings = lib.mkIf
(lib.versionAtLeast config.virtualisation.docker.package.version "25") {
features.cdi = true;
};
virtualisation.docker.daemon.settings = lib.mkIf
(config.hardware.nvidia-container-toolkit.enable &&
(lib.versionAtLeast config.virtualisation.docker.package.version "25")) {
features.cdi = true;
};
rootless.daemon.settings = lib.mkIf
(config.virtualisation.docker.rootless.enable &&
(lib.versionAtLeast config.virtualisation.docker.package.version "25")) {
features.cdi = true;
};
};
hardware.nvidia-container-toolkit.mounts = let
nvidia-driver = config.hardware.nvidia.package;
in (lib.mkMerge [
[{ hostPath = pkgs.addDriverRunpath.driverLink;
containerPath = pkgs.addDriverRunpath.driverLink; }
{ hostPath = "${lib.getLib nvidia-driver}/etc";
containerPath = "${lib.getLib nvidia-driver}/etc"; }
{ hostPath = "${lib.getLib nvidia-driver}/share";
containerPath = "${lib.getLib nvidia-driver}/share"; }
{ hostPath = "${lib.getLib pkgs.glibc}/lib";
containerPath = "${lib.getLib pkgs.glibc}/lib"; }
{ hostPath = "${lib.getLib pkgs.glibc}/lib64";
containerPath = "${lib.getLib pkgs.glibc}/lib64"; }]
(lib.mkIf config.hardware.nvidia-container-toolkit.mount-nvidia-executables
[{ hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-control";
containerPath = "/usr/bin/nvidia-cuda-mps-control"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-server";
containerPath = "/usr/bin/nvidia-cuda-mps-server"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-debugdump";
containerPath = "/usr/bin/nvidia-debugdump"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-powerd";
containerPath = "/usr/bin/nvidia-powerd"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-smi";
containerPath = "/usr/bin/nvidia-smi"; }])
# nvidia-docker 1.0 uses /usr/local/nvidia/lib{,64}
# e.g.
# - https://gitlab.com/nvidia/container-images/cuda/-/blob/e3ff10eab3a1424fe394899df0e0f8ca5a410f0f/dist/12.3.1/ubi9/base/Dockerfile#L44
# - https://github.com/NVIDIA/nvidia-docker/blob/01d2c9436620d7dde4672e414698afe6da4a282f/src/nvidia/volumes.go#L104-L173
(lib.mkIf config.hardware.nvidia-container-toolkit.mount-nvidia-docker-1-directories
[{ hostPath = "${lib.getLib nvidia-driver}/lib";
containerPath = "/usr/local/nvidia/lib"; }
{ hostPath = "${lib.getLib nvidia-driver}/lib";
containerPath = "/usr/local/nvidia/lib64"; }])
]);
hardware = {
graphics.enable = lib.mkIf (!config.hardware.nvidia.datacenter.enable) true;
systemd.services.nvidia-container-toolkit-cdi-generator = lib.mkIf config.hardware.nvidia-container-toolkit.enable {
nvidia-container-toolkit.mounts = let
nvidia-driver = config.hardware.nvidia.package;
in (lib.mkMerge [
[{ hostPath = pkgs.addDriverRunpath.driverLink;
containerPath = pkgs.addDriverRunpath.driverLink; }
{ hostPath = "${lib.getLib nvidia-driver}/etc";
containerPath = "${lib.getLib nvidia-driver}/etc"; }
{ hostPath = "${lib.getLib nvidia-driver}/share";
containerPath = "${lib.getLib nvidia-driver}/share"; }
{ hostPath = "${lib.getLib pkgs.glibc}/lib";
containerPath = "${lib.getLib pkgs.glibc}/lib"; }
{ hostPath = "${lib.getLib pkgs.glibc}/lib64";
containerPath = "${lib.getLib pkgs.glibc}/lib64"; }]
(lib.mkIf config.hardware.nvidia-container-toolkit.mount-nvidia-executables
[{ hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-control";
containerPath = "/usr/bin/nvidia-cuda-mps-control"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-cuda-mps-server";
containerPath = "/usr/bin/nvidia-cuda-mps-server"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-debugdump";
containerPath = "/usr/bin/nvidia-debugdump"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-powerd";
containerPath = "/usr/bin/nvidia-powerd"; }
{ hostPath = lib.getExe' nvidia-driver "nvidia-smi";
containerPath = "/usr/bin/nvidia-smi"; }])
# nvidia-docker 1.0 uses /usr/local/nvidia/lib{,64}
# e.g.
# - https://gitlab.com/nvidia/container-images/cuda/-/blob/e3ff10eab3a1424fe394899df0e0f8ca5a410f0f/dist/12.3.1/ubi9/base/Dockerfile#L44
# - https://github.com/NVIDIA/nvidia-docker/blob/01d2c9436620d7dde4672e414698afe6da4a282f/src/nvidia/volumes.go#L104-L173
(lib.mkIf config.hardware.nvidia-container-toolkit.mount-nvidia-docker-1-directories
[{ hostPath = "${lib.getLib nvidia-driver}/lib";
containerPath = "/usr/local/nvidia/lib"; }
{ hostPath = "${lib.getLib nvidia-driver}/lib";
containerPath = "/usr/local/nvidia/lib64"; }])
]);
};
services.xserver.videoDrivers = lib.mkIf
(!config.hardware.nvidia.datacenter.enable) [ "nvidia" ];
systemd.services.nvidia-container-toolkit-cdi-generator = {
description = "Container Device Interface (CDI) for Nvidia generator";
wantedBy = [ "multi-user.target" ];
after = [ "systemd-udev-settle.service" ];
@@ -3,7 +3,20 @@
makeInstalledTest {
tested = pkgs.xdg-desktop-portal;
# Ton of breakage.
# https://github.com/flatpak/xdg-desktop-portal/pull/428
meta.broken = true;
# Red herring
# Failed to load RealtimeKit property: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.RealtimeKit1 was not provided by any .service files
# Maybe a red herring, enabling PipeWire doesn't fix the location test.
# Failed connect to PipeWire: Couldn't connect to PipeWire
testConfig = {
environment.variables = {
TEST_IN_CI = 1;
XDG_DATA_DIRS = "${pkgs.xdg-desktop-portal.installedTests}/share/installed-tests/xdg-desktop-portal/share";
};
# Broken, see comment in the package file.
#services.geoclue2 = {
# enable = true;
# enableDemoAgent = true;
#};
#location.provider = "geoclue2";
};
}
@@ -13,11 +13,11 @@
stdenv.mkDerivation rec {
pname = "bluefish";
version = "2.2.15";
version = "2.2.16";
src = fetchurl {
url = "mirror://sourceforge/bluefish/bluefish-${version}.tar.bz2";
sha256 = "sha256-YUPlHGtVedWW86moXg8NhYDJ9Y+ChXWxGYgODKHZQbw=";
sha256 = "sha256-FOZHb87o+jJvf2Px9pPSUhlfncsWrw/jyRXEmbr13XQ=";
};
nativeBuildInputs = [ pkg-config wrapGAppsHook3 ];
@@ -1337,6 +1337,11 @@ let
org-edit-latex = mkHome super.org-edit-latex;
# https://github.com/GuiltyDolphin/org-evil/issues/24
# hydra has that error: https://hydra.nixos.org/build/274852065
# but I cannot reproduce that locally
org-evil = ignoreCompilationError super.org-evil;
org-gnome = ignoreCompilationError super.org-gnome; # elisp error
org-gtd = ignoreCompilationError super.org-gtd; # elisp error
File diff suppressed because it is too large Load Diff
@@ -5,10 +5,10 @@
{
firefox = buildMozillaMach rec {
pname = "firefox";
version = "131.0.2";
version = "131.0.3";
src = fetchurl {
url = "mirror://mozilla/firefox/releases/${version}/source/firefox-${version}.source.tar.xz";
sha512 = "fb1a1179a8c62de975c93e1ac6f058cb5492e955bbb7ac2d4b83cdd14ba17bdb2450078bd6f626124b14542f3fda9514bea476aaa34ff4f5a2bee6b1625ec963";
sha512 = "3aa96db839f7a45e34c43b5e7e3333e1100ca11545ad26a8e42987fbc72df5ae7ebebe7dfc8c4e856d2bb4676c0516914a07c001f6047799f314146a3329c0ce";
};
extraPatches = [
@@ -1,25 +0,0 @@
From cd8c6561079ee4c53b4bed390edd75a730ac685d Mon Sep 17 00:00:00 2001
From: Tim Schumacher <timschumi@gmx.de>
Date: Thu, 4 Jul 2024 16:26:36 +0200
Subject: [PATCH] Don't install systemd unit files using absolute paths
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index a188f16..7807abe 100644
--- a/meson.build
+++ b/meson.build
@@ -54,7 +54,7 @@ executable('gsr-kms-server', 'kms/server/kms_server.c', dependencies : dependenc
executable('gpu-screen-recorder', src, dependencies : dep, install : true)
if get_option('systemd') == true
- install_data(files('extra/gpu-screen-recorder.service'), install_dir : '/usr/lib/systemd/user')
+ install_data(files('extra/gpu-screen-recorder.service'), install_dir : 'lib/systemd/user')
endif
if get_option('capabilities') == true
--
2.45.1
@@ -5,11 +5,15 @@
makeWrapper,
meson,
ninja,
addDriverRunpath,
pkg-config,
libXcomposite,
libpulseaudio,
dbus,
ffmpeg,
wayland,
vulkan-headers,
pipewire,
libdrm,
libva,
libglvnd,
@@ -20,16 +24,15 @@
wrapperDir ? "/run/wrappers/bin",
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "gpu-screen-recorder";
version = "unstable-2024-07-05";
version = "4.2.1";
# Snapshot tarballs use the following versioning format:
# printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
src = fetchurl {
url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.r641.48cd80f.tar.gz";
hash = "sha256-hIEK8EYIxQTTiFePPZf4V0nsxqxkfcDeOG9GK9whn+0=";
url = "https://dec05eba.com/snapshot/gpu-screen-recorder.git.${finalAttrs.version}.tar.gz";
hash = "sha256-eCjAlPEg8lkL8T0lgxr0F8ouFGwqfsRxDSQuG6RbpZE=";
};
sourceRoot = ".";
nativeBuildInputs = [
@@ -42,8 +45,11 @@ stdenv.mkDerivation {
buildInputs = [
libXcomposite
libpulseaudio
dbus
ffmpeg
pipewire
wayland
vulkan-headers
libdrm
libva
libXdamage
@@ -52,30 +58,35 @@ stdenv.mkDerivation {
libXfixes
];
patches = [ ./0001-Don-t-install-systemd-unit-files-using-absolute-path.patch ];
mesonFlags = [
"-Dsystemd=true"
# Capabilities are handled by security.wrappers if possible.
"-Dcapabilities=false"
# Enable Wayland support
(lib.mesonBool "portal" true)
# Handle by the module
(lib.mesonBool "capabilities" false)
(lib.mesonBool "systemd" false)
(lib.mesonBool "nvidia_suspend_fix" false)
];
postInstall = ''
mkdir $out/bin/.wrapped
mv $out/bin/gpu-screen-recorder $out/bin/.wrapped/
makeWrapper "$out/bin/.wrapped/gpu-screen-recorder" "$out/bin/gpu-screen-recorder" \
--prefix LD_LIBRARY_PATH : ${libglvnd}/lib \
--prefix PATH : ${wrapperDir} \
--suffix PATH : $out/bin
--prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
libglvnd
addDriverRunpath.driverLink
]
}" \
--prefix PATH : "${wrapperDir}" \
--suffix PATH : "$out/bin"
'';
meta = {
description = "Screen recorder that has minimal impact on system performance by recording a window using the GPU only";
mainProgram = "gpu-screen-recorder";
homepage = "https://git.dec05eba.com/gpu-screen-recorder/about/";
license = lib.licenses.gpl3Only;
mainProgram = "gpu-screen-recorder";
maintainers = [ lib.maintainers.babbaj ];
platforms = [ "x86_64-linux" ];
};
}
})
@@ -1,34 +1,35 @@
{ stdenv
, lib
, fetchurl
, pkg-config
, desktop-file-utils
, makeWrapper
, meson
, ninja
, gtk3
, libayatana-appindicator
, libpulseaudio
, libdrm
, gpu-screen-recorder
, libglvnd
, libX11
, libXrandr
, wayland
, wrapGAppsHook3
, wrapperDir ? "/run/wrappers/bin"
{
stdenv,
lib,
fetchurl,
pkg-config,
addDriverRunpath,
desktop-file-utils,
makeWrapper,
meson,
ninja,
gtk3,
libayatana-appindicator,
libpulseaudio,
libdrm,
gpu-screen-recorder,
libglvnd,
libX11,
libXrandr,
wayland,
wrapGAppsHook3,
wrapperDir ? "/run/wrappers/bin",
}:
stdenv.mkDerivation {
stdenv.mkDerivation (finalAttrs: {
pname = "gpu-screen-recorder-gtk";
version = "unstable-2024-07-05";
version = "4.2.1";
# Snapshot tarballs use the following versioning format:
# printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
src = fetchurl {
url = "https://dec05eba.com/snapshot/gpu-screen-recorder-gtk.git.r311.c611c51.tar.gz";
hash = "sha256-86EdmeZ2dlffSfJOrTVGPtYyL3j6DmCQIALX2rpeS1Y=";
url = "https://dec05eba.com/snapshot/gpu-screen-recorder-gtk.git.${finalAttrs.version}.tar.gz";
hash = "sha256-qk5bI23fypvv0yN9Ql7TOerBhoRzj65EcoAy3lMGMqc=";
};
sourceRoot = ".";
nativeBuildInputs = [
@@ -50,23 +51,30 @@ stdenv.mkDerivation {
wayland
];
preFixup = let
gpu-screen-recorder-wrapped = gpu-screen-recorder.override {
inherit wrapperDir;
};
in ''
gappsWrapperArgs+=(--prefix PATH : ${wrapperDir})
gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ gpu-screen-recorder-wrapped ]})
# we also append /run/opengl-driver/lib as it otherwise fails to find libcuda.
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libglvnd ]}:/run/opengl-driver/lib)
'';
preFixup =
let
gpu-screen-recorder-wrapped = gpu-screen-recorder.override {
inherit wrapperDir;
};
in
''
gappsWrapperArgs+=(--prefix PATH : ${wrapperDir})
gappsWrapperArgs+=(--suffix PATH : ${lib.makeBinPath [ gpu-screen-recorder-wrapped ]})
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
libglvnd
addDriverRunpath.driverLink
]
})
'';
meta = {
changelog = "https://git.dec05eba.com/gpu-screen-recorder-gtk/tree/com.dec05eba.gpu_screen_recorder.appdata.xml#n82";
description = "GTK frontend for gpu-screen-recorder.";
mainProgram = "gpu-screen-recorder-gtk";
homepage = "https://git.dec05eba.com/gpu-screen-recorder-gtk/about/";
license = lib.licenses.gpl3Only;
mainProgram = "gpu-screen-recorder-gtk";
maintainers = with lib.maintainers; [ babbaj ];
platforms = [ "x86_64-linux" ];
};
}
})
@@ -31,7 +31,6 @@
, isCCTools ? bintools.isCCTools or false
, expand-response-params
, targetPackages ? {}
, useMacosReexportHack ? false
, wrapGas ? false
# Note: the hardening flags are part of the bintools-wrapper, rather than
@@ -228,16 +227,9 @@ stdenvNoCC.mkDerivation {
fi
done
'' + (if !useMacosReexportHack then ''
if [ -e ''${ld:-$ldPath/${targetPrefix}ld} ]; then
wrap ${targetPrefix}ld ${./ld-wrapper.sh} ''${ld:-$ldPath/${targetPrefix}ld}
fi
'' else ''
ldInner="${targetPrefix}ld-reexport-delegate"
wrap "$ldInner" ${./macos-sierra-reexport-hack.bash} ''${ld:-$ldPath/${targetPrefix}ld}
wrap "${targetPrefix}ld" ${./ld-wrapper.sh} "$out/bin/$ldInner"
unset ldInner
'') + ''
for variant in $ldPath/${targetPrefix}ld.*; do
basename=$(basename "$variant")
@@ -421,7 +413,5 @@ stdenvNoCC.mkDerivation {
attrByPath ["meta" "description"] "System binary utilities" bintools_
+ " (wrapper script)";
priority = 10;
} // optionalAttrs useMacosReexportHack {
platforms = platforms.darwin;
};
}
@@ -1,246 +0,0 @@
#! @shell@
set -eu -o pipefail
# For cmd | while read; do ...; done
shopt -s lastpipe
path_backup="$PATH"
if [ -n "@coreutils_bin@" ]; then
PATH="@coreutils_bin@/bin"
fi
declare -ri recurThreshold=200
declare -i overflowCount=0
declare -ar origArgs=("$@")
# Throw away what we won't need
declare -a parentArgs=()
while (( $# )); do
case "$1" in
-l)
echo "cctools LD does not support '-l foo'" >&2
exit 1
;;
-lazy_library | -reexport_library | -upward_library | -weak_library)
overflowCount+=1
shift 2
;;
-l* | *.so.* | *.dylib | -lazy-l* | -reexport-l* | -upward-l* | -weak-l*)
overflowCount+=1
shift 1
;;
*.a | *.o)
shift 1
;;
-L | -F)
# Evidentally ld doesn't like using the child's RPATH, so it still
# needs these.
parentArgs+=("$1" "$2")
shift 2
;;
-L?* | -F?*)
parentArgs+=("$1")
shift 1
;;
-o)
outputName="$2"
parentArgs+=("$1" "$2")
shift 2
;;
-install_name | -dylib_install_name | -dynamic-linker | -plugin)
parentArgs+=("$1" "$2")
shift 2
;;
-rpath)
# Only an rpath to the child is needed, which we will add
shift 2
;;
*)
if [[ -f "$1" ]]; then
# Propabably a non-standard object file like Haskell's
# `.dyn_o`. Skip it like other inputs
:
else
parentArgs+=("$1")
fi
shift 1
;;
esac
done
if (( "$overflowCount" <= "$recurThreshold" )); then
if [ -n "${NIX_DEBUG:-}" ]; then
echo "ld-wrapper: Only ${overflowCount} inputs counted while ${recurThreshold} is the ceiling, linking normally. " >&2
fi
PATH="$path_backup"
exec @prog@ "${origArgs[@]}"
fi
if [ -n "${NIX_DEBUG:-}" ]; then
echo "ld-wrapper: ${overflowCount} inputs counted when ${recurThreshold} is the ceiling, inspecting further. " >&2
fi
# Collect the normalized linker input
declare -a norm=()
# Arguments are null-separated
@prog@ --dump-normalized-lib-args "${origArgs[@]}" |
while IFS= read -r -d '' input; do
norm+=("$input")
done
declare -i leafCount=0
declare lastLeaf=''
declare -a childrenInputs=() trailingInputs=()
while (( "${#norm[@]}" )); do
case "${norm[0]}" in
-lazy_library | -upward_library)
# TODO(@Ericson2314): Don't do that, but intersperse children
# between such args.
echo "ld-wrapper: Warning: Potentially changing link order" >&2
trailingInputs+=("${norm[0]}" "${norm[1]}")
norm=("${norm[@]:2}")
;;
-reexport_library | -weak_library)
childrenInputs+=("${norm[0]}" "${norm[1]}")
if [[ "${norm[1]}" != "$lastLeaf" ]]; then
leafCount+=1
lastLeaf="${norm[1]}"
fi
norm=("${norm[@]:2}")
;;
*.so | *.dylib)
childrenInputs+=(-reexport_library "${norm[0]}")
if [[ "${norm[0]}" != "$lastLeaf" ]]; then
leafCount+=1
lastLeaf="${norm[0]}"
fi
norm=("${norm[@]:1}")
;;
*.o | *.a)
# Don't delegate object files or static libs
parentArgs+=("${norm[0]}")
norm=("${norm[@]:1}")
;;
*)
if [[ -f "${norm[0]}" ]]; then
# Propabably a non-standard object file. We'll let it by.
parentArgs+=("${norm[0]}")
norm=("${norm[@]:1}")
else
echo "ld-wrapper: Internal Error: Invalid normalized argument" >&2
exit 255
fi
;;
esac
done
if (( "$leafCount" <= "$recurThreshold" )); then
if [ -n "${NIX_DEBUG:-}" ]; then
echo "ld-wrapper: Only ${leafCount} *dynamic* inputs counted while ${recurThreshold} is the ceiling, linking normally. " >&2
fi
PATH="$path_backup"
exec @prog@ "${origArgs[@]}"
fi
if [ -n "${NIX_DEBUG:-}" ]; then
echo "ld-wrapper: ${leafCount} *dynamic* inputs counted when ${recurThreshold} is the ceiling, delegating to children. " >&2
fi
declare -r outputNameLibless=$( \
if [[ -z "${outputName:+isUndefined}" ]]; then
echo unnamed
return 0;
fi
baseName=$(basename ${outputName})
if [[ "$baseName" = lib* ]]; then
baseName="${baseName:3}"
fi
echo "$baseName")
declare -ra children=(
"$outputNameLibless-reexport-delegate-0"
"$outputNameLibless-reexport-delegate-1"
)
mkdir -p "$out/lib"
symbolBloatObject=$outputNameLibless-symbol-hack.o
if [[ ! -f $symbolBloatObject ]]; then
# `-Q` means use GNU Assembler rather than Clang, avoiding an awkward
# dependency cycle.
printf '.private_extern _______child_hack_foo\nchild_hack_foo:\n' |
PATH="$PATH:@out@/bin" @targetPrefix@as -Q -- -o $symbolBloatObject
fi
# Split inputs between children
declare -a child0Inputs=() child1Inputs=("${childrenInputs[@]}")
let "countFirstChild = $leafCount / 2" || true
lastLeaf=''
while (( "$countFirstChild" )); do
case "${child1Inputs[0]}" in
-reexport_library | -weak_library)
child0Inputs+=("${child1Inputs[0]}" "${child1Inputs[1]}")
if [[ "${child1Inputs[1]}" != "$lastLeaf" ]]; then
let countFirstChild-=1 || true
lastLeaf="${child1Inputs[1]}"
fi
child1Inputs=("${child1Inputs[@]:2}")
;;
*.so | *.dylib)
child0Inputs+=(-reexport_library "${child1Inputs[0]}")
if [[ "${child1Inputs[0]}" != "$lastLeaf" ]]; then
let countFirstChild-=1 || true
lastLeaf="${child1Inputs[1]}"
fi
child1Inputs=("${child1Inputs[@]:2}")
;;
*)
echo "ld-wrapper: Internal Error: Invalid delegated input" >&2
exit -1
;;
esac
done
# First half of libs
@out@/bin/@targetPrefix@ld \
-macosx_version_min $MACOSX_DEPLOYMENT_TARGET -arch x86_64 -dylib \
-o "$out/lib/lib${children[0]}.dylib" \
-install_name "$out/lib/lib${children[0]}.dylib" \
"$symbolBloatObject" "${child0Inputs[@]}" "${trailingInputs[@]}"
# Second half of libs
@out@/bin/@targetPrefix@ld \
-macosx_version_min $MACOSX_DEPLOYMENT_TARGET -arch x86_64 -dylib \
-o "$out/lib/lib${children[1]}.dylib" \
-install_name "$out/lib/lib${children[1]}.dylib" \
"$symbolBloatObject" "${child1Inputs[@]}" "${trailingInputs[@]}"
parentArgs+=("-L$out/lib" -rpath "$out/lib")
if [[ $outputName != *reexport-delegate* ]]; then
parentArgs+=("-l${children[0]}" "-l${children[1]}")
else
parentArgs+=("-reexport-l${children[0]}" "-reexport-l${children[1]}")
fi
parentArgs+=("${trailingInputs[@]}")
if [ -n "${NIX_DEBUG:-}" ]; then
echo "flags using delegated children to @prog@:" >&2
printf " %q\n" "${parentArgs[@]}" >&2
fi
PATH="$path_backup"
exec @prog@ "${parentArgs[@]}"
+2 -2
View File
@@ -23,13 +23,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "aquamarine";
version = "0.4.1";
version = "0.4.3";
src = fetchFromGitHub {
owner = "hyprwm";
repo = "aquamarine";
rev = "v${finalAttrs.version}";
hash = "sha256-/NO/h/qD/eJXAQr/fHA4mdDgYsNT9thHQ+oT6KPi2ac=";
hash = "sha256-44bnoY0nAvbBQ/lVjmn511yL39Sv7SknV0BDxn34P3Q=";
};
nativeBuildInputs = [
+2 -2
View File
@@ -10,11 +10,11 @@
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "batik";
version = "1.17";
version = "1.18";
src = fetchurl {
url = "mirror://apache/xmlgraphics/batik/binaries/batik-bin-${finalAttrs.version}.tar.gz";
hash = "sha256-sEJphF3grlwZCEt3gHHm4JF8RpvKKBLLvKXf2lu/dhA=";
hash = "sha256-k2kC/441o0qizY9nwbWJh3Hv45FJeuDgrhynPhvZg0Y=";
};
nativeBuildInputs = [
+10
View File
@@ -13,6 +13,7 @@
, ladspaH
, libtool
, libpulseaudio
, fetchpatch
}:
stdenv.mkDerivation (finalAttrs: {
@@ -28,6 +29,15 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [ pkg-config ];
patches = [
# fix compatibility with ffmpeg7
# https://github.com/bmc0/dsp/commit/58a9d0c1f99f2d4c7fc51b6dbe563447ec60120f
(fetchpatch {
url = "https://github.com/bmc0/dsp/commit/58a9d0c1f99f2d4c7fc51b6dbe563447ec60120f.patch?full_index=1";
hash = "sha256-7WgJegDL9sVCRnRwm/f1ZZl2eiuRT5oAQaYoDLjEoqs=";
})
];
buildInputs = [
fftw
zita-convolver
+40
View File
@@ -0,0 +1,40 @@
{
lib,
fetchFromGitHub,
rustPlatform,
git,
bash,
nix-update-script,
}:
let
version = "0.1.1";
in
rustPlatform.buildRustPackage {
pname = "git-prole";
inherit version;
src = fetchFromGitHub {
owner = "9999years";
repo = "git-prole";
rev = "refs/tags/v${version}";
hash = "sha256-IJsNZt5eID1ghz5Rj53OfidgPoMS2qq+7qgqYEu4zPc=";
};
cargoHash = "sha256-2z7UEHVomm2zuImdcQq0G9fEhKrHLrPNUhVrFugG3w4=";
nativeCheckInputs = [
git
bash
];
meta = {
homepage = "https://github.com/9999years/git-prole";
changelog = "https://github.com/9999years/git-prole/releases/tag/v${version}";
description = "`git-worktree(1)` manager";
license = [ lib.licenses.mit ];
maintainers = [ lib.maintainers._9999years ];
mainProgram = "git-prole";
};
passthru.updateScript = nix-update-script { };
}
+2 -2
View File
@@ -33,13 +33,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "picom";
version = "12.2";
version = "12.3";
src = fetchFromGitHub {
owner = "yshui";
repo = "picom";
rev = "v${finalAttrs.version}";
hash = "sha256-tT4OIzIX+phbze2+9f3WQN6RuGKlSQ+Ocp4xodvdPC0=";
hash = "sha256-FwjMlHP8xNJikkPpz+8BORrqqKYvRpkqm9GbExCoLAU=";
fetchSubmodules = true;
};
+2 -2
View File
@@ -11,13 +11,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "sfcgal";
version = "1.5.2";
version = "2.0.0";
src = fetchFromGitLab {
owner = "sfcgal";
repo = "SFCGAL";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-fK1PfLm6n05PhH/sT6N/hQtH5Z6+Xc1nUCS1NYpLDcY=";
hash = "sha256-cx0QJCtAPR/WkWPpH+mZvq2803eDT7b+qlI5ma+CveE=";
};
buildInputs = [
@@ -0,0 +1,30 @@
From 266a090882133e30df20899bbf8a5b66b28e02cd Mon Sep 17 00:00:00 2001
From: OPNA2608 <opna2608@protonmail.com>
Date: Mon, 14 Oct 2024 00:31:01 +0200
Subject: [PATCH] Disable update checking
Downloading an AppImage and trying to run it just won't work.
---
src/qt_gui/check_update.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/qt_gui/check_update.cpp b/src/qt_gui/check_update.cpp
index ca6009ca..e3b14d5d 100644
--- a/src/qt_gui/check_update.cpp
+++ b/src/qt_gui/check_update.cpp
@@ -201,6 +201,12 @@ void CheckUpdate::setupUI(const QString& downloadUrl, const QString& latestDate,
noButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
bottomLayout->addWidget(autoUpdateCheckBox);
+ yesButton->setVisible(false);
+ yesButton->setEnabled(false);
+ QString updateDisabledText = QStringLiteral("[Nix] Auto-updating has been disabled in this package.");
+ QLabel* updateDisabledLabel = new QLabel(updateDisabledText, this);
+ layout->addWidget(updateDisabledLabel);
+
QSpacerItem* spacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
bottomLayout->addItem(spacer);
--
2.44.1
+19
View File
@@ -0,0 +1,19 @@
--- a/src/core/libraries/kernel/thread_management.cpp
+++ b/src/core/libraries/kernel/thread_management.cpp
@@ -1065,7 +1065,16 @@ ScePthread PThreadPool::Create() {
}
}
+#ifdef _WIN64
auto* ret = new PthreadInternal{};
+#else
+ // TODO: Linux specific hack
+ static u8* hint_address = reinterpret_cast<u8*>(0x7FFFFC000ULL);
+ auto* ret = reinterpret_cast<PthreadInternal*>(
+ mmap(hint_address, sizeof(PthreadInternal), PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0));
+ hint_address += Common::AlignUp(sizeof(PthreadInternal), 4_KB);
+#endif
ret->is_free = false;
ret->is_detached = false;
ret->is_almost_done = false;
@@ -0,0 +1,24 @@
diff --git a/src/sdl_window.cpp b/src/sdl_window.cpp
index bd2cc39d..13438149 100644
--- a/src/sdl_window.cpp
+++ b/src/sdl_window.cpp
@@ -127,19 +127,12 @@ void WindowSDL::onResize() {
void WindowSDL::onKeyPress(const SDL_Event* event) {
using Libraries::Pad::OrbisPadButtonDataOffset;
-#ifdef __APPLE__
// Use keys that are more friendly for keyboards without a keypad.
// Once there are key binding options this won't be necessary.
constexpr SDL_Keycode CrossKey = SDLK_N;
constexpr SDL_Keycode CircleKey = SDLK_B;
constexpr SDL_Keycode SquareKey = SDLK_V;
constexpr SDL_Keycode TriangleKey = SDLK_C;
-#else
- constexpr SDL_Keycode CrossKey = SDLK_KP_2;
- constexpr SDL_Keycode CircleKey = SDLK_KP_6;
- constexpr SDL_Keycode SquareKey = SDLK_KP_4;
- constexpr SDL_Keycode TriangleKey = SDLK_KP_8;
-#endif
u32 button = 0;
Input::Axis axis = Input::Axis::AxisMax;
+140
View File
@@ -0,0 +1,140 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
alsa-lib,
boost184,
cmake,
cryptopp,
glslang,
ffmpeg,
fmt,
jack2,
libdecor,
libpulseaudio,
libunwind,
libusb1,
magic-enum,
mesa,
pkg-config,
pugixml,
qt6,
rapidjson,
renderdoc,
sndio,
toml11,
vulkan-headers,
vulkan-loader,
vulkan-memory-allocator,
xorg,
xxHash,
zlib-ng,
unstableGitUpdater,
}:
stdenv.mkDerivation {
pname = "shadps4";
version = "0.3.0-unstable-2024-10-13";
src = fetchFromGitHub {
owner = "shadps4-emu";
repo = "shadPS4";
rev = "bd9f82df94847b4a5f3d2676ae938f064505c992";
hash = "sha256-Z4+hHq2VI4wA1D72dBI7Lt++Rm3q0svjF6AialXxM0k=";
fetchSubmodules = true;
};
patches = [
# https://github.com/shadps4-emu/shadPS4/issues/758
./bloodborne.patch
# Fix controls without a numpad
./laptop-controls.patch
# Disable auto-updating, as
# downloading an AppImage and trying to run it just won't work.
# https://github.com/shadps4-emu/shadPS4/issues/1368
./0001-Disable-update-checking.patch
];
buildInputs = [
alsa-lib
boost184
cryptopp
glslang
ffmpeg
fmt
jack2
libdecor
libpulseaudio
libunwind
libusb1
xorg.libX11
xorg.libXext
magic-enum
mesa
pugixml
qt6.qtbase
qt6.qtdeclarative
qt6.qtmultimedia
qt6.qttools
qt6.qtwayland
rapidjson
renderdoc
sndio
toml11
vulkan-headers
vulkan-loader
vulkan-memory-allocator
xxHash
zlib-ng
];
nativeBuildInputs = [
cmake
pkg-config
qt6.wrapQtAppsHook
];
cmakeFlags = [
(lib.cmakeBool "ENABLE_QT_GUI" true)
];
# Still in development, help with debugging
cmakeBuildType = "RelWithDebugInfo";
dontStrip = true;
installPhase = ''
runHook preInstall
install -D -t $out/bin shadps4
install -Dm644 -t $out/share/icons/hicolor/512x512/apps $src/.github/shadps4.png
install -Dm644 -t $out/share/applications $src/.github/shadps4.desktop
runHook postInstall
'';
fixupPhase = ''
patchelf --add-rpath ${
lib.makeLibraryPath [
vulkan-loader
xorg.libXi
]
} \
$out/bin/shadps4
'';
passthru.updateScript = unstableGitUpdater {
tagFormat = "v.*";
tagPrefix = "v.";
};
meta = {
description = "Early in development PS4 emulator";
homepage = "https://github.com/shadps4-emu/shadPS4";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ ryand56 ];
mainProgram = "shadps4";
platforms = lib.intersectLists lib.platforms.linux lib.platforms.x86_64;
};
}
@@ -4,12 +4,12 @@
let
pname = "elixir-ls";
version = "0.24.0";
version = "0.24.1";
src = fetchFromGitHub {
owner = "elixir-lsp";
repo = "elixir-ls";
rev = "v${version}";
hash = "sha256-GYDaHcdCiU0qh8OJSwll6RLvcakM/amlK3BfTi/kZwM=";
hash = "sha256-d5O7DGEKuwHbjxwJa3HNtaycQIzFTi74UxszRH7TVzQ=";
};
in
mixRelease {
@@ -20,7 +20,7 @@ mixRelease {
mixFodDeps = fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version elixir;
hash = "sha256-ZmzGsf06DIZMqQBz7FZo0CtZ9TZzk7jxMRAWFHA5fOA=";
hash = "sha256-OxQeIdqjY/k02q+nLQnZ+/Zxy/bdjjSCRrVu0usQcsc=";
};
# elixir-ls is an umbrella app
@@ -16,10 +16,10 @@ let platformLdLibraryPath = if stdenv.hostPlatform.isDarwin then "DYLD_FALLBACK_
in
stdenv.mkDerivation rec {
pname = "sagittarius-scheme";
version = "0.9.11";
version = "0.9.12";
src = fetchurl {
url = "https://bitbucket.org/ktakashi/${pname}/downloads/sagittarius-${version}.tar.gz";
hash = "sha256-LIF1EW8sMBMKycQnVAXk+5iEpKmRHMmzBILAg2tjk8c=";
hash = "sha256-w6aQkC7/vKO8exvDpsSsLyLXrm4FSKh8XYGJgseEII0=";
};
preBuild = ''
# since we lack rpath during build, need to explicitly add build path
@@ -27,6 +27,7 @@
, runCommand
, wrapGAppsHook3
, xmlto
, bash
, enableGeoLocation ? true
, enableSystemd ? true
}:
@@ -63,6 +64,10 @@ stdenv.mkDerivation (finalAttrs: {
# test tries to read /proc/cmdline, which is not intended to be accessible in the sandbox
./trash-test.patch
# Install files required to be in XDG_DATA_DIR of the installed tests
# Merged PR https://github.com/flatpak/xdg-desktop-portal/pull/1444
./installed-tests-share.patch
];
# until/unless bubblewrap ships a pkg-config file, meson has no way to find it when cross-compiling.
@@ -102,6 +107,7 @@ stdenv.mkDerivation (finalAttrs: {
(python3.withPackages (pp: with pp; [
pygobject3
]))
bash
] ++ lib.optionals enableGeoLocation [
geoclue2
] ++ lib.optionals enableSystemd [
@@ -142,6 +148,21 @@ stdenv.mkDerivation (finalAttrs: {
export TEST_IN_CI=1
'';
postFixup = let
documentFuse = "${placeholder "installedTests"}/libexec/installed-tests/xdg-desktop-portal/test-document-fuse.py";
testPortals = "${placeholder "installedTests"}/libexec/installed-tests/xdg-desktop-portal/test-portals";
in ''
if [ -x '${documentFuse}' ] ; then
wrapGApp '${documentFuse}'
wrapGApp '${testPortals}'
# (xdg-desktop-portal:995): xdg-desktop-portal-WARNING **: 21:21:55.673: Failed to get GeoClue client: Timeout was reached
# xdg-desktop-portal:ERROR:../tests/location.c:22:location_cb: 'res' should be TRUE
# https://github.com/flatpak/xdg-desktop-portal/blob/1d6dfb57067dec182b546dfb60c87aa3452c77ed/tests/location.c#L21
rm $installedTests/share/installed-tests/xdg-desktop-portal/test-portals-location.test
fi
'';
passthru = {
tests = {
installedTests = nixosTests.installed-tests.xdg-desktop-portal;
@@ -0,0 +1,9 @@
diff --git a/tests/share/applications/meson.build b/tests/share/applications/meson.build
index d56b633..3ad3371 100644
--- a/tests/share/applications/meson.build
+++ b/tests/share/applications/meson.build
@@ -1,2 +1,2 @@
-configure_file(input: 'furrfix.desktop', output: '@PLAINNAME@', copy: true)
-configure_file(input: 'mimeinfo.cache', output: '@PLAINNAME@', copy: true)
+configure_file(input: 'furrfix.desktop', output: '@PLAINNAME@', copy: true, install: enable_installed_tests, install_dir: installed_tests_data_dir / 'share' / 'applications')
+configure_file(input: 'mimeinfo.cache', output: '@PLAINNAME@', copy: true, install: enable_installed_tests, install_dir: installed_tests_data_dir / 'share' / 'applications')
@@ -2,29 +2,48 @@
lib,
buildPythonPackage,
fetchPypi,
nose,
pytestCheckHook,
fetchpatch2,
six,
setuptools,
}:
buildPythonPackage rec {
pname = "scales";
version = "1.0.9";
format = "setuptools";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "8b6930f7d4bf115192290b44c757af5e254e3fcfcb75ff9a51f5c96a404e2753";
hash = "sha256-i2kw99S/EVGSKQtEx1evXiVOP8/Ldf+aUfXJakBOJ1M=";
};
nativeCheckInputs = [ nose ];
propagatedBuildInputs = [ six ];
patches = [
# Use html module in Python 3 and cgi module in Python 2
# https://github.com/Cue/scales/pull/47
(fetchpatch2 {
url = "https://github.com/Cue/scales/commit/ee69d45f1a7f928f7b241702e9be06007444115e.patch?full_index=1";
hash = "sha256-xBlgkh1mf+3J7GtNI0zGb7Sum8UYbTpUmM12sxK/fSU=";
})
];
# No tests included
doCheck = false;
postPatch = ''
for file in scales_test formats_test aggregation_test; do
substituteInPlace src/greplin/scales/$file.py \
--replace-fail "assertEquals" "assertEqual"
done;
'';
meta = with lib; {
build-system = [ setuptools ];
dependencies = [ six ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
description = "Stats for Python processes";
homepage = "https://www.github.com/Cue/scales";
license = licenses.asl20;
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pyrox0 ];
};
}
@@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "soco";
version = "0.30.4";
version = "0.30.5";
pyproject = true;
disabled = pythonOlder "3.6";
@@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "SoCo";
repo = "SoCo";
rev = "refs/tags/v${version}";
hash = "sha256-t5Cxlm5HhN6WY6ty4i2MAtqjbC7DwZqSp1g5nybFAH4=";
hash = "sha256-Lw/VXEfIb+avRpQHcy0TVhWDjdGQlHHtVs2gZZkAAM4=";
};
build-system = [ setuptools ];
+3
View File
@@ -47,6 +47,9 @@ let
xiaomi_miio = [
arrow
];
zeroconf = [
aioshelly
];
zha = [
pydeconz
];
+40 -6
View File
@@ -1,14 +1,20 @@
{ lib, stdenv, fetchFromGitHub, postgresql }:
{
lib,
stdenv,
fetchFromGitHub,
postgresql,
postgresqlTestHook,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "rum";
version = "1.3.13";
version = "1.3.14";
src = fetchFromGitHub {
owner = "postgrespro";
repo = "rum";
rev = version;
hash = "sha256-yy2xeDnk3fENN+En0st4mv60nZlqPafIzwf68jwJ5fE=";
rev = finalAttrs.version;
hash = "sha256-VsfpxQqRBu9bIAP+TfMRXd+B3hSjuhU2NsutocNiCt8=";
};
buildInputs = [ postgresql ];
@@ -21,6 +27,34 @@ stdenv.mkDerivation rec {
install -D -t $out/share/postgresql/extension *.sql
'';
passthru.tests.extension = stdenv.mkDerivation {
inherit (finalAttrs) version;
pname = "rum-test";
dontUnpack = true;
doCheck = true;
nativeCheckInputs = [
postgresqlTestHook
(postgresql.withPackages (_: [ finalAttrs.finalPackage ]))
];
failureHook = "postgresqlStop";
postgresqlTestUserOptions = "LOGIN SUPERUSER";
passAsFile = [ "sql" ];
sql = ''
CREATE EXTENSION rum;
CREATE TABLE test_table (t text, v tsvector);
CREATE INDEX test_table_rumindex ON test_table USING rum (v rum_tsvector_ops);
'';
checkPhase = ''
runHook preCheck
psql -a -v ON_ERROR_STOP=1 -f $sqlPath
runHook postCheck
'';
installPhase = "touch $out";
};
meta = with lib; {
description = "Full text search index method for PostgreSQL";
homepage = "https://github.com/postgrespro/rum";
@@ -28,4 +62,4 @@ stdenv.mkDerivation rec {
platforms = postgresql.meta.platforms;
maintainers = with maintainers; [ DeeUnderscore ];
};
}
})
+2 -2
View File
@@ -2,11 +2,11 @@
stdenvNoCC.mkDerivation rec {
pname = "mediawiki";
version = "1.42.1";
version = "1.42.3";
src = fetchurl {
url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz";
hash = "sha256-7IevlaNd0Jw01S4CeVZSoDCrcpVeQx8IynIqc3N+ulM=";
hash = "sha256-4FVjA/HYRnnNk5sykMyrP4nLxp02B/8dRJymxZU7ILw=";
};
postPatch = ''
-2
View File
@@ -125,8 +125,6 @@ with pkgs;
ld-library-path = callPackage ./ld-library-path {};
macOSSierraShared = callPackage ./macos-sierra-shared {};
cross = callPackage ./cross {} // { __attrsFailEvaluation = true; };
php = recurseIntoAttrs (callPackages ./php {});
-90
View File
@@ -1,90 +0,0 @@
{ lib, clangStdenv, clang-sierraHack-stdenv, stdenvNoCC }:
let
makeBigExe = stdenv: prefix: rec {
count = 320;
sillyLibs = lib.genList (i: stdenv.mkDerivation rec {
name = "${prefix}-fluff-${toString i}";
unpackPhase = ''
src=$PWD
cat << 'EOF' > ${name}.c
unsigned int asdf_${toString i}(void) {
return ${toString i};
}
EOF
'';
buildPhase = ''
$CC -std=c99 -shared ${name}.c -o lib${name}.dylib -Wl,-install_name,$out/lib/lib${name}.dylib
'';
installPhase = ''
mkdir -p "$out/lib"
mv lib${name}.dylib "$out/lib"
'';
meta.platforms = lib.platforms.darwin;
}) count;
finalExe = stdenv.mkDerivation {
name = "${prefix}-final-asdf";
unpackPhase = ''
src=$PWD
cat << 'EOF' > main.cxx
#include <cstdlib>
#include <iostream>
${toString (lib.genList (i: "extern \"C\" unsigned int asdf_${toString i}(void); ") count)}
unsigned int (*funs[])(void) = {
${toString (lib.genList (i: "asdf_${toString i},") count)}
};
int main(int argc, char **argv) {
bool ret;
unsigned int i = 0;
for (auto f : funs) {
if (f() != i++) {
std::cerr << "Failed to get expected response from function #" << i << std::endl;
return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
}
EOF
'';
buildPhase = ''
$CXX -std=c++11 main.cxx ${toString (map (x: "-l${x.name}") sillyLibs)} -o ${prefix}-asdf
'';
buildInputs = sillyLibs;
installPhase = ''
mkdir -p "$out/bin"
mv ${prefix}-asdf "$out/bin"
'';
meta.platforms = lib.platforms.darwin;
};
};
good = makeBigExe clang-sierraHack-stdenv "good";
bad = makeBigExe clangStdenv "bad";
in stdenvNoCC.mkDerivation {
name = "macos-sierra-shared-test";
buildInputs = [ good.finalExe bad.finalExe ];
# TODO(@Ericson2314): Be impure or require exact MacOS version of builder?
buildCommand = ''
if bad-asdf &> /dev/null
then echo "WARNING: bad-asdf did not fail, not running on sierra?" >&2
else echo "bad-asdf should fail on sierra, OK" >&2
fi
# Must succeed on all supported MacOS versions
good-asdf
echo "good-asdf should succeed on sierra, OK"
touch $out
'';
meta.platforms = lib.platforms.darwin;
}
+470 -548
View File
File diff suppressed because it is too large Load Diff
+4 -6
View File
@@ -19,23 +19,21 @@
}:
rustPlatform.buildRustPackage rec {
pname = "edgedb";
version = "5.3.0";
version = "5.4.1";
src = fetchFromGitHub {
owner = "edgedb";
repo = "edgedb-cli";
rev = "refs/tags/v${version}";
hash = "sha256-oG3KxORNppQDa84CXjSxM9Z9GDLby+irUbEncyjoJU4=";
hash = "sha256-qythVPcNijYmdH/IvyoYZIB8WfYiB8ByYLz+VuWGRAM=";
fetchSubmodules = true;
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"edgedb-derive-0.5.2" = "sha256-9vmaMOoZ5VmbJ0/eN0XdE5hrID/BK4IkLnIwucgRr2w=";
"edgeql-parser-0.1.0" = "sha256-WUNiUgfuzbr+zNYgJivalUK5kPSvkVcgp4Zq3pmoa/w=";
"indexmap-2.0.0-pre" = "sha256-QMOmoUHE1F/sp+NeDpgRGqqacWLHWG02YgZc5vAdXZY=";
"rustyline-8.0.0" = "sha256-CrICwQbHPzS4QdVIEHxt2euX+g+0pFYe84NfMp1daEc=";
"edgedb-derive-0.5.2" = "sha256-mKgJ0Jge/eZHCT89BEOR4/Pzbu63UUoeHSp7w9GgANs=";
"edgeql-parser-0.1.0" = "sha256-v3B7aKEVWweTXxdl6GfutdqHGw+qkI6OPZw7OBPVn0w=";
"rexpect-0.5.0" = "sha256-vstAL/fJWWx7WbmRxNItKpzvgGF3SvJDs5isq9ym/OA=";
"serde_str-1.0.0" = "sha256-CMBh5lxdQb2085y0jc/DrV6B8iiXvVO2aoZH/lFFjak=";
"scram-0.7.0" = "sha256-QTPxyXBpMXCDkRRJEMYly1GKp90khrwwuMI1eHc2H+Y=";
+8 -1
View File
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchgit, autoreconfHook, ffmpeg, flac, libvorbis, libogg, libid3tag, libexif, libjpeg, sqlite, gettext, nixosTests, zlib }:
{ lib, stdenv, fetchgit, fetchpatch2, autoreconfHook, ffmpeg, flac, libvorbis, libogg, libid3tag, libexif, libjpeg, sqlite, gettext, nixosTests, zlib }:
let
pname = "minidlna";
@@ -13,6 +13,13 @@ stdenv.mkDerivation {
hash = "sha256-InsSguoGi1Gp8R/bd4/c16xqRuk0bRsgw7wvcbokgKo=";
};
patches = [
(fetchpatch2 {
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/minidlna/-/raw/affcf0dd1e6f8e33d0ba90b2b0733736fa1aeb71/ffmpeg7.patch";
hash = "sha256-MZFPY4FywoMkZ//fKml6o5J1QG5qiScgtI+KFw5hENw=";
})
];
preConfigure = ''
export makeFlags="INSTALLPREFIX=$out"
'';
+1 -4
View File
@@ -62,11 +62,8 @@ let
let
enableFeaturePinentry =
f: lib.enableFeature (lib.elem f buildFlavors) ("pinentry-" + flavorInfo.${f}.flag);
pinentryMkDerivation =
if (lib.elem "qt5" buildFlavors) then libsForQt5.mkDerivation else stdenv.mkDerivation;
in
pinentryMkDerivation rec {
stdenv.mkDerivation rec {
pname = "pinentry-${pinentryExtraPname}";
version = "1.3.1";
+2 -2
View File
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "LanguageTool";
version = "6.4";
version = "6.5";
src = fetchzip {
url = "https://www.languagetool.org/download/${pname}-${version}.zip";
sha256 = "sha256-MIP7+K3kmzrqXWcR23Rn+gMYR0zrGnnCYGhv81P2Pc4=";
sha256 = "sha256-+ZZF/k3eTKT2KbWsk5jJtsdcbkOH90ytlSEEdJ2EMbU=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
+3 -3
View File
@@ -2,18 +2,18 @@
buildGoModule rec {
pname = "miller";
version = "6.12.0";
version = "6.13.0";
src = fetchFromGitHub {
owner = "johnkerl";
repo = "miller";
rev = "v${version}";
sha256 = "sha256-0M9wdKn6SdqNAcEcIb4mkkDCUBYQ/mW+0OYt35vq9yw=";
sha256 = "sha256-eHiYIw/sQMXLow2Vy4zFTGeON28LmG0pK2Uca4ooInU=";
};
outputs = [ "out" "man" ];
vendorHash = "sha256-WelwnwsdOhAq4jdmFAYvh4lDMsmaAItdrbC//MfWHjU=";
vendorHash = "sha256-oc6Lp4rQ+MLmQDVcuNJ3CqYH277Vuuwu4zSSO2ICXsw=";
postInstall = ''
mkdir -p $man/share/man/man1
+2
View File
@@ -264,6 +264,8 @@ mapAliases {
cloog_0_18_0 = throw "cloog_0_18_0 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13
cloogppl = throw "cloogppl has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13
clang-ocl = throw "'clang-ocl' has been replaced with 'rocmPackages.clang-ocl'"; # Added 2023-10-08
clang-sierraHack = throw "clang-sierraHack has been removed because it solves a problem that no longer seems to exist. Hey, what were you even doing with that thing anyway?"; # Added 2024-10-05
clang-sierraHack-stdenv = clang-sierraHack; # Added 2024-10-05
inherit (libsForQt5.mauiPackages) clip; # added 2022-05-17
clpm = throw "'clpm' has been removed from nixpkgs"; # Added 2024-04-01
clwrapperFunction = throw "Lisp packages have been redesigned. See 'lisp-modules' in the nixpkgs manual."; # Added 2024-05-07
-8
View File
@@ -14381,13 +14381,6 @@ with pkgs;
libclang = llvmPackages.libclang;
clang-manpages = llvmPackages.clang-manpages;
clang-sierraHack = clang.override {
name = "clang-wrapper-with-reexport-hack";
bintools = darwin.binutils.override {
useMacosReexportHack = true;
};
};
clang = llvmPackages.clang;
clang_12 = llvmPackages_12.clang;
clang_13 = llvmPackages_13.clang;
@@ -14410,7 +14403,6 @@ with pkgs;
#Use this instead of stdenv to build with clang
clangStdenv = if stdenv.cc.isClang then stdenv else lowPrio llvmPackages.stdenv;
clang-sierraHack-stdenv = overrideCC stdenv buildPackages.clang-sierraHack;
libcxxStdenv = if stdenv.hostPlatform.isDarwin then stdenv else lowPrio llvmPackages.libcxxStdenv;
clean = callPackage ../development/compilers/clean { };