Skip to content

Commit

Permalink
use runCommandLocal
Browse files Browse the repository at this point in the history
  • Loading branch information
jinluchang committed Feb 17, 2025
1 parent 08e12d9 commit 0666d97
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions nixGL.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ nvidiaVersionFile ? null,
# This is one by default, you can switch it to off if you want to reduce a
# bit the size of nixGL closure.
enable32bits ? stdenv.hostPlatform.isx86
, stdenv, writeTextFile, shellcheck, pcre, runCommand, linuxPackages
, stdenv, writeTextFile, shellcheck, pcre, runCommand, runCommandLocal, linuxPackages
, fetchurl, lib, runtimeShell, bumblebee, libglvnd, vulkan-validation-layers
, mesa, libvdpau-va-gl, intel-media-driver, pkgsi686Linux, driversi686Linux
, zlib, libdrm, xorg, wayland, gcc, zstd }:
Expand Down Expand Up @@ -217,12 +217,10 @@ let
#
# builtins.readFile is not able to read /proc files. See
# https://github.com/NixOS/nix/issues/3539.
runCommand "impure-nvidia-version-file" {
runCommandLocal "impure-nvidia-version-file" {
# To avoid sharing the build result over time or between machine,
# Add an impure parameter to force the rebuild on each access.
time = builtins.currentTime;
preferLocalBuild = true;
allowSubstitutes = false;
} "cp /proc/driver/nvidia/version $out 2> /dev/null || touch $out";

# The nvidia version. Either fixed by the `nvidiaVersion` argument, or
Expand Down

0 comments on commit 0666d97

Please sign in to comment.