about summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-04-08 20:28:34 +0200
committerAlyssa Ross <hi@alyssa.is>2024-05-28 12:49:16 +0200
commit4bf323a2cf5355db2fe450ce8bd7cad468f98625 (patch)
tree578126a3ab6be104c78e2091e8e71143e6e9ccf2 /pkgs/development/libraries
parent1a5ef41b84b333d2effe424111fe037846679f35 (diff)
motif: fix build with clang
Fixes: https://github.com/NixOS/nixpkgs/issues/302449
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/motif/default.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/development/libraries/motif/default.nix b/pkgs/development/libraries/motif/default.nix
index 083c839ec5574..a55c0ecdab0b4 100644
--- a/pkgs/development/libraries/motif/default.nix
+++ b/pkgs/development/libraries/motif/default.nix
@@ -38,6 +38,27 @@ stdenv.mkDerivation rec {
       url = "https://raw.githubusercontent.com/void-linux/void-packages/b9a1110dabb01c052dadc1abae1413bd4afe3652/srcpkgs/motif/patches/02-${name}";
       sha256 = "13vzpf8yxvhf4gl7q0yzlr6ak1yzx382fsqsrv5lc8jbbg4nwrrq";
     })
+    (fetchpatch {
+      name = "missing-headers.patch";
+      url = "https://gitlab.freedesktop.org/xorg/lib/libxpm/-/commit/4cedf181bcfe13e5d206554c51edb82cb17e7ad5.patch";
+      extraPrefix = "lib/Xm/";
+      stripLen = 2;
+      hash = "sha256-WlagHOgf2gZDxXN+SSEW6de1FuN4fbpd9zviMwo1+HI=";
+    })
+    (fetchurl {
+      name = "noreturn.patch";
+      url = "https://dev.gentoo.org/~ulm/distfiles/motif-2.3.8-patches-5.tar.xz";
+      downloadToTemp = true;
+      postFetch = ''
+        tar -xOf $downloadedFile patch/12_all_noreturn.patch > $out
+      '';
+      hash = "sha256-FyaBfqD/TuJVFFHZlp1/b1MyL8BJAfV43ktuusgxbfE=";
+    })
+    (fetchpatch {
+      url = "https://raw.githubusercontent.com/macports/macports-ports/acc8c7cb2247d9892bf5a52eb92431a4c0c8e1cd/x11/openmotif/files/wcs-functions.patch";
+      extraPrefix = "";
+      hash = "sha256-w3zCUs/RbnRoUJ0sNCI00noEOkov/IGV/zIygakSQqc=";
+    })
   ];
 
   enableParallelBuilding = true;
@@ -48,5 +69,6 @@ stdenv.mkDerivation rec {
     platforms = platforms.unix;
     license = with licenses; [ lgpl21Plus ];
     maintainers = with maintainers; [ qyliss ];
+    broken = demoSupport && stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16";
   };
 }