Merge #214010: staging-next 2023-02-01

This commit is contained in:
Vladimír Čunát 2023-02-13 15:42:23 +01:00
commit f1f9ae6a3b
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
297 changed files with 2891 additions and 2086 deletions

View file

@ -2,7 +2,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
name = "systemd-cryptenroll"; name = "systemd-cryptenroll";
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ ymatsiuk ]; maintainers = [ ymatsiuk ];
broken = true; # times out after two hours, details -> https://github.com/NixOS/nixpkgs/issues/167994
}; };
nodes.machine = { pkgs, lib, ... }: { nodes.machine = { pkgs, lib, ... }: {

View file

@ -18,6 +18,12 @@ stdenv.mkDerivation rec {
lv2 libX11 libGL libGLU mesa lv2 libX11 libGL libGLU mesa
]; ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
"-Wno-error=stringop-overflow"
];
installPhase = '' installPhase = ''
mkdir -p $out/lib/lv2 mkdir -p $out/lib/lv2
cp -r aether.lv2 $out/lib/lv2 cp -r aether.lv2 $out/lib/lv2

View file

@ -66,6 +66,10 @@ stdenv.mkDerivation rec {
fetchSubmodules = true; fetchSubmodules = true;
}; };
postPatch = ''
sed '1i#include <memory>' -i Source/TitleBar.h # gcc12
'';
cmakeBuildType = "Release"; cmakeBuildType = "Release";
cmakeFlags = lib.optionals enableVST2 [ "-DBESPOKE_VST2_SDK_LOCATION=${vst-sdk}/VST2_SDK" ]; cmakeFlags = lib.optionals enableVST2 [ "-DBESPOKE_VST2_SDK_LOCATION=${vst-sdk}/VST2_SDK" ];

View file

@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
sha256 = "17x4hylgq4dn9qycsdacfxy64f5cv57n2qgkvsdp524gnqzw4az3"; sha256 = "17x4hylgq4dn9qycsdacfxy64f5cv57n2qgkvsdp524gnqzw4az3";
}; };
outputs = [ "out" "doc" ];
enableParallelBuilding = true; enableParallelBuilding = true;
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];

View file

@ -63,6 +63,12 @@ stdenv.mkDerivation rec {
"-DWARNINGS_ARE_ERRORS=ON" "-DWARNINGS_ARE_ERRORS=ON"
]; ];
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but breaks on darwin (with clang) or aarch64 (old gcc)
"-Wno-error=mismatched-new-delete"
"-Wno-error=use-after-free"
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a # Normal CMake install phase on Darwin only installs the binary, the user is expected to use CPack to build a
# bundle. That adds alot of overhead for not much benefit (CPack is currently abit broken, and needs impure access # bundle. That adds alot of overhead for not much benefit (CPack is currently abit broken, and needs impure access

View file

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ libjack2 ladspaH gtk2 alsa-lib libxml2 lrdf ]; buildInputs = [ libjack2 ladspaH gtk2 alsa-lib libxml2 lrdf ];
NIX_LDFLAGS = "-ldl -lm -lpthread"; NIX_LDFLAGS = "-lm -lpthread";
meta = { meta = {
description = ''An effects "rack" for the JACK low latency audio API''; description = ''An effects "rack" for the JACK low latency audio API'';

View file

@ -21,8 +21,6 @@ stdenv.mkDerivation rec {
# `l_notebook1'; jamin-callbacks.o:/build/jamin-0.95.0/src/hdeq.h:64: first defined here # `l_notebook1'; jamin-callbacks.o:/build/jamin-0.95.0/src/hdeq.h:64: first defined here
NIX_CFLAGS_COMPILE = "-fcommon"; NIX_CFLAGS_COMPILE = "-fcommon";
NIX_LDFLAGS = "-ldl";
postInstall = '' postInstall = ''
wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa
''; '';

View file

@ -4,19 +4,21 @@
, ladspaH, php, libXrandr }: , ladspaH, php, libXrandr }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "lsp-plugins"; pname = "lsp-plugins";
version = "1.2.5"; version = "1.2.5";
src = fetchurl { src = fetchurl {
url = "https://github.com/sadko4u/${pname}/releases/download/${version}/${pname}-src-${version}.tar.gz"; url = "https://github.com/sadko4u/${pname}/releases/download/${version}/${pname}-src-${version}.tar.gz";
sha256 = "sha256-YYrt+FbpY7iEui0aw4Ce94BW1SHDk0OH8gFSzkW2fkw="; sha256 = "sha256-YYrt+FbpY7iEui0aw4Ce94BW1SHDk0OH8gFSzkW2fkw=";
}; };
nativeBuildInputs = [ pkg-config php makeWrapper ]; outputs = [ "out" "dev" "doc" ];
buildInputs = [ jack2 libsndfile libGLU libGL lv2 cairo ladspaH libXrandr ];
makeFlags = [ nativeBuildInputs = [ pkg-config php makeWrapper ];
"PREFIX=${placeholder "out"}" buildInputs = [ jack2 libsndfile libGLU libGL lv2 cairo ladspaH libXrandr ];
makeFlags = [
"PREFIX=${placeholder "out"}"
]; ];
NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL"; NIX_CFLAGS_COMPILE = "-DLSP_NO_EXPERIMENTAL";

View file

@ -38,6 +38,11 @@ stdenv.mkDerivation rec {
pcre2 pcre2
] ++ lib.optional pulseaudioSupport libpulseaudio; ] ++ lib.optional pulseaudioSupport libpulseaudio;
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=free-nonheap-object"
];
postInstall = '' postInstall = ''
wrapProgram $out/bin/mimic \ wrapProgram $out/bin/mimic \
--run "export ALSA_PLUGIN_DIR=${alsa-plugins}/lib/alsa-lib" --run "export ALSA_PLUGIN_DIR=${alsa-plugins}/lib/alsa-lib"

View file

@ -18,11 +18,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mpg123"; pname = "mpg123";
version = "1.29.3"; version = "1.31.2";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2"; url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.bz2";
sha256 = "sha256-ljiF2Mx3Ji8ot3GHx9GJ4yGV5kJE3iUwt5jd8yGD6Ec="; sha256 = "sha256-sX8ikF4x9DtrQB399qce0Ru30Fb2jbRJ1wufmug5x94=";
}; };
outputs = [ "out" ] ++ lib.optionals withConplay [ "conplay" ]; outputs = [ "out" ] ++ lib.optionals withConplay [ "conplay" ];

View file

@ -28,6 +28,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-N96Nb7G6hqfh8DyMtHbttl/fRZUkS8f2KfPSqeMAhHY="; sha256 = "sha256-N96Nb7G6hqfh8DyMtHbttl/fRZUkS8f2KfPSqeMAhHY=";
}; };
postPatch = ''
sed '1i#include <utility>' -i \
libs/JUCELV2/modules/juce_gui_basics/windows/juce_ComponentPeer.h # gcc12
'';
nativeBuildInputs = [ nativeBuildInputs = [
cmake cmake
pkg-config pkg-config

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, pkg-config, openssl, libogg, libopus }: { lib, stdenv, fetchurl, pkg-config, openssl, libogg, libopus, fetchpatch }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "opusfile"; pname = "opusfile";
@ -12,7 +12,14 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl libogg ]; buildInputs = [ openssl libogg ];
propagatedBuildInputs = [ libopus ]; propagatedBuildInputs = [ libopus ];
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
patches = [ ./include-multistream.patch ] patches = [
./include-multistream.patch
(fetchpatch {
name = "CVE-2022-47021.patch";
url = "https://github.com/xiph/opusfile/commit/0a4cd796df5b030cb866f3f4a5e41a4b92caddf5.patch";
sha256 = "sha256-XThI/ys5caB+OncFVfxm5IsvQPy1MbLQKwIlYjPvTJQ=";
})
]
# fixes problem with openssl 1.1 dependency # fixes problem with openssl 1.1 dependency
# see https://github.com/xiph/opusfile/issues/13 # see https://github.com/xiph/opusfile/issues/13
++ lib.optionals stdenv.hostPlatform.isWindows [ ./disable-cert-store.patch ]; ++ lib.optionals stdenv.hostPlatform.isWindows [ ./disable-cert-store.patch ];

View file

@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
fetchSubmodules = true; fetchSubmodules = true;
}; };
postPatch = ''
sed '1i#include <utility>' -i \
lib/JUCE/modules/juce_gui_basics/windows/juce_ComponentPeer.h # gcc12
'';
nativeBuildInputs = [ cmake pkg-config ]; nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ buildInputs = [

View file

@ -8,11 +8,11 @@
stdenv.mkDerivation (rec { stdenv.mkDerivation (rec {
pname = "ed"; pname = "ed";
version = "1.18"; version = "1.19";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/ed/${pname}-${version}.tar.lz"; url = "mirror://gnu/ed/${pname}-${version}.tar.lz";
sha256 = "sha256-rKjvrZgAxYdySiC5eqj8R+a1pH34Fgb+q6gxsHRGK08="; hash = "sha256-zi8uXEJHkKqW0J2suT2bv9wLfrYknJy3U4RS6Ox3zUg=";
}; };
nativeBuildInputs = [ lzip ]; nativeBuildInputs = [ lzip ];

View file

@ -80,13 +80,13 @@ in stdenv.mkDerivation rec {
moveToOutput share/vim "$out" moveToOutput share/vim "$out"
''; '';
# Prevent tclPackageHook from auto-wrapping all binaries, we only
# need to wrap poke-gui
dontWrapTclBinaries = true;
postFixup = lib.optionalString guiSupport '' postFixup = lib.optionalString guiSupport ''
wrapProgram "$out/bin/poke-gui" \ wrapProgram "$out/bin/poke-gui" \
--prefix TCLLIBPATH ' ' "$TCLLIBPATH" --prefix TCLLIBPATH ' ' "$TCLLIBPATH"
# Prevent tclPackageHook from auto-wrapping all binaries, we only
# need to wrap poke-gui
unset TCLLIBPATH
''; '';
passthru = { passthru = {

View file

@ -117,6 +117,10 @@ stdenv.mkDerivation rec {
--subst-var-by mamePath "$out/opt/mame" --subst-var-by mamePath "$out/opt/mame"
''; '';
NIX_CFLAGS_COMPILE = [
"-Wno-error=use-after-free"
];
desktopItems = [ desktopItems = [
(makeDesktopItem { (makeDesktopItem {
name = "MAME"; name = "MAME";

View file

@ -1,4 +1,4 @@
{ gcc11Stdenv, lib, fetchFromGitHub, wrapQtAppsHook, cmake, pkg-config, git { gcc12Stdenv, lib, fetchFromGitHub, wrapQtAppsHook, cmake, pkg-config, git
, qtbase, qtquickcontrols, qtmultimedia, openal, glew, vulkan-headers, vulkan-loader, libpng , qtbase, qtquickcontrols, qtmultimedia, openal, glew, vulkan-headers, vulkan-loader, libpng
, ffmpeg, libevdev, libusb1, zlib, curl, wolfssl, python3, pugixml, faudio, flatbuffers , ffmpeg, libevdev, libusb1, zlib, curl, wolfssl, python3, pugixml, faudio, flatbuffers
, sdl2Support ? true, SDL2 , sdl2Support ? true, SDL2
@ -21,7 +21,7 @@ let
sha256 = "0c3g30rj1y8fbd2q4kwlpg1jdy02z4w5ryhj3yr9051pdnf4kndz"; sha256 = "0c3g30rj1y8fbd2q4kwlpg1jdy02z4w5ryhj3yr9051pdnf4kndz";
}; };
in in
gcc11Stdenv.mkDerivation { gcc12Stdenv.mkDerivation {
pname = "rpcs3"; pname = "rpcs3";
version = rpcs3Version; version = rpcs3Version;

View file

@ -46,6 +46,11 @@ stdenv.mkDerivation rec {
++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama libXcursor libXi libXext alsa-lib fontconfig libGLU ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama libXcursor libXi libXext alsa-lib fontconfig libGLU ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ]; ++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
];
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall

View file

@ -16,6 +16,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ scons pkg-config wrapGAppsHook ]; nativeBuildInputs = [ scons pkg-config wrapGAppsHook ];
buildInputs = [ glfw3 gtk3 libpng12 ]; buildInputs = [ glfw3 gtk3 libpng12 ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=format-truncation"
];
NIX_LDFLAGS = "-lpthread"; NIX_LDFLAGS = "-lpthread";
buildPhase = '' buildPhase = ''

View file

@ -46,6 +46,11 @@ mkDerivation rec {
url = "https://github.com/mkroehnert/hdrmerge/commit/472b2dfe7d54856158aea3d5412a02d0bab1da4c.patch"; url = "https://github.com/mkroehnert/hdrmerge/commit/472b2dfe7d54856158aea3d5412a02d0bab1da4c.patch";
sha256 = "0jc713ajr4w08pfbi6bva442prj878nxp1fpl9112i3xj34x9sdi"; sha256 = "0jc713ajr4w08pfbi6bva442prj878nxp1fpl9112i3xj34x9sdi";
}) })
(fetchpatch {
name = "support-libraw-0.21.patch";
url = "https://github.com/jcelaya/hdrmerge/commit/779e566b3e2807280b78c79affda2cdfa64bde87.diff";
sha256 = "48sivCfJWEtGiBXTrO+SWTVlT9xyx92w2kkB8Wt/clk=";
})
]; ];
desktopItems = [ desktopItems = [

View file

@ -1,7 +1,7 @@
{ callPackage, ... } @ args: { callPackage, ... } @ args:
callPackage ./generic.nix (args // { callPackage ./generic.nix (args // {
version = "5.1.4"; version = "5.1.5";
kde-channel = "stable"; kde-channel = "stable";
sha256 = "sha256-wisCCGJZbrL92RHhsXnbvOewgb4RFFei6sr2rhzKLcs="; sha256 = "1lx4x4affkbh47b7w5qvahkkr4db0vcw6h24nykak6gpy2z5wxqw";
}) })

View file

@ -11,6 +11,12 @@ mkDerivation rec {
sha256 = "sha256-xr7SYzQZiY4Bp8w1AxDX2TS/WRyrcln8JYGqTADq+ng="; sha256 = "sha256-xr7SYzQZiY4Bp8w1AxDX2TS/WRyrcln8JYGqTADq+ng=";
}; };
# Needed with GCC 12
postPatch = ''
sed '1i#include <iterator>' -i src/lyxfind.cpp
sed '1i#include <cstring>' -i src/insets/InsetListings.cpp
'';
# LaTeX is used from $PATH, as people often want to have it with extra pkgs # LaTeX is used from $PATH, as people often want to have it with extra pkgs
nativeBuildInputs = [ pkg-config makeWrapper ]; nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [ buildInputs = [

View file

@ -140,13 +140,16 @@ in stdenv.mkDerivation rec {
patchShebangs tools/get_wb_version.sh patchShebangs tools/get_wb_version.sh
''; '';
NIX_CFLAGS_COMPILE = toString ([ NIX_CFLAGS_COMPILE = [
# error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated # error: 'OGRErr OGRSpatialReference::importFromWkt(char**)' is deprecated
"-Wno-error=deprecated-declarations" "-Wno-error=deprecated-declarations"
] ++ lib.optionals stdenv.isAarch64 [ ] ++ lib.optionals stdenv.isAarch64 [
# error: narrowing conversion of '-1' from 'int' to 'char' # error: narrowing conversion of '-1' from 'int' to 'char'
"-Wno-error=narrowing" "-Wno-error=narrowing"
]); ] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but problematic with some old GCCs
"-Wno-error=maybe-uninitalized"
];
cmakeFlags = [ cmakeFlags = [
"-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config" "-DMySQL_CONFIG_PATH=${mysql}/bin/mysql_config"

View file

@ -9,7 +9,7 @@
, python3 , python3
, qttools # for translations , qttools # for translations
, wrapQtAppsHook , wrapQtAppsHook
, ffmpeg-jami , ffmpeg_5
, jami-daemon , jami-daemon
, libnotify , libnotify
, qt5compat , qt5compat
@ -43,7 +43,7 @@ stdenv.mkDerivation {
]; ];
buildInputs = [ buildInputs = [
ffmpeg-jami ffmpeg_5
jami-daemon jami-daemon
libnotify libnotify
networkmanager networkmanager

View file

@ -1,156 +0,0 @@
--disable-everything
--enable-zlib
--enable-gpl
--enable-swscale
--enable-bsfs
--disable-filters
--disable-programs
--disable-postproc
--disable-protocols
--enable-protocol=crypto
--enable-protocol=file
--enable-protocol=rtp
--enable-protocol=srtp
--enable-protocol=tcp
--enable-protocol=udp
--enable-protocol=unix
--enable-protocol=pipe
--disable-demuxers
--disable-muxers
--enable-muxer=rtp
--enable-muxer=g722
--enable-muxer=g723_1
--enable-muxer=g726
--enable-muxer=g726le
--enable-muxer=h263
--enable-muxer=h264
--enable-muxer=hevc
--enable-muxer=matroska
--enable-muxer=webm
--enable-muxer=ogg
--enable-muxer=pcm_s16be
--enable-muxer=pcm_s16le
--enable-demuxer=rtp
--enable-demuxer=mjpeg
--enable-demuxer=mjpeg_2000
--enable-demuxer=mpegvideo
--enable-demuxer=gif
--enable-demuxer=image_jpeg_pipe
--enable-demuxer=image_png_pipe
--enable-demuxer=image_webp_pipe
--enable-demuxer=matroska
--enable-demuxer=m4v
--enable-demuxer=mp3
--enable-demuxer=ogg
--enable-demuxer=flac
--enable-demuxer=wav
--enable-demuxer=ac3
--enable-demuxer=g722
--enable-demuxer=g723_1
--enable-demuxer=g726
--enable-demuxer=g726le
--enable-demuxer=pcm_mulaw
--enable-demuxer=pcm_alaw
--enable-demuxer=pcm_s16be
--enable-demuxer=pcm_s16le
--enable-demuxer=h263
--enable-demuxer=h264
--enable-demuxer=hevc
--enable-parser=h263
--enable-parser=h264
--enable-parser=hevc
--enable-parser=mpeg4video
--enable-parser=vp8
--enable-parser=vp9
--enable-parser=opus
--enable-encoder=adpcm_g722
--enable-decoder=adpcm_g722
--enable-encoder=adpcm_g726
--enable-decoder=adpcm_g726
--enable-encoder=adpcm_g726le
--enable-decoder=adpcm_g726le
--enable-decoder=g729
--enable-encoder=g723_1
--enable-decoder=g723_1
--enable-encoder=rawvideo
--enable-decoder=rawvideo
--enable-encoder=libx264
--enable-decoder=h264
--enable-encoder=pcm_alaw
--enable-decoder=pcm_alaw
--enable-encoder=pcm_mulaw
--enable-decoder=pcm_mulaw
--enable-encoder=mpeg4
--enable-decoder=mpeg4
--enable-encoder=libvpx_vp8
--enable-decoder=vp8
--enable-decoder=vp9
--enable-encoder=h263
--enable-encoder=h263p
--enable-decoder=h263
--enable-encoder=mjpeg
--enable-decoder=mjpeg
--enable-decoder=mjpegb
--enable-libspeex
--enable-libopus
--enable-libvpx
--enable-libx264
--enable-encoder=libspeex
--enable-decoder=libspeex
--enable-encoder=libopus
--enable-decoder=libopus
--enable-decoder=flac
--enable-decoder=vorbis
--enable-decoder=aac
--enable-decoder=ac3
--enable-decoder=eac3
--enable-decoder=mp3
--enable-decoder=pcm_u24be
--enable-decoder=pcm_u24le
--enable-decoder=pcm_u32be
--enable-decoder=pcm_u32le
--enable-decoder=pcm_u8
--enable-decoder=pcm_f16le
--enable-decoder=pcm_f24le
--enable-decoder=pcm_f32be
--enable-decoder=pcm_f32le
--enable-decoder=pcm_f64be
--enable-decoder=pcm_f64le
--enable-decoder=pcm_s16be
--enable-decoder=pcm_s16be_planar
--enable-decoder=pcm_s16le
--enable-decoder=pcm_s16le_planar
--enable-decoder=pcm_s24be
--enable-decoder=pcm_s24le
--enable-decoder=pcm_s24le_planar
--enable-decoder=pcm_s32be
--enable-decoder=pcm_s32le
--enable-decoder=pcm_s32le_planar
--enable-decoder=pcm_s64be
--enable-decoder=pcm_s64le
--enable-decoder=pcm_s8
--enable-decoder=pcm_s8_planar
--enable-decoder=pcm_u16be
--enable-decoder=pcm_u16le
--enable-encoder=gif
--enable-decoder=gif
--enable-encoder=jpegls
--enable-decoder=jpegls
--enable-encoder=ljpeg
--enable-decoder=jpeg2000
--enable-encoder=png
--enable-decoder=png
--enable-encoder=bmp
--enable-decoder=bmp
--enable-encoder=tiff
--enable-decoder=tiff
--enable-filter=scale
--enable-filter=overlay
--enable-filter=amix
--enable-filter=amerge
--enable-filter=aresample
--enable-filter=format
--enable-filter=aformat
--enable-filter=fps
--enable-filter=transpose
--enable-filter=pad

View file

@ -1,18 +0,0 @@
--enable-pic
--target-os=linux
--enable-indev=v4l2
--enable-indev=xcbgrab
--enable-vdpau
--enable-hwaccel=h264_vdpau
--enable-hwaccel=mpeg4_vdpau
--enable-vaapi
--enable-hwaccel=h264_vaapi
--enable-hwaccel=mpeg4_vaapi
--enable-hwaccel=h263_vaapi
--enable-hwaccel=vp8_vaapi
--enable-hwaccel=mjpeg_vaapi
--enable-hwaccel=hevc_vaapi
--enable-encoder=h264_vaapi
--enable-encoder=vp8_vaapi
--enable-encoder=mjpeg_vaapi
--enable-encoder=hevc_vaapi

View file

@ -1,10 +0,0 @@
--enable-cuvid
--enable-ffnvcodec
--enable-nvdec
--enable-nvenc
--enable-hwaccel=h264_nvdec
--enable-hwaccel=hevc_nvdec
--enable-hwaccel=vp8_nvdec
--enable-hwaccel=mjpeg_nvdec
--enable-encoder=h264_nvenc
--enable-encoder=hevc_nvenc

View file

@ -1,7 +0,0 @@
remove-mjpeg-log.patch
change-RTCP-ratio.patch
rtp_ext_abs_send_time.patch
libopusdec-enable-FEC.patch
libopusenc-reload-packet-loss-at-encode.patch
ios-disable-b-frames.patch
screen-sharing-x11-fix.patch

View file

@ -9,7 +9,7 @@
, asio , asio
, dbus , dbus
, dbus_cplusplus , dbus_cplusplus
, ffmpeg-jami , ffmpeg_5
, fmt , fmt
, gmp , gmp
, gnutls , gnutls
@ -51,7 +51,7 @@ stdenv.mkDerivation {
dbus dbus
dbus_cplusplus dbus_cplusplus
fmt fmt
ffmpeg-jami ffmpeg_5
gmp gmp
gnutls gnutls
http-parser http-parser

View file

@ -4,7 +4,6 @@
, fetchFromGitHub , fetchFromGitHub
, fetchzip , fetchzip
, fetchpatch , fetchpatch
, ffmpeg_5
, pjsip , pjsip
, opendht , opendht
, jack , jack
@ -41,31 +40,6 @@ let
readLinesToList = with builtins; file: filter (s: isString s && stringLength s > 0) (split "\n" (readFile file)); readLinesToList = with builtins; file: filter (s: isString s && stringLength s > 0) (split "\n" (readFile file));
in in
rec { rec {
ffmpeg-jami = (ffmpeg_5.override rec {
version = "5.0.1";
branch = version;
sha256 = "sha256-KN8z1AChwcGyDQepkZeAmjuI73ZfXwfcH/Bn+sZMWdY=";
doCheck = false;
}).overrideAttrs (old:
let
patch-src = src + "/daemon/contrib/src/ffmpeg/";
in
{
patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/ffmpeg_patches)) ++
# SDL2 recently changed their versioning
[
(fetchpatch {
url = "https://git.videolan.org/?p=ffmpeg.git;a=patch;h=e5163b1d34381a3319214a902ef1df923dd2eeba";
hash = "sha256-nLhP2+34cj5EgpnUrePZp60nYAxmbhZAEDfay4pBVk0=";
})
];
configureFlags = old.configureFlags
++ (readLinesToList ./config/ffmpeg_args_common)
++ lib.optionals stdenv.isLinux (readLinesToList ./config/ffmpeg_args_linux)
++ lib.optionals (stdenv.isx86_32 || stdenv.isx86_64) (readLinesToList ./config/ffmpeg_args_x86);
outputs = [ "out" "doc" ];
});
pjsip-jami = pjsip.overrideAttrs (old: pjsip-jami = pjsip.overrideAttrs (old:
let let
patch-src = src + "/daemon/contrib/src/pjproject/"; patch-src = src + "/daemon/contrib/src/pjproject/";
@ -105,10 +79,10 @@ rec {
}; };
jami-daemon = callPackage ./daemon.nix { jami-daemon = callPackage ./daemon.nix {
inherit version src udev jack jami-meta ffmpeg-jami pjsip-jami opendht-jami; inherit version src udev jack jami-meta pjsip-jami opendht-jami;
}; };
jami-client = qt6Packages.callPackage ./client.nix { jami-client = qt6Packages.callPackage ./client.nix {
inherit version src ffmpeg-jami jami-meta; inherit version src jami-meta;
}; };
} }

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub { lib, stdenv, fetchFromGitHub, fetchpatch
, pkg-config, cmake, ninja, yasm , pkg-config, cmake, ninja, yasm
, libjpeg, openssl_1_1, libopus, ffmpeg, alsa-lib, libpulseaudio, protobuf , libjpeg, openssl_1_1, libopus, ffmpeg, alsa-lib, libpulseaudio, protobuf
, openh264, usrsctp, libevent, libvpx , openh264, usrsctp, libevent, libvpx
@ -31,6 +31,14 @@ stdenv.mkDerivation {
mesa libepoxy libglvnd mesa libepoxy libglvnd
]; ];
patches = [
# GCC 12 Fix
(fetchpatch {
url = "https://github.com/desktop-app/tg_owt/pull/101/commits/86d2bcd7afb8706663d29e30f65863de5a626142.patch";
hash = "sha256-iWS0mB8R0vqPU/0qf6Ax54UCAKYDVCPac2mi/VHbFm0=";
})
];
cmakeFlags = [ cmakeFlags = [
# Building as a shared library isn't officially supported and may break at any time. # Building as a shared library isn't officially supported and may break at any time.
"-DBUILD_SHARED_LIBS=OFF" "-DBUILD_SHARED_LIBS=OFF"

View file

@ -80,6 +80,11 @@ stdenv.mkDerivation rec {
# guile warning # guile warning
GUILE_AUTO_COMPILE="0"; GUILE_AUTO_COMPILE="0";
NIX_CFLAGS_COMPILE = lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
"-Wno-error=use-after-free"
];
# `make check` target does not define its prerequisites but expects them to # `make check` target does not define its prerequisites but expects them to
# have already been built. The list of targets below was built through trial # have already been built. The list of targets below was built through trial
# and error based on failing tests. # and error based on failing tests.

View file

@ -3,7 +3,7 @@
, cmake , cmake
, corrosion , corrosion
, extra-cmake-modules , extra-cmake-modules
, gcc11 , gcc12
, kconfig , kconfig
, kcoreaddons , kcoreaddons
, kdbusaddons , kdbusaddons
@ -46,7 +46,7 @@ mkDerivation rec {
cmake cmake
corrosion corrosion
extra-cmake-modules extra-cmake-modules
gcc11 # doesn't build with GCC 9 from stdenv on aarch64 gcc12 # doesn't build with GCC 9 from stdenv on aarch64
] ++ (with rustPlatform; [ ] ++ (with rustPlatform; [
cargoSetupHook cargoSetupHook
rust.cargo rust.cargo

View file

@ -2,7 +2,7 @@
, mkDerivation , mkDerivation
, extra-cmake-modules , extra-cmake-modules
, gcc11 , gcc12
, wrapGAppsHook , wrapGAppsHook
, gst_all_1 , gst_all_1
@ -22,7 +22,7 @@ mkDerivation rec {
nativeBuildInputs = [ nativeBuildInputs = [
extra-cmake-modules extra-cmake-modules
wrapGAppsHook wrapGAppsHook
gcc11 # doesn't build with GCC 9 from stdenv on aarch64 gcc12 # doesn't build with GCC 9 from stdenv on aarch64
python3Packages.wrapPython python3Packages.wrapPython
python3Packages.pybind11 python3Packages.pybind11
]; ];

View file

@ -1,4 +1,4 @@
{ gcc11Stdenv { gcc12Stdenv
, lib , lib
, srcs , srcs
@ -31,7 +31,7 @@
}: }:
# Workaround for AArch64 not using GCC11 yet. # Workaround for AArch64 not using GCC11 yet.
gcc11Stdenv.mkDerivation rec { gcc12Stdenv.mkDerivation rec {
pname = "neochat"; pname = "neochat";
inherit (srcs.neochat) version src; inherit (srcs.neochat) version src;

View file

@ -1,6 +1,6 @@
{ lib { lib
, mkDerivation , mkDerivation
, gcc11Stdenv , gcc12Stdenv
, srcs , srcs
, cmake , cmake
@ -24,8 +24,8 @@
, qtquickcontrols2 , qtquickcontrols2
}: }:
# Workaround for AArch64 not using GCC11 yet. # Workaround for AArch64 still using GCC9.
gcc11Stdenv.mkDerivation rec { gcc12Stdenv.mkDerivation rec {
pname = "spacebar"; pname = "spacebar";
inherit (srcs.spacebar) version src; inherit (srcs.spacebar) version src;

View file

@ -19,6 +19,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY="; sha256 = "sha256-VaUr63v7mzhh4VBghH7a7qrqOYwl6vucmmKzTi9yAjY=";
}) ]; }) ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=deprecated-declarations"
];
postInstall = '' postInstall = ''
mkdir $out/bin mkdir $out/bin
mv $out/octopus $out/bin mv $out/octopus $out/bin

View file

@ -41,12 +41,12 @@ stdenv.mkDerivation rec {
]; ];
configureFlags = with lib; [ configureFlags = with lib; [
"--with-yaml-prefix=${libyaml}" "--with-yaml-prefix=${lib.getDev libyaml}"
"--with-blas=-lblas" "--with-blas=-lblas"
"--with-lapack=-llapack" "--with-lapack=-llapack"
"--with-fftw-prefix=${fftw.dev}" "--with-fftw-prefix=${lib.getDev fftw}"
"--with-gsl-prefix=${gsl}" "--with-gsl-prefix=${lib.getDev gsl}"
"--with-libxc-prefix=${libxc}" "--with-libxc-prefix=${lib.getDev libxc}"
"--enable-openmp" "--enable-openmp"
] ++ optional enableFma "--enable-fma3" ] ++ optional enableFma "--enable-fma3"
++ optional enableFma4 "--enable-fma4" ++ optional enableFma4 "--enable-fma4"

View file

@ -60,9 +60,13 @@ stdenv.mkDerivation rec {
--prefix PATH : "$out/share/cbmc" \ --prefix PATH : "$out/share/cbmc" \
''; '';
# fix "argument unused during compilation" NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang # Needed with GCC 12 but breaks on darwin (with clang)
"-Wno-unused-command-line-argument"; "-Wno-error=maybe-uninitialized"
] ++ lib.optionals stdenv.cc.isClang [
# fix "argument unused during compilation"
"-Wno-unused-command-line-argument"
];
# TODO: add jbmc support # TODO: add jbmc support
cmakeFlags = [ "-DWITH_JBMC=OFF" "-Dsat_impl=cadical" "-Dcadical_INCLUDE_DIR=${cadical.dev}/include" ]; cmakeFlags = [ "-DWITH_JBMC=OFF" "-Dsat_impl=cadical" "-Dcadical_INCLUDE_DIR=${cadical.dev}/include" ];

View file

@ -54,6 +54,12 @@ stdenv.mkDerivation rec {
] else [ "-DUSE_CUDA=OFF" ]) ] else [ "-DUSE_CUDA=OFF" ])
++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF"; ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=maybe-uninitialized"
"-Wno-error=uninitialized"
];
postPatch = '' postPatch = ''
substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \ substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \
--replace "/bin/bash" "${bash}/bin/bash" --replace "/bin/bash" "${bash}/bin/bash"

View file

@ -13,6 +13,11 @@ stdenv.mkDerivation rec {
makeFlags = [ "PREFIX=$(out)" ]; makeFlags = [ "PREFIX=$(out)" ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=maybe-uninitialized"
];
preInstall = '' preInstall = ''
mkdir -p $out/bin mkdir -p $out/bin
''; '';

View file

@ -99,6 +99,8 @@ stdenv.mkDerivation rec {
cp -r ${expected-wrap} ${expected-wrap.name} cp -r ${expected-wrap} ${expected-wrap.name}
cp -r ${wlroots-wrap} ${wlroots-wrap.name} cp -r ${wlroots-wrap} ${wlroots-wrap.name}
) )
sed '1i#include <functional>' -i cardboard/ViewAnimation.h # gcc12
''; '';
# "Inherited" from Nixpkgs expression for wlroots # "Inherited" from Nixpkgs expression for wlroots
@ -108,6 +110,8 @@ stdenv.mkDerivation rec {
"-Dwlroots:libseat=disabled" "-Dwlroots:libseat=disabled"
]; ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=array-bounds" ]; # gcc12
meta = with lib; { meta = with lib; {
homepage = "https://gitlab.com/cardboardwm/cardboard"; homepage = "https://gitlab.com/cardboardwm/cardboard";
description = "A scrollable, tiling Wayland compositor inspired on PaperWM"; description = "A scrollable, tiling Wayland compositor inspired on PaperWM";

View file

@ -343,18 +343,11 @@ stdenv.mkDerivation {
# compile, because it uses "#include_next <limits.h>" to find the # compile, because it uses "#include_next <limits.h>" to find the
# limits.h file in ../includes-fixed. To remedy the problem, # limits.h file in ../includes-fixed. To remedy the problem,
# another -idirafter is necessary to add that directory again. # another -idirafter is necessary to add that directory again.
#
# We use --sysroot=/nix/store/does/not/exist to drop embedded default
# path to glibc headers gcc was built against. Without it -idirafter
# only appends to the list and outdated glibc headers end up being
# used. 'cc-cflags-before' is used to allow user's --sysroot= option
# to override our default.
+ optionalString (libc != null) ('' + optionalString (libc != null) (''
touch "$out/nix-support/libc-cflags" touch "$out/nix-support/libc-cflags"
touch "$out/nix-support/libc-ldflags" touch "$out/nix-support/libc-ldflags"
echo "-B${libc_lib}${libc.libdir or "/lib/"}" >> $out/nix-support/libc-crt1-cflags echo "-B${libc_lib}${libc.libdir or "/lib/"}" >> $out/nix-support/libc-crt1-cflags
'' + optionalString (!(cc.langD or false)) '' '' + optionalString (!(cc.langD or false)) ''
echo "--sysroot=/nix/store/does/not/exist" >> $out/nix-support/cc-cflags-before
echo "-idirafter ${libc_dev}${libc.incdir or "/include"}" >> $out/nix-support/libc-cflags echo "-idirafter ${libc_dev}${libc.incdir or "/include"}" >> $out/nix-support/libc-cflags
'' + optionalString (isGNU && (!(cc.langD or false))) '' '' + optionalString (isGNU && (!(cc.langD or false))) ''
for dir in "${cc}"/lib/gcc/*/*/include-fixed; do for dir in "${cc}"/lib/gcc/*/*/include-fixed; do

View file

@ -46,14 +46,14 @@ else stdenv.mkDerivation rec {
-L${llvmPackages_13.clang.libc}/lib \ -L${llvmPackages_13.clang.libc}/lib \
-Wl,-install_name,$libName \ -Wl,-install_name,$libName \
-Wall -std=c99 -O3 -fPIC libredirect.c \ -Wall -std=c99 -O3 -fPIC libredirect.c \
-ldl -shared -o "$libName" -shared -o "$libName"
'' else if stdenv.isDarwin then '' '' else if stdenv.isDarwin then ''
$CC -Wall -std=c99 -O3 -fPIC libredirect.c \ $CC -Wall -std=c99 -O3 -fPIC libredirect.c \
-Wl,-install_name,$out/lib/$libName \ -Wl,-install_name,$out/lib/$libName \
-ldl -shared -o "$libName" -shared -o "$libName"
'' else '' '' else ''
$CC -Wall -std=c99 -O3 -fPIC libredirect.c \ $CC -Wall -std=c99 -O3 -fPIC libredirect.c \
-ldl -shared -o "$libName" -shared -o "$libName"
''} ''}
if [ -n "$doInstallCheck" ]; then if [ -n "$doInstallCheck" ]; then

View file

@ -201,6 +201,37 @@ WRAPPER(int, __xstat64)(int ver, const char * path, struct stat64 * st)
WRAPPER_DEF(__xstat64) WRAPPER_DEF(__xstat64)
#endif #endif
#if defined(__linux__) && defined(STATX_TYPE)
WRAPPER(int, statx)(int dirfd, const char * restrict pathname, int flags,
unsigned int mask, struct statx * restrict statxbuf)
{
int (*statx_real) (int, const char * restrict, int,
unsigned int, struct statx * restrict) = LOOKUP_REAL(statx);
char buf[PATH_MAX];
return statx_real(dirfd, rewrite(pathname, buf), flags, mask, statxbuf);
}
WRAPPER_DEF(statx)
#endif
WRAPPER(int, fstatat)(int dirfd, const char * pathname, struct stat * statbuf, int flags)
{
int (*fstatat_real) (int, const char *, struct stat *, int) = LOOKUP_REAL(fstatat);
char buf[PATH_MAX];
return fstatat_real(dirfd, rewrite(pathname, buf), statbuf, flags);
}
WRAPPER_DEF(fstatat);
// In musl libc, fstatat64 is simply a macro for fstatat
#if !defined(__APPLE__) && !defined(fstatat64)
WRAPPER(int, fstatat64)(int dirfd, const char * pathname, struct stat64 * statbuf, int flags)
{
int (*fstatat64_real) (int, const char *, struct stat64 *, int) = LOOKUP_REAL(fstatat64);
char buf[PATH_MAX];
return fstatat64_real(dirfd, rewrite(pathname, buf), statbuf, flags);
}
WRAPPER_DEF(fstatat64);
#endif
WRAPPER(int, stat)(const char * path, struct stat * st) WRAPPER(int, stat)(const char * path, struct stat * st)
{ {
int (*__stat_real) (const char *, struct stat *) = LOOKUP_REAL(stat); int (*__stat_real) (const char *, struct stat *) = LOOKUP_REAL(stat);
@ -209,6 +240,17 @@ WRAPPER(int, stat)(const char * path, struct stat * st)
} }
WRAPPER_DEF(stat) WRAPPER_DEF(stat)
// In musl libc, stat64 is simply a macro for stat
#if !defined(__APPLE__) && !defined(stat64)
WRAPPER(int, stat64)(const char * path, struct stat64 * st)
{
int (*stat64_real) (const char *, struct stat64 *) = LOOKUP_REAL(stat64);
char buf[PATH_MAX];
return stat64_real(rewrite(path, buf), st);
}
WRAPPER_DEF(stat64)
#endif
WRAPPER(int, access)(const char * path, int mode) WRAPPER(int, access)(const char * path, int mode)
{ {
int (*access_real) (const char *, int mode) = LOOKUP_REAL(access); int (*access_real) (const char *, int mode) = LOOKUP_REAL(access);
@ -346,6 +388,14 @@ WRAPPER(int, system)(const char *command)
} }
WRAPPER_DEF(system) WRAPPER_DEF(system)
WRAPPER(int, chdir)(const char *path)
{
int (*chdir_real) (const char *) = LOOKUP_REAL(chdir);
char buf[PATH_MAX];
return chdir_real(rewrite(path, buf));
}
WRAPPER_DEF(chdir);
WRAPPER(int, mkdir)(const char *path, mode_t mode) WRAPPER(int, mkdir)(const char *path, mode_t mode)
{ {
int (*mkdir_real) (const char *path, mode_t mode) = LOOKUP_REAL(mkdir); int (*mkdir_real) (const char *path, mode_t mode) = LOOKUP_REAL(mkdir);

View file

@ -63,6 +63,12 @@ int main(int argc, char *argv[])
FILE *testfp; FILE *testfp;
int testfd; int testfd;
struct stat testsb; struct stat testsb;
#ifndef __APPLE__
struct stat64 testsb64;
#endif
#if defined(__linux__) && defined(STATX_TYPE)
struct statx testsbx;
#endif
char buf[PATH_MAX]; char buf[PATH_MAX];
testfp = fopen(TESTPATH, "r"); testfp = fopen(TESTPATH, "r");
@ -76,6 +82,20 @@ int main(int argc, char *argv[])
assert(access(TESTPATH, X_OK) == 0); assert(access(TESTPATH, X_OK) == 0);
assert(stat(TESTPATH, &testsb) != -1); assert(stat(TESTPATH, &testsb) != -1);
#ifndef __APPLE__
assert(stat64(TESTPATH, &testsb64) != -1);
#endif
assert(fstatat(123, TESTPATH, &testsb, 0) != -1);
#ifndef __APPLE__
assert(fstatat64(123, TESTPATH, &testsb64, 0) != -1);
#endif
#if defined(__linux__) && defined(STATX_TYPE)
assert(statx(123, TESTPATH, 0, STATX_ALL, &testsbx) != -1);
#endif
assert(getcwd(buf, PATH_MAX) != NULL);
assert(chdir(TESTDIR) == 0);
assert(chdir(buf) == 0);
assert(mkdir(TESTDIR "/dir-mkdir", 0777) == 0); assert(mkdir(TESTDIR "/dir-mkdir", 0777) == 0);
assert(unlink(TESTDIR "/dir-mkdir") == -1); // it's a directory! assert(unlink(TESTDIR "/dir-mkdir") == -1); // it's a directory!

View file

@ -12,7 +12,7 @@ if [ -z "${NIX_PKG_CONFIG_WRAPPER_FLAGS_SET_@suffixSalt@:-}" ]; then
source @out@/nix-support/add-flags.sh source @out@/nix-support/add-flags.sh
fi fi
set -- "$@" @addFlags@ set -- @addFlags@ "$@"
if (( ${#role_suffixes[@]} > 0 )); then if (( ${#role_suffixes[@]} > 0 )); then
# replace env var with nix-modified one # replace env var with nix-modified one

View file

@ -4,7 +4,6 @@
, rust , rust
, stdenv , stdenv
, callPackage , callPackage
, cacert
, cargoBuildHook , cargoBuildHook
, cargoCheckHook , cargoCheckHook
, cargoInstallHook , cargoInstallHook
@ -124,7 +123,6 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
inherit cargo cargo-auditable; inherit cargo cargo-auditable;
}) })
] ++ [ ] ++ [
cacert
cargoBuildHook cargoBuildHook
(if useNextest then cargoNextestHook else cargoCheckHook) (if useNextest then cargoNextestHook else cargoCheckHook)
cargoInstallHook cargoInstallHook

View file

@ -73,6 +73,9 @@ in stdenv.mkDerivation ({
${cargoUpdateHook} ${cargoUpdateHook}
# Override the `http.cainfo` option usually specified in `.cargo/config`.
export CARGO_HTTP_CAINFO=${cacert}/etc/ssl/certs/ca-bundle.crt
cargo vendor $name --respect-source-config | cargo-vendor-normalise > $CARGO_CONFIG cargo vendor $name --respect-source-config | cargo-vendor-normalise > $CARGO_CONFIG
# Create an empty vendor directory when there is no dependency to vendor # Create an empty vendor directory when there is no dependency to vendor

View file

@ -1,4 +1,6 @@
postFixupHooks+=(_makeSymlinksRelative) # symlinks are often created in postFixup
# don't use fixupOutputHooks, it is before postFixup
postFixupHooks+=(_makeSymlinksRelativeInAllOutputs)
# For every symlink in $output that refers to another file in $output # For every symlink in $output that refers to another file in $output
# ensure that the symlink is relative. This removes references to the output # ensure that the symlink is relative. This removes references to the output
@ -26,3 +28,10 @@ _makeSymlinksRelative() {
done < <(find $prefix -type l -print0) done < <(find $prefix -type l -print0)
} }
_makeSymlinksRelativeInAllOutputs() {
local output
for output in $(getAllOutputNames); do
prefix="${!output}" _makeSymlinksRelative
done
}

View file

@ -1,18 +1,22 @@
{ lib, fetchzip }: { lib, stdenvNoCC, fetchzip }:
fetchzip rec { stdenvNoCC.mkDerivation rec {
pname = "freefont-ttf"; pname = "freefont-ttf";
version = "20120503"; version = "20120503";
url = "mirror://gnu/freefont/freefont-ttf-${version}.zip"; src = fetchzip {
url = "mirror://gnu/freefont/freefont-ttf-${version}.zip";
hash = "sha256-K3kVHGcDTxQ7N7XqSdwRObriVkBoBYPKHbyYrYvm7VU=";
};
installPhase = ''
runHook preInstall
postFetch = ''
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
mv $out/*.ttf $out/share/fonts/truetype mv *.ttf $out/share/fonts/truetype
find $out -maxdepth 1 ! -type d -exec rm {} +
'';
sha256 = "sha256-bdMZg/mHYc0N6HiR8uNl0CjeOwBou+OYj3LPkyEUHUA="; runHook postInstall
'';
meta = { meta = {
description = "GNU Free UCS Outline Fonts"; description = "GNU Free UCS Outline Fonts";
@ -24,6 +28,6 @@ fetchzip rec {
homepage = "https://www.gnu.org/software/freefont/"; homepage = "https://www.gnu.org/software/freefont/";
license = lib.licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all; platforms = lib.platforms.all;
maintainers = []; maintainers = [ ];
}; };
} }

View file

@ -1,14 +1,22 @@
{ lib, fetchzip }: { lib, stdenvNoCC, fetchzip }:
fetchzip rec {
stdenvNoCC.mkDerivation rec {
pname = "capitaine-cursors-themed"; pname = "capitaine-cursors-themed";
version = "5"; version = "5";
stripRoot = false;
url = "https://github.com/sainnhe/capitaine-cursors/releases/download/r${version}/Linux.zip";
sha256 = "jQNAXuR/OtvohWziGYgb5Ni2/tEIGaY9HIyUUW793EY=";
postFetch = '' src = fetchzip {
url = "https://github.com/sainnhe/capitaine-cursors/releases/download/r${version}/Linux.zip";
stripRoot = false;
hash = "sha256-ipPpmZKU/xLA45fdOvxVbtFDCUsCYIvzeps/DjhFkNg=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons mkdir -p $out/share/icons
cp -r ./ $out/share/icons cp -r ./ $out/share/icons
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,23 +1,24 @@
{ lib, fetchzip }: { lib, stdenvNoCC, fetchzip }:
fetchzip rec { stdenvNoCC.mkDerivation rec {
pname = "cldr-annotations"; pname = "cldr-annotations";
version = "42.0"; version = "42.0";
url = "https://unicode.org/Public/cldr/${lib.versions.major version}/cldr-common-${version}.zip"; src = fetchzip {
url = "https://unicode.org/Public/cldr/${lib.versions.major version}/cldr-common-${version}.zip";
stripRoot = false;
hash = "sha256-paRon3ecGXNp3ZDnN1DU9RVU2NDWTBiKjy0OP3vcPLE=";
};
installPhase = ''
runHook preInstall
stripRoot = false;
postFetch = ''
mkdir -p $out/share/unicode/cldr/common mkdir -p $out/share/unicode/cldr/common
mv $out/common/annotations{,Derived} -t $out/share/unicode/cldr/common mv common/annotations{,Derived} -t $out/share/unicode/cldr/common
shopt -s extglob dotglob runHook postInstall
rm -rf $out/!(share)
shopt -u extglob dotglob
''; '';
hash = "sha256-9OOd69nBaDSt+ilL3PTGpcQgC60PnHqd8/CYa2LgeI0=";
meta = with lib; { meta = with lib; {
description = "Names and keywords for Unicode characters from the Common Locale Data Repository"; description = "Names and keywords for Unicode characters from the Common Locale Data Repository";
homepage = "https://cldr.unicode.org"; homepage = "https://cldr.unicode.org";

View file

@ -1,20 +1,24 @@
{ lib, fetchFromGitHub }: { lib, stdenvNoCC, fetchFromGitHub }:
let stdenvNoCC.mkDerivation {
pname = "publicsuffix-list"; pname = "publicsuffix-list";
version = "2021-09-03"; version = "unstable-2021-09-03";
in fetchFromGitHub {
name = "${pname}-${version}";
owner = "publicsuffix";
repo = "list";
rev = "2533d032871e1ef1f410fc0754b848d4587c8021";
sha256 = "sha256-Q8uIXM1CMu8dlWcVoL17M1XRGu3kG7Y7jpx0oHQh+2I=";
postFetch = '' src = fetchFromGitHub {
install -Dm0444 $out/public_suffix_list.dat $out/tests/test_psl.txt -t $out/share/publicsuffix owner = "publicsuffix";
shopt -s extglob dotglob repo = "list";
rm -rf $out/!(share) rev = "2533d032871e1ef1f410fc0754b848d4587c8021";
shopt -u extglob dotglob hash = "sha256-moibTN9KovABcg+ubKUgMXg4b8sMrTVo6Itmiati/Vk=";
};
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm0444 public_suffix_list.dat tests/test_psl.txt -t $out/share/publicsuffix
runHook postInstall
''; '';
meta = with lib; { meta = with lib; {

View file

@ -1,4 +1,5 @@
{ lib { lib
, stdenvNoCC
, fetchurl , fetchurl
, symlinkJoin , symlinkJoin
}: }:
@ -6,30 +7,40 @@
let let
version = "15.0"; version = "15.0";
fetchData = { file, sha256 }: fetchurl { fetchData = { suffix, hash }: stdenvNoCC.mkDerivation {
url = "https://www.unicode.org/Public/emoji/${version}/${file}"; pname = "unicode-emoji-${suffix}";
inherit sha256; inherit version;
downloadToTemp = true;
recursiveHash = true; src = fetchurl {
postFetch = '' url = "https://www.unicode.org/Public/emoji/${version}/emoji-${suffix}.txt";
inherit hash;
};
dontUnpack = true;
installPhase = ''
runHook preInstall
installDir="$out/share/unicode/emoji" installDir="$out/share/unicode/emoji"
mkdir -p "$installDir" mkdir -p "$installDir"
mv "$downloadedFile" "$installDir/${file}" cp "$src" "$installDir/emoji-${suffix}.txt"
runHook postInstall
''; '';
}; };
srcs = { srcs = {
emoji-sequences = fetchData { emoji-sequences = fetchData {
file = "emoji-sequences.txt"; suffix = "sequences";
sha256 = "sha256-vRpXHAcdY3arTnFwBH3WUW3DOh8B3L9+sRcecLHZ2lg="; hash = "sha256-XCIi2KQy2JagMaaML1SwT79HsPzi5phT8euKPpRetW0=";
}; };
emoji-test = fetchData { emoji-test = fetchData {
file = "emoji-test.txt"; suffix = "test";
sha256 = "sha256-3Rega6+ZJ5jXRhLFL/i/12V5IypEo5FaGG6Wf9Bj0UU="; hash = "sha256-hEXyOsg4jglr4Z0CYuFPzv+Fb/Ugk/I1bciUhfGoU9s=";
}; };
emoji-zwj-sequences = fetchData { emoji-zwj-sequences = fetchData {
file = "emoji-zwj-sequences.txt"; suffix = "zwj-sequences";
sha256 = "sha256-9AqrpyUCiBcR/fafa4VaH0pT5o1YzEZDVySsX4ja1u8="; hash = "sha256-/jV/kRe3dGZ2Bjdl1YcTft+bJZA6eSvVSTW/CFZ5EYI=";
}; };
}; };
in in

View file

@ -1,5 +1,6 @@
{ stdenv { stdenv
, lib , lib
, fetchpatch
, fetchurl , fetchurl
, vala , vala
, meson , meson
@ -36,6 +37,14 @@ stdenv.mkDerivation rec {
hash = "sha256-Wx0b+6dPNlgifzyC4pbzMN0PzR70Y2tqIYIo/uXqgy0="; hash = "sha256-Wx0b+6dPNlgifzyC4pbzMN0PzR70Y2tqIYIo/uXqgy0=";
}; };
patches = [
(fetchpatch {
name = "gpg-2.4.patch";
url = "https://gitlab.gnome.org/GNOME/seahorse/-/commit/9260c74779be3d7a378db0671af862ffa3573d42.patch";
hash = "sha256-4QiFgH4jC1ucmA9fFozUQZ3Mat76SgpYkMpRz80RH64=";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
meson meson
ninja ninja

View file

@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
wrapGAppsHook wrapGAppsHook
]; ];
buildInputs = [ libxml2 gtk shared-mime-info libSM ]; buildInputs = [ libxml2 gtk shared-mime-info libSM ];
NIX_LDFLAGS = "-ldl -lm"; NIX_LDFLAGS = "-lm";
patches = [ patches = [
./rox-filer-2.11-in-source-build.patch ./rox-filer-2.11-in-source-build.patch

View file

@ -151,13 +151,6 @@ stdenv.mkDerivation rec {
git git
]; ];
# Workaround cc-wrapper's --sysroot= value for `staging-next`: it
# breaks library lookup via RUNPATH:
# ld: warning: libm.so.6, needed by ./generated/linux/release/64/lib.so, not found (try using -rpath or -rpath-link)
# ld: /build/druntime/generated/linux/release/64/libdruntime.so: undefined reference to `log10@GLIBC_2.2.5'
# TODO(trofi): remove the workaround once cc-wrapper is fixed.
NIX_CFLAGS_COMPILE = [ "--sysroot=/" ];
buildInputs = [ buildInputs = [
curl curl
tzdata tzdata

View file

@ -222,7 +222,7 @@ stdenv.mkDerivation ({
inherit (callFile ../common/dependencies.nix { }) inherit (callFile ../common/dependencies.nix { })
depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = (callFile ../common/pre-configure.nix { }) + '' preConfigure = (callFile ../common/pre-configure.nix { }) + ''
ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h
@ -235,7 +235,6 @@ stdenv.mkDerivation ({
configureFlags = callFile ../common/configure-flags.nix { }; configureFlags = callFile ../common/configure-flags.nix { };
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -82,7 +82,10 @@ let majorVersion = "11";
++ optional (stdenv.isDarwin && targetPlatform.isAvr) ./avr-gcc-11.3-darwin.patch ++ optional (stdenv.isDarwin && targetPlatform.isAvr) ./avr-gcc-11.3-darwin.patch
# Obtain latest patch with ../update-mcfgthread-patches.sh # Obtain latest patch with ../update-mcfgthread-patches.sh
++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch; ++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch
# openjdk build fails without this on -march=opteron; is upstream in gcc12
++ [ ./gcc-issue-103910.patch ];
/* Cross-gcc settings (build == host != target) */ /* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
@ -228,7 +231,7 @@ stdenv.mkDerivation ({
inherit (callFile ../common/dependencies.nix { }) inherit (callFile ../common/dependencies.nix { })
depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = (callFile ../common/pre-configure.nix { }) + '' preConfigure = (callFile ../common/pre-configure.nix { }) + ''
ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h
@ -241,7 +244,6 @@ stdenv.mkDerivation ({
configureFlags = callFile ../common/configure-flags.nix { }; configureFlags = callFile ../common/configure-flags.nix { };
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -0,0 +1,41 @@
From d243f4009d8071b734df16cd70f4c5d09a373769 Mon Sep 17 00:00:00 2001
From: Andrew Pinski <apinski@marvell.com>
Date: Wed, 5 Jan 2022 22:00:07 +0000
Subject: [PATCH] Fix target/103910: missing GTY on x86_mfence causing PCH
usage to ICE
With -O3 -march=opteron, a mfence builtin is added after the loop
to say the nontemporal stores are no longer needed. This all good
without precompiled headers as the function decl that is referneced
by x86_mfence is referenced in another variable but with precompiled
headers, x86_mfence is all messed up and the decl was GC'ed away.
This fixes the problem by marking x86_mfence as GTY to save/restore
during precompiled headers just like most other variables in
the header file.
Committed as obvious after a bootstrap/test on x86_64-linux-gnu.
gcc/ChangeLog:
PR target/103910
* config/i386/i386.h (x86_mfence): Mark with GTY.
---
gcc/config/i386/i386.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index f027608eefa..3ac0f698ae2 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -486,7 +486,7 @@ extern unsigned char ix86_prefetch_sse;
/* Fence to use after loop using storent. */
-extern tree x86_mfence;
+extern GTY(()) tree x86_mfence;
#define FENCE_FOLLOWING_MOVNT x86_mfence
/* Once GDB has been enhanced to deal with functions without frame
--
2.31.1

View file

@ -261,7 +261,7 @@ stdenv.mkDerivation ({
inherit (callFile ../common/dependencies.nix { }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; inherit (callFile ../common/dependencies.nix { }) depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = (callFile ../common/pre-configure.nix { }) + '' preConfigure = (callFile ../common/pre-configure.nix { }) + ''
@ -275,7 +275,6 @@ stdenv.mkDerivation ({
configureFlags = callFile ../common/configure-flags.nix { }; configureFlags = callFile ../common/configure-flags.nix { };
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -246,7 +246,6 @@ stdenv.mkDerivation ({
configureFlags = callFile ../common/configure-flags.nix { }; configureFlags = callFile ../common/configure-flags.nix { };
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -266,7 +266,6 @@ stdenv.mkDerivation ({
configureFlags = callFile ../common/configure-flags.nix { }; configureFlags = callFile ../common/configure-flags.nix { };
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -276,7 +276,7 @@ stdenv.mkDerivation ({
inherit (callFile ../common/dependencies.nix { }) inherit (callFile ../common/dependencies.nix { })
depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = callFile ../common/pre-configure.nix { }; preConfigure = callFile ../common/pre-configure.nix { };
@ -287,7 +287,6 @@ stdenv.mkDerivation ({
configureFlags = callFile ../common/configure-flags.nix { }; configureFlags = callFile ../common/configure-flags.nix { };
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -226,7 +226,7 @@ stdenv.mkDerivation ({
depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"; NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = callFile ../common/pre-configure.nix { }; preConfigure = callFile ../common/pre-configure.nix { };
@ -240,7 +240,6 @@ stdenv.mkDerivation ({
; ;
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -207,7 +207,7 @@ stdenv.mkDerivation ({
inherit (callFile ../common/dependencies.nix { }) inherit (callFile ../common/dependencies.nix { })
depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = callFile ../common/pre-configure.nix { }; preConfigure = callFile ../common/pre-configure.nix { };
@ -218,7 +218,6 @@ stdenv.mkDerivation ({
configureFlags = callFile ../common/configure-flags.nix { }; configureFlags = callFile ../common/configure-flags.nix { };
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -221,7 +221,7 @@ stdenv.mkDerivation ({
inherit (callFile ../common/dependencies.nix { }) inherit (callFile ../common/dependencies.nix { })
depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget; depsBuildBuild nativeBuildInputs depsBuildTarget buildInputs depsTargetTarget;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl"; NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = callFile ../common/pre-configure.nix { }; preConfigure = callFile ../common/pre-configure.nix { };
@ -232,7 +232,6 @@ stdenv.mkDerivation ({
configureFlags = callFile ../common/configure-flags.nix { }; configureFlags = callFile ../common/configure-flags.nix { };
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform) (targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -203,17 +203,6 @@ preInstall() {
ln -s lib "$out/${targetConfig}/lib32" ln -s lib "$out/${targetConfig}/lib32"
ln -s lib "${!outputLib}/${targetConfig}/lib32" ln -s lib "${!outputLib}/${targetConfig}/lib32"
fi fi
# cc-wrappers uses --sysroot=/nix/store/does/not/exist as a way to
# drop default sysheaders search path. Unfortunately that switches
# clang++ into searching libraries in gcc in cross-compiler paths:
# from ${!outputLib}/lib (native)
# to ${!outputLib}/${targetPlatformConfig}/lib
# We create the symlink to make both native and cross paths
# available even if the toolchain is not the cross-compiler.
if [ ! -e ${!outputLib}/${targetPlatformConfig} ] ; then
ln -s . ${!outputLib}/${targetPlatformConfig}
fi
} }

View file

@ -1,5 +1,6 @@
{ lib { lib
, stdenv , stdenv
, fetchpatch
, fetchurl , fetchurl
, tzdata , tzdata
, substituteAll , substituteAll
@ -87,6 +88,12 @@ stdenv.mkDerivation rec {
}) })
./remove-tools-1.11.patch ./remove-tools-1.11.patch
./go_no_vendor_checks-1.16.patch ./go_no_vendor_checks-1.16.patch
# runtime: support riscv64 SV57 mode
(fetchpatch {
url = "https://github.com/golang/go/commit/1e3c19f3fee12e5e2b7802a54908a4d4d03960da.patch";
sha256 = "sha256-mk/9gXwQEcAkiRemF6GiNU0c0fhDR29/YcKgQR7ONTA=";
})
]; ];
GOOS = stdenv.targetPlatform.parsed.kernel.name; GOOS = stdenv.targetPlatform.parsed.kernel.name;

View file

@ -1,5 +1,6 @@
{ lib { lib
, stdenv , stdenv
, fetchpatch
, fetchurl , fetchurl
, tzdata , tzdata
, substituteAll , substituteAll
@ -87,6 +88,12 @@ stdenv.mkDerivation rec {
}) })
./remove-tools-1.11.patch ./remove-tools-1.11.patch
./go_no_vendor_checks-1.16.patch ./go_no_vendor_checks-1.16.patch
# runtime: support riscv64 SV57 mode
(fetchpatch {
url = "https://github.com/golang/go/commit/1e3c19f3fee12e5e2b7802a54908a4d4d03960da.patch";
sha256 = "sha256-mk/9gXwQEcAkiRemF6GiNU0c0fhDR29/YcKgQR7ONTA=";
})
]; ];
GOOS = stdenv.targetPlatform.parsed.kernel.name; GOOS = stdenv.targetPlatform.parsed.kernel.name;

View file

@ -5,6 +5,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -191,7 +192,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [ ] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -5,6 +5,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -203,7 +204,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [ ] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -5,6 +5,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -191,7 +192,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [ ] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -5,6 +5,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -153,7 +154,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [ ] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -6,6 +6,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -165,7 +166,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [ ] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -9,6 +9,7 @@
, python3 , python3
, python3Packages , python3Packages
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -327,7 +328,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [ ] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -5,6 +5,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libxml2 , libxml2
, ncurses , ncurses
@ -168,10 +169,9 @@ stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ] ++ lib.optionals (enableGoldPlugin) [
++ lib.optional (!isDarwin)
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
++ lib.optionals (isDarwin) [ ] ++ lib.optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false" "-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [

View file

@ -4,6 +4,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libxml2 , libxml2
, ncurses , ncurses
@ -162,7 +163,7 @@ stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals (isDarwin) [ ] ++ optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -5,6 +5,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -180,7 +181,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals (isDarwin) [ ] ++ optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -5,6 +5,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -173,7 +174,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals (isDarwin) [ ] ++ optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -5,6 +5,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? libbfd.hasPluginAPI
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -188,7 +189,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals (isDarwin) [ ] ++ optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -6,6 +6,7 @@
, cmake , cmake
, python3 , python3
, libffi , libffi
, enableGoldPlugin ? (!stdenv.isDarwin && !stdenv.targetPlatform.isWasi)
, libbfd , libbfd
, libpfm , libpfm
, libxml2 , libxml2
@ -151,7 +152,7 @@ in stdenv.mkDerivation (rec {
"-DSPHINX_OUTPUT_MAN=ON" "-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF" "-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF" "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
] ++ optionals (!isDarwin) [ ] ++ optionals (enableGoldPlugin) [
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
] ++ optionals isDarwin [ ] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"

View file

@ -49,6 +49,12 @@ stdenv.mkDerivation {
runHook postConfigure runHook postConfigure
''; '';
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-parameter"
"-Wno-error=use-after-free"
];
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
cd src cd src

View file

@ -1,64 +0,0 @@
# New rust versions should first go to staging.
# Things to check after updating:
# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
# This testing can be also done by other volunteers as part of the pull
# request review, in case platforms cannot be covered.
# 2. The LLVM version used for building should match with rust upstream.
# Check the version number in the src/llvm-project git submodule in:
# https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
# 3. Firefox and Thunderbird should still build on x86_64-linux.
{ stdenv, lib
, buildPackages
, newScope, callPackage
, CoreFoundation, Security, SystemConfiguration
, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
, makeRustPlatform
, llvmPackages_11
, llvmPackages_14, llvm_14
} @ args:
import ./default.nix {
rustcVersion = "1.66.1";
rustcSha256 = "sha256-WzyTOpTHIYdwXU7ikxmLq/3QlEL1k3+9aF2zqB9JWbo=";
llvmSharedForBuild = pkgsBuildBuild.llvmPackages_14.libllvm.override { enableSharedLibraries = true; };
llvmSharedForHost = pkgsBuildHost.llvmPackages_14.libllvm.override { enableSharedLibraries = true; };
llvmSharedForTarget = pkgsBuildTarget.llvmPackages_14.libllvm.override { enableSharedLibraries = true; };
llvmBootstrapForDarwin = llvmPackages_11;
# For use at runtime
llvmShared = llvm_14.override { enableSharedLibraries = true; };
# Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
llvmPackages = llvmPackages_14;
# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.65.0";
# fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
bootstrapHashes = {
i686-unknown-linux-gnu = "b29869f8e2c7029150a929b2c4e26843f363846ad99253a25be6abcfa8e84f46";
x86_64-unknown-linux-gnu = "8f754fdd5af783fe9020978c64e414cb45f3ad0a6f44d045219bbf2210ca3cb9";
x86_64-unknown-linux-musl = "716984def5509a844c2dde1c7be42bfadeb179f751d5c1a30c9c7198c8c089cd";
arm-unknown-linux-gnueabihf = "e27f835c16bfcb66ad022a17d5c4602899e021e483a432ca4cc2cb4ecd39e938";
armv7-unknown-linux-gnueabihf = "5376d467a29b32cacb771e0c76dc280bd623852709e7ffd92caabab076d5475f";
aarch64-unknown-linux-gnu = "f406136010e6a1cdce3fb6573506f00d23858af49dd20a46723c3fa5257b7796";
aarch64-unknown-linux-musl = "4b701dc3cbac04ebf0e336cff2f4ce5fc1a1984c183226863c9ed911eb00b07e";
x86_64-apple-darwin = "139087a3937799415fd829e5a88162a69a32c23725a44457f9c96b98e4d64a7c";
aarch64-apple-darwin = "7ddc335bd10fc32d3039ef36248a5d0c4865db2437c8aad20a2428a6cf41df09";
powerpc64le-unknown-linux-gnu = "3f1d0d5bb13213348dc65e373f8c412fc0a12ee55abc1c864f7e0300932fc687";
riscv64gc-unknown-linux-gnu = "aac7067348d218faa452b4bdc735778a51570a310ad645313ec767b5d7c88492";
mips64el-unknown-linux-gnuabi64 = "d91ed3857c5256720da890f6533684b684e880bf9006dc4e4f4181213a5c4a09";
};
selectRustPackage = pkgs: pkgs.rust_1_66;
rustcPatches = [
];
}
(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_11" "llvmPackages_14" "llvm_14"])

View file

@ -0,0 +1,81 @@
# New rust versions should first go to staging.
# Things to check after updating:
# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
# This testing can be also done by other volunteers as part of the pull
# request review, in case platforms cannot be covered.
# 2. The LLVM version used for building should match with rust upstream.
# Check the version number in the src/llvm-project git submodule in:
# https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
# 3. Firefox and Thunderbird should still build on x86_64-linux.
{ stdenv, lib
, buildPackages
, newScope, callPackage
, CoreFoundation, Security, SystemConfiguration
, pkgsBuildTarget, pkgsBuildBuild, pkgsBuildHost
, makeRustPlatform
, llvmPackages_11
, llvmPackages_15, llvm_15
, fetchpatch
} @ args:
import ./default.nix {
rustcVersion = "1.67.0";
rustcSha256 = "sha256-0CnxT85Foux6mmBdKgpAquRznLL9rinun3pukCWn/eQ=";
llvmSharedForBuild = pkgsBuildBuild.llvmPackages_15.libllvm.override { enableSharedLibraries = true; };
llvmSharedForHost = pkgsBuildHost.llvmPackages_15.libllvm.override { enableSharedLibraries = true; };
llvmSharedForTarget = pkgsBuildTarget.llvmPackages_15.libllvm.override { enableSharedLibraries = true; };
llvmBootstrapForDarwin = llvmPackages_11;
# For use at runtime
llvmShared = llvm_15.override { enableSharedLibraries = true; };
# Expose llvmPackages used for rustc from rustc via passthru for LTO in Firefox
llvmPackages = llvmPackages_15;
# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.66.1";
# fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
bootstrapHashes = {
i686-unknown-linux-gnu = "823128f64e902ee8aff61488c552c983e17ccca10c3f46dd93fde924d5100eb3";
x86_64-unknown-linux-gnu = "7ecf79e9ea23d05917b0172f9f81fb1e47011d261a719998f8d5620a1e835023";
x86_64-unknown-linux-musl = "70b660148238b8a137c6f165b0bc7bdcb50204c22a314bed6174ecd672f02e57";
arm-unknown-linux-gnueabihf = "12c93efe71f3334ef6e718786f6a60b9566f097d23a7f1e8f38ed9add209126f";
armv7-unknown-linux-gnueabihf = "f43c8cd3fd7d1c1e08bd6317220b2ec9b25891f464604f80bb17985b09bbf62a";
aarch64-unknown-linux-gnu = "84b8a79803c1b91386460fe6a7d04c54002344452ff8e5c5631d5fa275ed0c9c";
aarch64-unknown-linux-musl = "b2665da33efd328cff192a67ad026ea84f9deab8d1971892f4bbc22647606163";
x86_64-apple-darwin = "0fcf341db2579aa6eb61a3430cd1dbc79b042dfe89686b93cc887d818d086c30";
aarch64-apple-darwin = "03469fcaa0d8c505e6db03c18ded73cfbb6a2ce159292f8cf06c042bfc9f7cf9";
powerpc64le-unknown-linux-gnu = "ccf915a0137bb83a9d9b133a234ae53cc099f2ba26e3cb09d209b47bbee2ade7";
riscv64gc-unknown-linux-gnu = "525cb05edaf3ed0560753b413c72dd1b06492df28bf3c427a66fda683fdca3fc";
mips64el-unknown-linux-gnuabi64 = "3c241cc80410fe389e8b04beda62c42496c225fe8776db9d55a498c53244f7a6";
};
selectRustPackage = pkgs: pkgs.rust_1_67;
rustcPatches = [
# fix thin archive reading
# https://github.com/rust-lang/rust/pull/107360
(fetchpatch {
name = "revert-back-to-llvmarchivebuilder-on-all-platforms.patch";
url = "https://github.com/rust-lang/rust/commit/de363d54c40a378717881240e719f5f7223ba376.patch";
hash = "sha256-3Xb803LZUZ1dldxGJ65Iw6gg1V1K827OB/0b32GqilU=";
})
# Fixes ICE.
# https://github.com/rust-lang/rust/pull/107688
(fetchpatch {
name = "re-erased-regions-are-local.patch";
url = "https://github.com/rust-lang/rust/commit/9d110847ab7f6aef56a8cd20cb6cea4fbcc51cd9.patch";
excludes = [ "*tests/*" ];
hash = "sha256-EZH5K1BEOOfi97xZr1xEHFP4jjvJ1+xqtRMvxBoL8pU=";
})
];
}
(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_11" "llvmPackages_15" "llvm_15"])

View file

@ -1,6 +1,6 @@
{ lib, stdenv, pkgsHostHost { lib, stdenv, pkgsHostHost
, file, curl, pkg-config, python3, openssl, cmake, zlib , file, curl, pkg-config, python3, openssl, cmake, zlib
, installShellFiles, makeWrapper, cacert, rustPlatform, rustc , installShellFiles, makeWrapper, rustPlatform, rustc
, CoreFoundation, Security , CoreFoundation, Security
, auditable ? false # TODO: change to true when this is the default , auditable ? false # TODO: change to true when this is the default
}: }:
@ -28,7 +28,7 @@ rustPlatform.buildRustPackage {
(lib.getDev pkgsHostHost.curl) (lib.getDev pkgsHostHost.curl)
zlib zlib
]; ];
buildInputs = [ cacert file curl python3 openssl zlib ] buildInputs = [ file curl python3 openssl zlib ]
++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ]; ++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
# cargo uses git-rs which is made for a version of libgit2 from recent master that # cargo uses git-rs which is made for a version of libgit2 from recent master that
@ -39,14 +39,7 @@ rustPlatform.buildRustPackage {
RUSTC_BOOTSTRAP = 1; RUSTC_BOOTSTRAP = 1;
postInstall = '' postInstall = ''
# NOTE: We override the `http.cainfo` option usually specified in wrapProgram "$out/bin/cargo" --suffix PATH : "${rustc}/bin"
# `.cargo/config`. This is an issue when users want to specify
# their own certificate chain as environment variables take
# precedence
wrapProgram "$out/bin/cargo" \
--suffix PATH : "${rustc}/bin" \
--set CARGO_HTTP_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt" \
--set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt"
installManPage src/tools/cargo/src/etc/man/* installManPage src/tools/cargo/src/etc/man/*

View file

@ -165,7 +165,6 @@ in stdenv.mkDerivation rec {
]; ];
buildInputs = [ openssl ] buildInputs = [ openssl ]
# TODO: remove libiconv once 1.66 is used to bootstrap
++ optionals stdenv.isDarwin [ libiconv Security ] ++ optionals stdenv.isDarwin [ libiconv Security ]
++ optional (!withBundledLLVM) llvmShared; ++ optional (!withBundledLLVM) llvmShared;

View file

@ -38,7 +38,6 @@ stdenv.mkDerivation rec {
"-L${variables.libdir}" "-L${variables.libdir}"
"-Wl,--rpath ${variables.libdir}" "-Wl,--rpath ${variables.libdir}"
"-ltcc" "-ltcc"
"-ldl"
]; ];
variables = rec { variables = rec {
prefix = "${placeholder "out"}"; prefix = "${placeholder "out"}";

View file

@ -33,6 +33,11 @@ stdenv.mkDerivation rec {
-L${sqlite.out}/lib"; -L${sqlite.out}/lib";
''; '';
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=use-after-free"
];
# Be sure to keep the statically linked libraries # Be sure to keep the statically linked libraries
dontDisableStatic = true; dontDisableStatic = true;

View file

@ -21,6 +21,10 @@ stdenv.mkDerivation rec {
"-Wno-error=maybe-uninitialized" "-Wno-error=maybe-uninitialized"
# Needed with GCC 11 # Needed with GCC 11
"-Wno-error=misleading-indentation" "-Wno-error=misleading-indentation"
# Needed with GCC 12
"-Wno-error=nonnull"
"-Wno-error=stringop-overflow"
"-Wno-error=use-after-free"
]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference"); ]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference");
patchPhase = lib.optionalString stdenv.isDarwin '' patchPhase = lib.optionalString stdenv.isDarwin ''

View file

@ -273,13 +273,13 @@ in {
mkRuby = generic; mkRuby = generic;
ruby_2_7 = generic { ruby_2_7 = generic {
version = rubyVersion "2" "7" "6" ""; version = rubyVersion "2" "7" "7" "";
sha256 = "042xrdk7hsv4072bayz3f8ffqh61i8zlhvck10nfshllq063n877"; sha256 = "sha256-4QEn22kdf/NkAs/oj0GMjQJaPx7qkgRLFi3XLwuMe5A=";
}; };
ruby_3_0 = generic { ruby_3_0 = generic {
version = rubyVersion "3" "0" "4" ""; version = rubyVersion "3" "0" "5" "";
sha256 = "0avj4g3s2839b2y4m6pk8kid74r8nj7k0qm2rsdcwjzhg8h7rd3h"; sha256 = "sha256-mvxjgKAnpP4a4aPi7MtrSXucWsBjHBLKVvm3vrSEh3Y=";
}; };
ruby_3_1 = generic { ruby_3_1 = generic {

View file

@ -1,17 +1,15 @@
{ patchSet, useRailsExpress, ops, patchLevel, fetchpatch }: { patchSet, useRailsExpress, ops, patchLevel, fetchpatch }:
{ {
"2.7.6" = ops useRailsExpress [ "2.7.7" = ops useRailsExpress [
"${patchSet}/patches/ruby/2.7/head/railsexpress/01-fix-with-openssl-dir-option.patch" "${patchSet}/patches/ruby/2.7/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/02-fix-broken-tests-caused-by-ad.patch" "${patchSet}/patches/ruby/2.7/head/railsexpress/02-improve-gc-stats.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/03-improve-gc-stats.patch" "${patchSet}/patches/ruby/2.7/head/railsexpress/03-more-detailed-stacktrace.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/04-more-detailed-stacktrace.patch" "${patchSet}/patches/ruby/2.7/head/railsexpress/04-malloc-trim.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/05-malloc-trim.patch"
]; ];
"3.0.4" = ops useRailsExpress [ "3.0.5" = ops useRailsExpress [
"${patchSet}/patches/ruby/3.0/head/railsexpress/01-fix-with-openssl-dir-option.patch" "${patchSet}/patches/ruby/3.0/head/railsexpress/01-improve-gc-stats.patch"
"${patchSet}/patches/ruby/3.0/head/railsexpress/02-improve-gc-stats.patch" "${patchSet}/patches/ruby/3.0/head/railsexpress/02-malloc-trim.patch"
"${patchSet}/patches/ruby/3.0/head/railsexpress/03-malloc-trim.patch"
]; ];
"3.1.2" = ops useRailsExpress [ "3.1.2" = ops useRailsExpress [
"${patchSet}/patches/ruby/3.1/head/railsexpress/01-improve-gc-stats.patch" "${patchSet}/patches/ruby/3.1/head/railsexpress/01-improve-gc-stats.patch"

View file

@ -3,6 +3,6 @@
fetchFromGitHub { fetchFromGitHub {
owner = "skaes"; owner = "skaes";
repo = "rvm-patchsets"; repo = "rvm-patchsets";
rev = "a6429bb1a7fb9b5798c22f43338739a6c192b42d"; rev = "e6574c54a34fe6e4d45aa1433872a22ddfe14cf3";
sha256 = "sha256-NpSa+uGQA1rfHNcLzPNTK65J+Wk9ZlzhHFePDA4uuo0="; hash = "sha256-x2KvhgRVJ4Nc5v1j4DggKO1u3otG8HVMxhq4yuUKnds=";
} }

View file

@ -41,6 +41,8 @@ findInstalledTclPkgs() {
# Wrap any freshly-installed binaries and set up their TCLLIBPATH # Wrap any freshly-installed binaries and set up their TCLLIBPATH
wrapTclBins() { wrapTclBins() {
if [ "$dontWrapTclBinaries" ]; then return; fi
if [[ -z "${TCLLIBPATH-}" ]]; then if [[ -z "${TCLLIBPATH-}" ]]; then
echo "skipping automatic Tcl binary wrapping (nothing to do)" echo "skipping automatic Tcl binary wrapping (nothing to do)"
return return

View file

@ -23,6 +23,11 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ]; cmakeFlags = [ "-DASSIMP_BUILD_ASSIMP_TOOLS=ON" ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
];
meta = with lib; { meta = with lib; {
description = "A library to import various 3D model formats"; description = "A library to import various 3D model formats";
homepage = "https://www.assimp.org/"; homepage = "https://www.assimp.org/";

View file

@ -29,11 +29,14 @@ stdenv.mkDerivation rec {
# Do not build static libraries # Do not build static libraries
cmakeFlags = [ "-DENABLE_STATIC=NO" ]; cmakeFlags = [ "-DENABLE_STATIC=NO" ];
NIX_CFLAGS_COMPILE = toString [ NIX_CFLAGS_COMPILE = [
"-Wno-error=cast-function-type" "-Wno-error=cast-function-type"
"-Wno-error=deprecated-declarations" "-Wno-error=deprecated-declarations"
"-Wno-error=format-truncation" "-Wno-error=format-truncation"
"-Wno-error=stringop-overflow" "-Wno-error=stringop-overflow"
] ++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
# Needed with GCC 12 but problematic with some old GCCs and probably clang
"-Wno-error=use-after-free"
]; ];
propagatedBuildInputs = [ libantlr3c mbedtls_2 bctoolbox belr ]; propagatedBuildInputs = [ libantlr3c mbedtls_2 bctoolbox belr ];

View file

@ -30,6 +30,11 @@ buildGoModule {
export GOARCH=$(go env GOHOSTARCH) export GOARCH=$(go env GOHOSTARCH)
''; '';
NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
# Needed with GCC 12 but breaks on darwin (with clang)
"-Wno-error=stringop-overflow"
];
buildPhase = '' buildPhase = ''
ninjaBuildPhase ninjaBuildPhase
''; '';

View file

@ -25,6 +25,11 @@ stdenv.mkDerivation rec {
# Do not build static libraries # Do not build static libraries
cmakeFlags = [ "-DENABLE_STATIC=NO" "-DCMAKE_C_FLAGS=-Wno-error=cast-function-type" ]; cmakeFlags = [ "-DENABLE_STATIC=NO" "-DCMAKE_C_FLAGS=-Wno-error=cast-function-type" ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=stringop-overflow"
];
meta = with lib; { meta = with lib; {
description = "An opensource implementation of ZRTP keys exchange protocol. Part of the Linphone project."; description = "An opensource implementation of ZRTP keys exchange protocol. Part of the Linphone project.";
homepage = "https://gitlab.linphone.org/BC/public/bzrtp"; homepage = "https://gitlab.linphone.org/BC/public/bzrtp";

View file

@ -30,11 +30,14 @@ stdenv.mkDerivation rec {
"-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT=" "-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT="
]; ];
patches = # From debian patches = [
[ ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch # From debian
./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
./Install-contribs-lib.patch ./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ]; ./Install-contribs-lib.patch
# From arch
./fix-missing-include-time.patch
] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ];
# fails with "Unable to find executable: # fails with "Unable to find executable:
# /build/clucene-core-2.3.3.4/build/bin/cl_test" # /build/clucene-core-2.3.3.4/build/bin/cl_test"

Some files were not shown because too many files have changed in this diff Show more