From 264e99b951d060d587026636e7825b04beb99df9 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 28 May 2022 20:40:40 +0100 Subject: pommed_light: pull fix pending upstream inclusion for -fno-common toolchains Without the change builds fails on upstream gcc-10 as: ld: mactel/nv8600mgt_backlight.o:/build/pommed-light/pommed/mactel/nv8600mgt_backlight.c:50: multiple definition of `lcd_bck_info'; sysfs_backlight.o:/build/pommed-light/pommed/sysfs_backlight.c:124: first defined here --- pkgs/os-specific/linux/pommed-light/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pkgs/os-specific/linux/pommed-light') diff --git a/pkgs/os-specific/linux/pommed-light/default.nix b/pkgs/os-specific/linux/pommed-light/default.nix index e86658ccb0a..113cedfab2e 100644 --- a/pkgs/os-specific/linux/pommed-light/default.nix +++ b/pkgs/os-specific/linux/pommed-light/default.nix @@ -1,5 +1,6 @@ { lib, stdenv , fetchFromGitHub +, fetchpatch , pciutils , libconfuse , alsa-lib @@ -20,6 +21,16 @@ stdenv.mkDerivation rec { sha256 = "18fvdwwhcl6s4bpf2f2i389s71c8k4g0yb81am9rdddqmzaw27iy"; }; + patches = [ + # Pull fix pending upstream inclusion for -fno-common toolchain support: + # https://github.com/bytbox/pommed-light/pull/38 + (fetchpatch { + name = "fno-common.patch"; + url = "https://github.com/bytbox/pommed-light/commit/5848b49b45a9c3ab047ebd17deb2162daab1e0b8.patch"; + sha256 = "15rsq2i4rqp4ssab20486a1wgxi2cp87b7nxyk9h23gdwld713vf"; + }) + ]; + postPatch = '' substituteInPlace pommed.conf.mactel --replace /usr $out substituteInPlace pommed.conf.pmac --replace /usr $out -- cgit 1.4.1