summary refs log tree commit diff
path: root/pkgs/os-specific/linux/light
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-17 10:12:24 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-17 10:12:24 +0100
commit47fabead8086049aa278cacc3c6c5d0de84d386b (patch)
tree6a4d4b19c8b225b75e63689d96e336076765a6e9 /pkgs/os-specific/linux/light
parent6323f3ccbaa5bacf5a62244c3ad6fca065f319d4 (diff)
light: pull upstream fix for -fno-common toolchains
Without the change ubuild fails on gcc-10 as:

    ld: impl/light-razer.o:/build/source/src/helpers.h:24: multiple definition of
      `light_loglevel'; light-main.o:/build/source/src/helpers.h:24: first defined here
Diffstat (limited to 'pkgs/os-specific/linux/light')
-rw-r--r--pkgs/os-specific/linux/light/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/light/default.nix b/pkgs/os-specific/linux/light/default.nix
index 995381c53403c..6caa8e3945086 100644
--- a/pkgs/os-specific/linux/light/default.nix
+++ b/pkgs/os-specific/linux/light/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, autoreconfHook, coreutils }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, coreutils }:
 
 stdenv.mkDerivation rec {
   version = "1.2.2";
@@ -10,6 +10,16 @@ stdenv.mkDerivation rec {
     sha256 = "1a70zcf88ifsnwll486aicjnh48zisdf8f7vi34ihw61kdadsq9s";
   };
 
+  patches = [
+    # Pull upstream fix for -fno-common toolchains:
+    #  https://github.com/haikarainen/light/pull/135
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/haikarainen/light/commit/eae912ca7ff3356805e47739114861d2b6ae7ec0.patch";
+      sha256 = "15jp8hm5scl0myiy1jmvd6m52lhx5jscvi3rgb5siwakmnkgzx9j";
+    })
+  ];
+
   configureFlags = [ "--with-udev" ];
 
   nativeBuildInputs = [ autoreconfHook ];