about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2023-11-19 18:53:28 +0200
committerGitHub <noreply@github.com>2023-11-19 18:53:28 +0200
commit38b1656c2d775b6abc6d08cfc8f38b8847a73ec4 (patch)
treee266b45b06ad7558d993abc135673f348f6fa139 /pkgs
parent5d7b00e664eb192cc447743da43ccf3082f66e70 (diff)
parent911e746520af0e4ef52044fc3c3f0aa4c4a26dbd (diff)
Merge pull request #268227 from philiptaron/fix-squeak-build
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/squeak/default.nix51
-rw-r--r--pkgs/top-level/all-packages.nix4
2 files changed, 45 insertions, 10 deletions
diff --git a/pkgs/development/compilers/squeak/default.nix b/pkgs/development/compilers/squeak/default.nix
index 79627eba7c839..0494539c4435c 100644
--- a/pkgs/development/compilers/squeak/default.nix
+++ b/pkgs/development/compilers/squeak/default.nix
@@ -1,15 +1,40 @@
-{ lib, stdenv, fetchFromGitHub, fetchurl, fetchzip
-, autoconf, automake, autoreconfHook, clang, dos2unix, file, perl
+{ lib
+, stdenv
+, fetchFromGitHub
+, fetchurl
+, fetchzip
+, autoconf
+, automake
+, autoreconfHook
+, dos2unix
+, file
+, perl
 , pkg-config
-, alsa-lib, coreutils, freetype, glib, glibc, gnugrep, libGL, libpulseaudio
-, libtool, libuuid, openssl, pango, xorg
-, squeakImageHash ? null, squeakSourcesHash ? null, squeakSourcesVersion ? null
-, squeakVersion ? null, squeakVmCommitHash ? null, squeakVmCommitHashHash ? null
+, alsa-lib
+, coreutils
+, freetype
+, glib
+, glibc
+, gnugrep
+, libGL
+, libpulseaudio
+, libtool
+, libuuid
+, openssl
+, pango
+, xorg
+, squeakImageHash ? null
+, squeakSourcesHash ? null
+, squeakSourcesVersion ? null
+, squeakVersion ? null
+, squeakVmCommitHash ? null
+, squeakVmCommitHashHash ? null
 , squeakVmVersion ? null
 } @ args:
 
 let
-  inherit (builtins) elemAt;
+  inherit (builtins) elemAt toString;
+
   nullableOr = o: default: if o == null then default else o;
 
   bits = stdenv.hostPlatform.parsed.cpu.bits;
@@ -75,7 +100,6 @@ in stdenv.mkDerivation {
     autoconf
     automake
     autoreconfHook
-    clang
     dos2unix
     file
     perl
@@ -140,7 +164,16 @@ in stdenv.mkDerivation {
   # Workaround build failure on -fno-common toolchains:
   #   ld: vm/vm.a(cogit.o):spur64src/vm/cogitX64SysV.c:2552: multiple definition of
   #       `traceStores'; vm/vm.a(gcc3x-cointerp.o):spur64src/vm/cogit.h:140: first defined here
-  env.NIX_CFLAGS_COMPILE = "-fcommon";
+  env.NIX_CFLAGS_COMPILE = toString (
+    [ "-fcommon" ]
+    ++ (lib.optionals stdenv.cc.isClang [
+      # LLVM 16 turned these into errors (rightly, perhaps.)
+      # Allow this package to continue to build despite this change.
+      "-Wno-error=int-conversion"
+      "-Wno-error=implicit-function-declaration"
+      "-Wno-error=incompatible-function-pointer-types"
+    ])
+  );
 
   preAutoreconf = ''
     pushd ./platforms/unix/config > /dev/null
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 1f23b6177198b..385cb3a0ce274 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -17273,7 +17273,9 @@ with pkgs;
     inherit (darwin.apple_sdk.frameworks) SystemConfiguration CoreFoundation Security;
   };
 
-  squeak = callPackage ../development/compilers/squeak { };
+  squeak = callPackage ../development/compilers/squeak {
+    stdenv = clangStdenv;
+  };
 
   squirrel-sql = callPackage ../development/tools/database/squirrel-sql {
     drivers = [ jtds_jdbc mssql_jdbc mysql_jdbc postgresql_jdbc ];