about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-28 17:23:12 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-28 17:23:12 +0100
commit7327069eccb47fb947e2a80d8b93ea8a8c8c0553 (patch)
treec34efbe9e4a1cc537793be49b6c5b1ac2b5c1143
parent17b62c338f2a0862a58bb6951556beecd98ccda9 (diff)
pflask: pull fix pending upstream inclusion for -fno-common support
Without the change build fails on upstream gcc-10 as:

    ld: src/util.c.1.o:/build/pflask/build/../src/printf.h:42: multiple definition of
      `use_syslog'; src/cgroup.c.1.o:/build/pflask/build/../src/printf.h:42: first defined here
-rw-r--r--pkgs/os-specific/linux/pflask/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/pflask/default.nix b/pkgs/os-specific/linux/pflask/default.nix
index deb3e06ca49d2..1270a9b9494f5 100644
--- a/pkgs/os-specific/linux/pflask/default.nix
+++ b/pkgs/os-specific/linux/pflask/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, python3, wafHook }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, python3, wafHook }:
 
 stdenv.mkDerivation rec {
   pname = "pflask";
@@ -11,6 +11,16 @@ stdenv.mkDerivation rec {
     hash = "sha256-bAKPUj/EipZ98kHbZiFZZI3hLVMoQpCrYKMmznpSDhg=";
   };
 
+  patches = [
+    # Pull patch pending upstream inclusion for -fno-common toolchain support:
+    #  https://github.com/ghedo/pflask/pull/30
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/ghedo/pflask/commit/73ba32ec48e1e0e4a56b1bceed4635711526e079.patch";
+      hash = "sha256-KVuBS7LbYJQv6NXljpSiGGja7ar7W6A6SKzkEjB1B6U=";
+    })
+  ];
+
   nativeBuildInputs = [ python3 wafHook ];
 
   postInstall = ''