Merge branch 'staging' into staging-next

This commit is contained in:
Vladimír Čunát 2023-02-01 17:05:25 +01:00
commit 9e2af38827
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
240 changed files with 2403 additions and 1475 deletions

View file

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

View file

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

View file

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

View file

@ -63,6 +63,12 @@ stdenv.mkDerivation rec {
"-DWARNINGS_ARE_ERRORS=ON"
];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=mismatched-new-delete"
"-Wno-error=use-after-free"
];
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
# 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 ];
buildInputs = [ libjack2 ladspaH gtk2 alsa-lib libxml2 lrdf ];
NIX_LDFLAGS = "-ldl -lm -lpthread";
NIX_LDFLAGS = "-lm -lpthread";
meta = {
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
NIX_CFLAGS_COMPILE = "-fcommon";
NIX_LDFLAGS = "-ldl";
postInstall = ''
wrapProgram $out/bin/jamin --set LADSPA_PATH ${ladspaPlugins}/lib/ladspa
'';

View file

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

View file

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

View file

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

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 {
pname = "opusfile";
@ -12,7 +12,14 @@ stdenv.mkDerivation rec {
buildInputs = [ openssl libogg ];
propagatedBuildInputs = [ libopus ];
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
# see https://github.com/xiph/opusfile/issues/13
++ lib.optionals stdenv.hostPlatform.isWindows [ ./disable-cert-store.patch ];

View file

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

View file

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

View file

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

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.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
];
installPhase = ''
runHook preInstall

View file

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

View file

@ -11,6 +11,12 @@ mkDerivation rec {
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
nativeBuildInputs = [ pkg-config makeWrapper ];
buildInputs = [

View file

@ -9,7 +9,7 @@
, python3
, qttools # for translations
, wrapQtAppsHook
, ffmpeg-jami
, ffmpeg_5
, jami-daemon
, libnotify
, qt5compat
@ -43,7 +43,7 @@ stdenv.mkDerivation {
];
buildInputs = [
ffmpeg-jami
ffmpeg_5
jami-daemon
libnotify
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
, dbus
, dbus_cplusplus
, ffmpeg-jami
, ffmpeg_5
, fmt
, gmp
, gnutls
@ -51,7 +51,7 @@ stdenv.mkDerivation {
dbus
dbus_cplusplus
fmt
ffmpeg-jami
ffmpeg_5
gmp
gnutls
http-parser

View file

@ -4,7 +4,6 @@
, fetchFromGitHub
, fetchzip
, fetchpatch
, ffmpeg_5
, pjsip
, opendht
, jack
@ -41,31 +40,6 @@ let
readLinesToList = with builtins; file: filter (s: isString s && stringLength s > 0) (split "\n" (readFile file));
in
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:
let
patch-src = src + "/daemon/contrib/src/pjproject/";
@ -105,10 +79,10 @@ rec {
};
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 {
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
, libjpeg, openssl_1_1, libopus, ffmpeg, alsa-lib, libpulseaudio, protobuf
, openh264, usrsctp, libevent, libvpx
@ -31,6 +31,14 @@ stdenv.mkDerivation {
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 = [
# Building as a shared library isn't officially supported and may break at any time.
"-DBUILD_SHARED_LIBS=OFF"

View file

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

View file

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

View file

@ -60,9 +60,13 @@ stdenv.mkDerivation rec {
--prefix PATH : "$out/share/cbmc" \
'';
# fix "argument unused during compilation"
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang
"-Wno-unused-command-line-argument";
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=maybe-uninitialized"
] ++ lib.optionals stdenv.cc.isClang [
# fix "argument unused during compilation"
"-Wno-unused-command-line-argument"
];
# TODO: add jbmc support
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" ])
++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=maybe-uninitialized"
"-Wno-error=uninitialized"
];
postPatch = ''
substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \
--replace "/bin/bash" "${bash}/bin/bash"

View file

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

View file

@ -97,7 +97,7 @@ let
# patches are required for subtitle timing to work correctly. See:
# https://github.com/HandBrake/HandBrake/issues/4029
ffmpeg-version = "4.4.1";
ffmpeg-hb = ffmpeg-full.overrideAttrs (old: {
ffmpeg-hb = (ffmpeg-full.override { withSdl2 = false; }).overrideAttrs (old: {
version = ffmpeg-version;
src = fetchurl {
url = "https://www.ffmpeg.org/releases/ffmpeg-${ffmpeg-version}.tar.bz2";

View file

@ -343,18 +343,11 @@ stdenv.mkDerivation {
# compile, because it uses "#include_next <limits.h>" to find the
# limits.h file in ../includes-fixed. To remedy the problem,
# 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) (''
touch "$out/nix-support/libc-cflags"
touch "$out/nix-support/libc-ldflags"
echo "-B${libc_lib}${libc.libdir or "/lib/"}" >> $out/nix-support/libc-crt1-cflags
'' + 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
'' + optionalString (isGNU && (!(cc.langD or false))) ''
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 \
-Wl,-install_name,$libName \
-Wall -std=c99 -O3 -fPIC libredirect.c \
-ldl -shared -o "$libName"
-shared -o "$libName"
'' else if stdenv.isDarwin then ''
$CC -Wall -std=c99 -O3 -fPIC libredirect.c \
-Wl,-install_name,$out/lib/$libName \
-ldl -shared -o "$libName"
-shared -o "$libName"
'' else ''
$CC -Wall -std=c99 -O3 -fPIC libredirect.c \
-ldl -shared -o "$libName"
-shared -o "$libName"
''}
if [ -n "$doInstallCheck" ]; then

View file

@ -201,6 +201,37 @@ WRAPPER(int, __xstat64)(int ver, const char * path, struct stat64 * st)
WRAPPER_DEF(__xstat64)
#endif
#ifdef __linux__
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)
{
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)
// 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)
{
int (*access_real) (const char *, int mode) = LOOKUP_REAL(access);
@ -346,6 +388,14 @@ WRAPPER(int, system)(const char *command)
}
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)
{
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;
int testfd;
struct stat testsb;
#ifndef __APPLE__
struct stat64 testsb64;
#endif
#ifdef __linux__
struct statx testsbx;
#endif
char buf[PATH_MAX];
testfp = fopen(TESTPATH, "r");
@ -76,6 +82,20 @@ int main(int argc, char *argv[])
assert(access(TESTPATH, X_OK) == 0);
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
#ifdef __linux__
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(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
fi
set -- "$@" @addFlags@
set -- @addFlags@ "$@"
if (( ${#role_suffixes[@]} > 0 )); then
# replace env var with nix-modified one

View file

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

View file

@ -73,6 +73,9 @@ in stdenv.mkDerivation ({
${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
# 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
# ensure that the symlink is relative. This removes references to the output
@ -26,3 +28,10 @@ _makeSymlinksRelative() {
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";
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
mv $out/*.ttf $out/share/fonts/truetype
find $out -maxdepth 1 ! -type d -exec rm {} +
'';
mv *.ttf $out/share/fonts/truetype
sha256 = "sha256-bdMZg/mHYc0N6HiR8uNl0CjeOwBou+OYj3LPkyEUHUA=";
runHook postInstall
'';
meta = {
description = "GNU Free UCS Outline Fonts";
@ -24,6 +28,6 @@ fetchzip rec {
homepage = "https://www.gnu.org/software/freefont/";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all;
maintainers = [];
maintainers = [ ];
};
}

View file

@ -1,14 +1,22 @@
{ lib, fetchzip }:
fetchzip rec {
{ lib, stdenvNoCC, fetchzip }:
stdenvNoCC.mkDerivation rec {
pname = "capitaine-cursors-themed";
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
cp -r ./ $out/share/icons
runHook postInstall
'';
meta = with lib; {

View file

@ -1,23 +1,24 @@
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
fetchzip rec {
stdenvNoCC.mkDerivation rec {
pname = "cldr-annotations";
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
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
rm -rf $out/!(share)
shopt -u extglob dotglob
runHook postInstall
'';
hash = "sha256-9OOd69nBaDSt+ilL3PTGpcQgC60PnHqd8/CYa2LgeI0=";
meta = with lib; {
description = "Names and keywords for Unicode characters from the Common Locale Data Repository";
homepage = "https://cldr.unicode.org";

View file

@ -1,20 +1,24 @@
{ lib, fetchFromGitHub }:
{ lib, stdenvNoCC, fetchFromGitHub }:
let
stdenvNoCC.mkDerivation {
pname = "publicsuffix-list";
version = "2021-09-03";
in fetchFromGitHub {
name = "${pname}-${version}";
owner = "publicsuffix";
repo = "list";
rev = "2533d032871e1ef1f410fc0754b848d4587c8021";
sha256 = "sha256-Q8uIXM1CMu8dlWcVoL17M1XRGu3kG7Y7jpx0oHQh+2I=";
version = "unstable-2021-09-03";
postFetch = ''
install -Dm0444 $out/public_suffix_list.dat $out/tests/test_psl.txt -t $out/share/publicsuffix
shopt -s extglob dotglob
rm -rf $out/!(share)
shopt -u extglob dotglob
src = fetchFromGitHub {
owner = "publicsuffix";
repo = "list";
rev = "2533d032871e1ef1f410fc0754b848d4587c8021";
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; {

View file

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

View file

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

View file

@ -151,13 +151,6 @@ stdenv.mkDerivation rec {
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 = [
curl
tzdata

View file

@ -187,7 +187,7 @@ stdenv.mkDerivation ({
depsTargetTarget = optional (!crossStageStatic && threadsCross != {} && threadsCross.package != null) threadsCross.package;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = (import ../common/pre-configure.nix {
inherit lib;
@ -228,7 +228,6 @@ stdenv.mkDerivation ({
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -193,7 +193,7 @@ stdenv.mkDerivation ({
depsTargetTarget = optional (!crossStageStatic && threadsCross != {} && threadsCross.package != null) threadsCross.package;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = (import ../common/pre-configure.nix {
inherit lib;
@ -234,7 +234,6 @@ stdenv.mkDerivation ({
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -228,7 +228,7 @@ stdenv.mkDerivation ({
depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = (import ../common/pre-configure.nix {
@ -270,7 +270,6 @@ stdenv.mkDerivation ({
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -227,7 +227,6 @@ stdenv.mkDerivation ({
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -247,7 +247,6 @@ stdenv.mkDerivation ({
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -226,7 +226,7 @@ stdenv.mkDerivation ({
depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = import ../common/pre-configure.nix {
inherit lib;
@ -265,7 +265,6 @@ stdenv.mkDerivation ({
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -194,7 +194,7 @@ stdenv.mkDerivation ({
depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;
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 = import ../common/pre-configure.nix {
inherit lib;
@ -233,7 +233,6 @@ stdenv.mkDerivation ({
;
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -175,7 +175,7 @@ stdenv.mkDerivation ({
depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = import ../common/pre-configure.nix {
inherit lib;
@ -212,7 +212,6 @@ stdenv.mkDerivation ({
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -187,7 +187,7 @@ stdenv.mkDerivation ({
depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm";
preConfigure = import ../common/pre-configure.nix {
inherit lib;
@ -226,7 +226,6 @@ stdenv.mkDerivation ({
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
targetPlatformConfig = targetPlatform.config;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)

View file

@ -203,17 +203,6 @@ preInstall() {
ln -s lib "$out/${targetConfig}/lib32"
ln -s lib "${!outputLib}/${targetConfig}/lib32"
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
, stdenv
, fetchpatch
, fetchurl
, tzdata
, substituteAll
@ -87,6 +88,12 @@ stdenv.mkDerivation rec {
})
./remove-tools-1.11.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;

View file

@ -1,5 +1,6 @@
{ lib
, stdenv
, fetchpatch
, fetchurl
, tzdata
, substituteAll
@ -87,6 +88,12 @@ stdenv.mkDerivation rec {
})
./remove-tools-1.11.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;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -49,6 +49,12 @@ stdenv.mkDerivation {
runHook postConfigure
'';
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-parameter"
"-Wno-error=use-after-free"
];
buildPhase = ''
runHook preBuild
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,64 @@
# 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
} @ 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 = [
];
}
(builtins.removeAttrs args [ "fetchpatch" "pkgsBuildHost" "llvmPackages_11" "llvmPackages_15" "llvm_15"])

View file

@ -1,6 +1,6 @@
{ lib, stdenv, pkgsHostHost
, file, curl, pkg-config, python3, openssl, cmake, zlib
, installShellFiles, makeWrapper, cacert, rustPlatform, rustc
, installShellFiles, makeWrapper, rustPlatform, rustc
, CoreFoundation, Security
, auditable ? false # TODO: change to true when this is the default
}:
@ -28,7 +28,7 @@ rustPlatform.buildRustPackage {
(lib.getDev pkgsHostHost.curl)
zlib
];
buildInputs = [ cacert file curl python3 openssl zlib ]
buildInputs = [ file curl python3 openssl zlib ]
++ lib.optionals stdenv.isDarwin [ CoreFoundation Security ];
# 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;
postInstall = ''
# NOTE: We override the `http.cainfo` option usually specified in
# `.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"
wrapProgram "$out/bin/cargo" --suffix PATH : "${rustc}/bin"
installManPage src/tools/cargo/src/etc/man/*

View file

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

View file

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

View file

@ -21,6 +21,10 @@ stdenv.mkDerivation rec {
"-Wno-error=maybe-uninitialized"
# Needed with GCC 11
"-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");
patchPhase = lib.optionalString stdenv.isDarwin ''

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
"-Wno-error=deprecated-declarations"
"-Wno-error=format-truncation"
"-Wno-error=stringop-overflow"
# Needed with GCC 12
"-Wno-error=use-after-free"
];
propagatedBuildInputs = [ libantlr3c mbedtls_2 bctoolbox belr ];

View file

@ -30,6 +30,11 @@ buildGoModule {
export GOARCH=$(go env GOHOSTARCH)
'';
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=stringop-overflow"
];
buildPhase = ''
ninjaBuildPhase
'';

View file

@ -25,6 +25,11 @@ stdenv.mkDerivation rec {
# Do not build static libraries
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; {
description = "An opensource implementation of ZRTP keys exchange protocol. Part of the Linphone project.";
homepage = "https://gitlab.linphone.org/BC/public/bzrtp";

View file

@ -30,11 +30,14 @@ stdenv.mkDerivation rec {
"-DLUCENE_STATIC_CONSTANT_SYNTAX_EXITCODE__TRYRUN_OUTPUT="
];
patches = # From debian
[ ./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
./Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
./Install-contribs-lib.patch
] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ];
patches = [
# From debian
./Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
./Fixing_ZLIB_configuration_in_shared_CMakeLists.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:
# /build/clucene-core-2.3.3.4/build/bin/cl_test"

View file

@ -0,0 +1,49 @@
From c1c2000c35ff39b09cb70fbdf66a107d3b17a674 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 12 Oct 2022 08:40:49 +0200
Subject: [PATCH] Fix missing #include <time.h>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
At least on recent Fedora 37 beta, building now failed with
> CLucene/document/DateTools.cpp:26:19: error: gmtime was not declared in this scope
> 26 | tm *ptm = gmtime(&secs);
> | ^~~~~~
etc.
As it turns out, after 22f9d40320e3deeaa8d6aaa7a770077c20a21dae "git-svn-id:
https://clucene.svn.sourceforge.net/svnroot/clucene/branches/lucene2_3_2@2672
20ef185c-fe11-0410-a618-ba9304b01011" on 2008-06-26 had commented out
_CL_TIME_WITH_SYS_TIME in clucene-config.h.cmake as "not actually used for
anything", then cceccfb52917b5f4da447f1cf20c135952d41442 "Presenting DateTools
and deprecating DateField. DateTools still requires some testing and its own
unit testing" on 2008-06-29 had introduced this use of it (into then
src/CLucene/document/DateTools.H). And apparently most build environments have
silently been happy ever since when the dead leading check for
_CL_TIME_WITH_SYS_TIME didn't include both <sys/time.h> and <time.h>, but the
following check for _CL_HAVE_SYS_TIME_H only included <sys/time.h> but not
<time.h>.
---
src/shared/CLucene/clucene-config.h.cmake | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/shared/CLucene/clucene-config.h.cmake b/src/shared/CLucene/clucene-config.h.cmake
index bd8683a5..6fe0f92b 100644
--- a/src/shared/CLucene/clucene-config.h.cmake
+++ b/src/shared/CLucene/clucene-config.h.cmake
@@ -100,8 +100,7 @@ ${SYMBOL__T}
//#cmakedefine _CL_STAT_MACROS_BROKEN
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-//not actually used for anything...
-//#cmakedefine _CL_TIME_WITH_SYS_TIME 1
+#cmakedefine _CL_TIME_WITH_SYS_TIME 1
/* Define that we will be using -fvisibility=hidden, and
* make public classes visible using __attribute__ ((visibility("default")))
--
2.37.3

View file

@ -24,6 +24,8 @@ stdenv.mkDerivation {
NIX_CFLAGS_COMPILE = [
"-Wno-error=range-loop-construct"
# Needed with GCC 12
"-Wno-error=deprecated-declarations"
];
meta = with lib; {

View file

@ -1,8 +1,4 @@
{ callPackage, ... }@args:
callPackage ./generic.nix (rec {
import ./generic.nix rec {
version = "4.4.3";
branch = version;
sha256 = "sha256-M7jC281TD+HbVxBBU0Vgm0yiJ70NoeOpMy27DxH9Jzo=";
} // args)
sha256 = "sha256-zZDzG1hD+0AHqElzeGR6OVm+H5wqtdktloSPmEUzT/c=";
}

View file

@ -1,7 +1,4 @@
{ callPackage, ... }@args:
callPackage ./generic.nix (rec {
import ./generic.nix rec {
version = "5.1.2";
branch = version;
sha256 = "sha256-OaC8yNmFSfFsVwYkZ4JGpqxzbAZs69tAn5UC6RWyLys=";
} // args)
sha256 = "sha256-4jcfwIE0/DgP7ibwkrSm/aPiHIMFn34JNcXkCMx4ceI=";
}

View file

@ -1,205 +1,645 @@
{ lib, stdenv, buildPackages, fetchurl, pkg-config, addOpenGLRunpath, perl, texinfo, yasm
, alsa-lib, bzip2, fontconfig, freetype, gnutls, libiconv, lame, libass, libogg
, libssh, libtheora, libva, libdrm, libvorbis, xz, soxr
, x264, x265, xvidcore, zimg, zlib, libopus, speex, nv-codec-headers, dav1d
, vpxSupport ? !stdenv.isAarch32, libvpx
, srtSupport ? true, srt
, vaapiSupport ? ((stdenv.isLinux || stdenv.isFreeBSD) && !stdenv.isAarch32)
, openglSupport ? false, libGLU, libGL
, libmfxSupport ? false, intel-media-sdk
, libaomSupport ? false, libaom
# Build options
, runtimeCpuDetectBuild ? true # Detect CPU capabilities at runtime
, multithreadBuild ? true # Multithreading via pthreads/win32 threads
, sdlSupport ? !stdenv.isAarch32, SDL2
, vdpauSupport ? !stdenv.isAarch32, libvdpau
# Developer options
, debugDeveloper ? false
, optimizationsDeveloper ? true
, extraWarningsDeveloper ? false
, Cocoa, CoreMedia, VideoToolbox
# Inherit generics
, branch, sha256, version, patches ? [], knownVulnerabilities ? []
, doCheck ? true
, pulseaudioSupport ? stdenv.isLinux
{ version, sha256, extraPatches ? [], knownVulnerabilities ? [] }:
{ lib, stdenv, buildPackages, removeReferencesTo, addOpenGLRunpath, pkg-config, perl, texinfo, yasm
, ffmpegVariant ? "small" # Decides which dependencies are enabled by default
# Build with headless deps; excludes dependencies that are only necessary for
# GUI applications. To be used for purposes that don't generally need such
# components and i.e. only depend on libav
, withHeadlessDeps ? ffmpegVariant == "headless" || withSmallDeps
# Dependencies a user might customarily expect from a regular ffmpeg build.
# /All/ packages that depend on ffmpeg and some of its feaures should depend
# on the small variant. Small means the minimal set of features that satisfies
# all dependants in Nixpkgs
, withSmallDeps ? ffmpegVariant == "small" || withFullDeps
# Everything enabled; only guarded behind platform exclusivity or brokeness.
# If you need to depend on ffmpeg-full because ffmpeg is missing some feature
# your package needs, you should enable that feature in regular ffmpeg
# instead.
, withFullDeps ? ffmpegVariant == "full"
, fetchgit
, fetchpatch
# Feature flags
, withAlsa ? withHeadlessDeps && stdenv.isLinux # Alsa in/output supporT
, withAom ? withFullDeps # AV1 reference encoder
, withAss ? withHeadlessDeps && stdenv.hostPlatform == stdenv.buildPlatform # (Advanced) SubStation Alpha subtitle rendering
, withBluray ? withFullDeps # BluRay reading
, withBs2b ? withFullDeps # bs2b DSP library
, withBzlib ? withHeadlessDeps
, withCaca ? withFullDeps # Textual display (ASCII art)
, withCelt ? withFullDeps # CELT decoder
, withCrystalhd ? withFullDeps
, withCuda ? withFullDeps && (with stdenv; (!isDarwin && !isAarch64))
, withCudaLLVM ? withFullDeps
, withDav1d ? withHeadlessDeps # AV1 decoder (focused on speed and correctness)
, withDc1394 ? withFullDeps && !stdenv.isDarwin # IIDC-1394 grabbing (ieee 1394)
, withDrm ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # libdrm support
, withFdkAac ? withFullDeps && withUnfree # Fraunhofer FDK AAC de/encoder
, withFontconfig ? withHeadlessDeps # Needed for drawtext filter
, withFreetype ? withHeadlessDeps # Needed for drawtext filter
, withFrei0r ? withFullDeps # frei0r video filtering
, withFribidi ? withFullDeps # Needed for drawtext filter
, withGlslang ? withFullDeps && !stdenv.isDarwin
, withGme ? withFullDeps # Game Music Emulator
, withGnutls ? withHeadlessDeps
, withGsm ? withFullDeps # GSM de/encoder
, withIconv ? withHeadlessDeps
, withIlbc ? withFullDeps
, withJack ? withFullDeps && !stdenv.isDarwin # Jack audio
, withLadspa ? withFullDeps # LADSPA audio filtering
, withLzma ? withHeadlessDeps # xz-utils
, withMfx ? withFullDeps && (with stdenv.targetPlatform; isLinux && !isAarch) # Hardware acceleration via intel-media-sdk/libmfx
, withModplug ? withFullDeps && !stdenv.isDarwin # ModPlug support
, withMp3lame ? withHeadlessDeps # LAME MP3 encoder
, withMysofa ? withFullDeps # HRTF support via SOFAlizer
, withNvdec ? withHeadlessDeps && !stdenv.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform
, withNvenc ? withHeadlessDeps && !stdenv.isDarwin && stdenv.hostPlatform == stdenv.buildPlatform
, withOgg ? withHeadlessDeps # Ogg container used by vorbis & theora
, withOpenal ? withFullDeps # OpenAL 1.1 capture support
, withOpencl ? withFullDeps
, withOpencoreAmrnb ? withFullDeps # AMR-NB de/encoder & AMR-WB decoder
, withOpengl ? false # OpenGL rendering
, withOpenh264 ? withFullDeps # H.264/AVC encoder
, withOpenjpeg ? withFullDeps # JPEG 2000 de/encoder
, withOpenmpt ? withFullDeps # Tracked music files decoder
, withOpus ? withHeadlessDeps # Opus de/encoder
, withPulse ? withSmallDeps && !stdenv.isDarwin # Pulseaudio input support
, withRav1e ? withFullDeps # AV1 encoder (focused on speed and safety)
, withRtmp ? false # RTMP[E] support
, withSamba ? withFullDeps && !stdenv.isDarwin # Samba protocol
, withSdl2 ? withSmallDeps
, withSoxr ? withHeadlessDeps # Resampling via soxr
, withSpeex ? withHeadlessDeps # Speex de/encoder
, withSrt ? withHeadlessDeps # Secure Reliable Transport (SRT) protocol
, withSsh ? withHeadlessDeps # SFTP protocol
, withSvg ? withFullDeps # SVG protocol
, withSvtav1 ? withFullDeps && !stdenv.isAarch64 # AV1 encoder/decoder (focused on speed and correctness)
, withTheora ? withHeadlessDeps # Theora encoder
, withV4l2 ? withFullDeps && !stdenv.isDarwin # Video 4 Linux support
, withV4l2M2m ? withV4l2
, withVaapi ? withHeadlessDeps && (with stdenv; isLinux || isFreeBSD) # Vaapi hardware acceleration
, withVdpau ? withSmallDeps # Vdpau hardware acceleration
, withVidStab ? withFullDeps # Video stabilization
, withVmaf ? withFullDeps && withGPLv3 && !stdenv.isAarch64 # Netflix's VMAF (Video Multi-Method Assessment Fusion)
, withVoAmrwbenc ? withFullDeps # AMR-WB encoder
, withVorbis ? withHeadlessDeps # Vorbis de/encoding, native encoder exists
, withVpx ? withHeadlessDeps && stdenv.buildPlatform == stdenv.hostPlatform # VP8 & VP9 de/encoding
, withVulkan ? withFullDeps && !stdenv.isDarwin
, withWebp ? withFullDeps # WebP encoder
, withX264 ? withHeadlessDeps # H.264/AVC encoder
, withX265 ? withHeadlessDeps # H.265/HEVC encoder
, withXavs ? withFullDeps # AVS encoder
, withXcb ? withXcbShm || withXcbxfixes || withXcbShape # X11 grabbing using XCB
, withXcbShape ? withFullDeps # X11 grabbing shape rendering
, withXcbShm ? withFullDeps # X11 grabbing shm communication
, withXcbxfixes ? withFullDeps # X11 grabbing mouse rendering
, withXlib ? withFullDeps # Xlib support
, withXml2 ? withFullDeps # libxml2 support, for IMF and DASH demuxers
, withXvid ? withHeadlessDeps # Xvid encoder, native encoder exists
, withZimg ? withHeadlessDeps
, withZlib ? withHeadlessDeps
, withZmq ? withFullDeps # Message passing
/*
* Licensing options (yes some are listed twice, filters and such are not listed)
*/
, withGPL ? true
, withGPLv3 ? true
, withUnfree ? false
/*
* Build options
*/
, withSmallBuild ? false # Optimize for size instead of speed
, withRuntimeCPUDetection ? true # Detect CPU capabilities at runtime (disable to compile natively)
, withGrayscale ? withFullDeps # Full grayscale support
, withSwscaleAlpha ? buildSwscale # Alpha channel support in swscale. You probably want this when buildSwscale.
, withHardcodedTables ? withHeadlessDeps # Hardcode decode tables instead of runtime generation
, withSafeBitstreamReader ? withHeadlessDeps # Buffer boundary checking in bitreaders
, withMultithread ? true # Multithreading via pthreads/win32 threads
, withNetwork ? withHeadlessDeps # Network support
, withPixelutils ? withHeadlessDeps # Pixel utils in libavutil
, withLTO ? false # build with link-time optimization
/*
* Program options
*/
, buildFfmpeg ? withHeadlessDeps # Build ffmpeg executable
, buildFfplay ? withFullDeps # Build ffplay executable
, buildFfprobe ? withHeadlessDeps # Build ffprobe executable
, buildQtFaststart ? withFullDeps # Build qt-faststart executable
, withBin ? buildFfmpeg || buildFfplay || buildFfprobe || buildQtFaststart
/*
* Library options
*/
, buildAvcodec ? withHeadlessDeps # Build avcodec library
, buildAvdevice ? withHeadlessDeps # Build avdevice library
, buildAvfilter ? withHeadlessDeps # Build avfilter library
, buildAvformat ? withHeadlessDeps # Build avformat library
, buildAvutil ? withHeadlessDeps # Build avutil library
, buildPostproc ? withHeadlessDeps # Build postproc library
, buildSwresample ? withHeadlessDeps # Build swresample library
, buildSwscale ? withHeadlessDeps # Build swscale library
, withLib ? buildAvcodec
|| buildAvdevice
|| buildAvfilter
|| buildAvformat
|| buildAvutil
|| buildPostproc
|| buildSwresample
|| buildSwscale
/*
* Documentation options
*/
, withDocumentation ? withHtmlDoc || withManPages || withPodDoc || withTxtDoc
, withHtmlDoc ? withHeadlessDeps # HTML documentation pages
, withManPages ? withHeadlessDeps # Man documentation pages
, withPodDoc ? withHeadlessDeps # POD documentation pages
, withTxtDoc ? withHeadlessDeps # Text documentation pages
# Whether a "doc" output will be produced. Note that withManPages does not produce
# a "doc" output because its files go to "man".
, withDoc ? withDocumentation && (withHtmlDoc || withPodDoc || withTxtDoc)
/*
* Developer options
*/
, withDebug ? false
, withOptimisations ? true
, withExtraWarnings ? false
, withStripping ? false
/*
* External libraries options
*/
, alsa-lib
, bzip2
, clang
, celt
, dav1d
, fdk_aac
, fontconfig
, freetype
, frei0r
, fribidi
, game-music-emu
, gnutls
, gsm
, libjack2
, ladspaH
, lame
, libass
, libaom
, libbluray
, libbs2b
, libcaca
, libdc1394
, libraw1394
, libdrm
, libiconv
, intel-media-sdk
, libmodplug
, libmysofa
, libogg
, libopenmpt
, libopus
, librsvg
, libssh
, libtheora
, libv4l
, libva
, libva-minimal
, libvdpau
, libvmaf
, libvorbis
, libvpx
, libwebp
, libX11
, libxcb
, libXv
, libXext
, libxml2
, xz
, nv-codec-headers
, openal
, ocl-icd # OpenCL ICD
, opencl-headers # OpenCL headers
, opencore-amr
, libGL
, libGLU
, openh264
, openjpeg
, libpulseaudio
, ...
, rav1e
, svt-av1
, rtmpdump
, samba
, SDL2
, soxr
, speex
, srt
, vid-stab
, vo-amrwbenc
, x264
, x265
, xavs
, xvidcore
, zeromq4
, zimg
, zlib
, vulkan-loader
, glslang
/*
* Darwin frameworks
*/
, AVFoundation
, Cocoa
, CoreAudio
, CoreMedia
, CoreServices
, MediaToolbox
, VideoDecodeAcceleration
, VideoToolbox
}:
/* Maintainer notes:
*
* THIS IS A MINIMAL BUILD OF FFMPEG, do not include dependencies unless
* a build that depends on ffmpeg requires them to be compiled into ffmpeg,
* see `ffmpeg-full' for an ffmpeg build with all features included.
*
* Need fixes to support Darwin:
* pulseaudio
* Version bumps:
* It should always be safe to bump patch releases (e.g. 2.1.x, x being a patch release)
* If adding a new branch, note any configure flags that were added, changed, or deprecated/removed
* and make the necessary changes.
*
* Known issues:
* ALL - Cross-compiling will disable features not present on host OS
* (e.g. dxva2 support [DirectX] will not be enabled unless natively
* compiled on Cygwin)
* Cross-compiling will disable features not present on host OS
* (e.g. dxva2 support [DirectX] will not be enabled unless natively compiled on Cygwin)
*
*/
let
inherit (lib) optional optionals optionalString enableFeature filter;
reqMin = requiredVersion: (builtins.compareVersions requiredVersion branch != 1);
ifMinVer = minVer: flag: if reqMin minVer then flag else null;
ifVerOlder = maxVer: flag: if (lib.versionOlder branch maxVer) then flag else null;
inherit (stdenv) isCygwin isDarwin isFreeBSD isLinux isAarch64;
inherit (lib) optional optionals optionalString enableFeature;
in
assert lib.elem ffmpegVariant [ "headless" "small" "full" ];
/*
* Licensing dependencies
*/
assert withGPLv3 -> withGPL;
assert withUnfree -> withGPL && withGPLv3;
/*
* Build dependencies
*/
assert withPixelutils -> buildAvutil;
/*
* Program dependencies
*/
assert buildFfmpeg -> buildAvcodec
&& buildAvfilter
&& buildAvformat
&& buildSwresample;
assert buildFfplay -> buildAvcodec
&& buildAvformat
&& buildSwscale
&& buildSwresample;
assert buildFfprobe -> buildAvcodec && buildAvformat;
/*
* Library dependencies
*/
assert buildAvcodec -> buildAvutil; # configure flag since 0.6
assert buildAvdevice -> buildAvformat
&& buildAvcodec
&& buildAvutil; # configure flag since 0.6
assert buildAvformat -> buildAvcodec && buildAvutil; # configure flag since 0.6
assert buildPostproc -> buildAvutil;
assert buildSwscale -> buildAvutil;
stdenv.mkDerivation rec {
pname = "ffmpeg";
pname = "ffmpeg" + (if ffmpegVariant == "small" then "" else "-${ffmpegVariant}");
inherit version;
src = fetchurl {
url = "https://www.ffmpeg.org/releases/${pname}-${version}.tar.bz2";
src = fetchgit {
url = "https://git.ffmpeg.org/ffmpeg.git";
rev = "n${version}";
inherit sha256;
};
postPatch = "patchShebangs .";
inherit patches;
postPatch = ''
patchShebangs .
'' + lib.optionalString withFrei0r ''
substituteInPlace libavfilter/vf_frei0r.c \
--replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1
substituteInPlace doc/filters.texi \
--replace /usr/local/lib/frei0r-1 ${frei0r}/lib/frei0r-1
'';
outputs = [ "bin" "dev" "out" "man" "doc" ];
setOutputFlags = false; # doesn't accept all and stores configureFlags in libs!
patches = map (patch: fetchpatch patch) extraPatches;
configurePlatforms = [];
configureFlags = filter (v: v != null) ([
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
"--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
"--pkg-config=${buildPackages.pkg-config.targetPrefix}pkg-config"
# License
"--enable-gpl"
"--enable-version3"
# Build flags
"--enable-shared"
"--enable-pic"
(ifMinVer "4.0" (enableFeature srtSupport "libsrt"))
(enableFeature runtimeCpuDetectBuild "runtime-cpudetect")
"--enable-hardcoded-tables"
] ++
(if multithreadBuild then (
if stdenv.isCygwin then
["--disable-pthreads" "--enable-w32threads"]
else # Use POSIX threads by default
["--enable-pthreads" "--disable-w32threads"])
else
["--disable-pthreads" "--disable-w32threads"])
++ [
"--disable-os2threads" # We don't support OS/2
"--enable-network"
"--enable-pixelutils"
# Executables
"--enable-ffmpeg"
"--disable-ffplay"
"--enable-ffprobe"
(ifVerOlder "4" "--disable-ffserver")
# Libraries
"--enable-avcodec"
"--enable-avdevice"
"--enable-avfilter"
"--enable-avformat"
(ifVerOlder "5.0" "--enable-avresample")
"--enable-avutil"
"--enable-postproc"
"--enable-swresample"
"--enable-swscale"
# Docs
"--disable-doc"
# External Libraries
"--enable-libass"
"--enable-bzlib"
"--enable-gnutls"
"--enable-fontconfig"
"--enable-libfreetype"
"--enable-libmp3lame"
"--enable-iconv"
"--enable-libtheora"
"--enable-libssh"
(enableFeature vaapiSupport "vaapi")
(enableFeature vaapiSupport "libdrm")
(enableFeature vdpauSupport "vdpau")
"--enable-libvorbis"
(enableFeature vpxSupport "libvpx")
"--enable-lzma"
(enableFeature openglSupport "opengl")
(ifMinVer "4.2" (enableFeature libmfxSupport "libmfx"))
(ifMinVer "4.2" (enableFeature libaomSupport "libaom"))
(lib.optionalString pulseaudioSupport "--enable-libpulse")
(enableFeature sdlSupport "sdl2")
"--enable-libsoxr"
"--enable-libx264"
"--enable-libxvid"
"--enable-libzimg"
"--enable-zlib"
"--enable-libopus"
"--enable-libspeex"
"--enable-libx265"
(ifMinVer "4.2" (enableFeature (reqMin "4.2") "libdav1d"))
# Developer flags
(enableFeature debugDeveloper "debug")
(enableFeature optimizationsDeveloper "optimizations")
(enableFeature extraWarningsDeveloper "extra-warnings")
"--disable-stripping"
setOutputFlags = false; # Only accepts some of them
configureFlags = [
#mingw64 is internally treated as mingw32, so 32 and 64 make no difference here
"--target_os=${if stdenv.hostPlatform.isMinGW then "mingw64" else stdenv.hostPlatform.parsed.kernel.name}"
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
"--pkg-config=${buildPackages.pkg-config.targetPrefix}pkg-config"
/*
* Licensing flags
*/
(enableFeature withGPL "gpl")
(enableFeature withGPLv3 "version3")
(enableFeature withUnfree "nonfree")
/*
* Build flags
*/
# On some ARM platforms --enable-thumb
"--enable-shared"
"--enable-pic"
(enableFeature withSmallBuild "small")
(enableFeature withRuntimeCPUDetection "runtime-cpudetect")
(enableFeature withLTO "lto")
(enableFeature withGrayscale "gray")
(enableFeature withSwscaleAlpha "swscale-alpha")
(enableFeature withHardcodedTables "hardcoded-tables")
(enableFeature withSafeBitstreamReader "safe-bitstream-reader")
(enableFeature (withMultithread && stdenv.targetPlatform.isUnix) "pthreads")
(enableFeature (withMultithread && stdenv.targetPlatform.isWindows) "w32threads")
"--disable-os2threads" # We don't support OS/2
(enableFeature withNetwork "network")
(enableFeature withPixelutils "pixelutils")
"--datadir=${placeholder "data"}/share/ffmpeg"
/*
* Program flags
*/
(enableFeature buildFfmpeg "ffmpeg")
(enableFeature buildFfplay "ffplay")
(enableFeature buildFfprobe "ffprobe")
] ++ optionals withBin [
"--bindir=${placeholder "bin"}/bin"
] ++ [
/*
* Library flags
*/
(enableFeature buildAvcodec "avcodec")
(enableFeature buildAvdevice "avdevice")
(enableFeature buildAvfilter "avfilter")
(enableFeature buildAvformat "avformat")
(enableFeature buildAvutil "avutil")
(enableFeature (buildPostproc && withGPL) "postproc")
(enableFeature buildSwresample "swresample")
(enableFeature buildSwscale "swscale")
] ++ optionals withLib [
"--libdir=${placeholder "lib"}/lib"
"--incdir=${placeholder "dev"}/include"
] ++ [
/*
* Documentation flags
*/
(enableFeature withDocumentation "doc")
(enableFeature withHtmlDoc "htmlpages")
(enableFeature withManPages "manpages")
] ++ optionals withManPages [
"--mandir=${placeholder "man"}/share/man"
] ++ [
(enableFeature withPodDoc "podpages")
(enableFeature withTxtDoc "txtpages")
] ++ optionals withDoc [
"--docdir=${placeholder "doc"}/share/doc/ffmpeg"
] ++ [
/*
* External libraries
*/
(enableFeature withAlsa "alsa")
(enableFeature withBzlib "bzlib")
(enableFeature withCelt "libcelt")
(enableFeature withCuda "cuda")
(enableFeature withCudaLLVM "cuda-llvm")
(enableFeature withDav1d "libdav1d")
(enableFeature withFdkAac "libfdk-aac")
"--disable-libflite" # Force disable until a solution is found
(enableFeature withFontconfig "fontconfig")
(enableFeature withFreetype "libfreetype")
(enableFeature withFrei0r "frei0r")
(enableFeature withFribidi "libfribidi")
(enableFeature withGme "libgme")
(enableFeature withGnutls "gnutls")
(enableFeature withGsm "libgsm")
(enableFeature withLadspa "ladspa")
(enableFeature withMp3lame "libmp3lame")
(enableFeature withAom "libaom")
(enableFeature withAss "libass")
(enableFeature withBluray "libbluray")
(enableFeature withBs2b "libbs2b")
(enableFeature withDc1394 "libdc1394")
(enableFeature withDrm "libdrm")
(enableFeature withIconv "iconv")
(enableFeature withJack "libjack")
(enableFeature withMfx "libmfx")
(enableFeature withModplug "libmodplug")
(enableFeature withMysofa "libmysofa")
(enableFeature withOpus "libopus")
(enableFeature withSvg "librsvg")
(enableFeature withSrt "libsrt")
(enableFeature withSsh "libssh")
(enableFeature withTheora "libtheora")
(enableFeature withV4l2 "libv4l2")
(enableFeature withV4l2M2m "v4l2-m2m")
(enableFeature withVaapi "vaapi")
(enableFeature withVdpau "vdpau")
(enableFeature withVorbis "libvorbis")
(enableFeature withVmaf "libvmaf")
(enableFeature withVpx "libvpx")
(enableFeature withWebp "libwebp")
(enableFeature withXlib "xlib")
(enableFeature withXcb "libxcb")
(enableFeature withXcbShm "libxcb-shm")
(enableFeature withXcbxfixes "libxcb-xfixes")
(enableFeature withXcbShape "libxcb-shape")
(enableFeature withXml2 "libxml2")
(enableFeature withLzma "lzma")
(enableFeature withNvdec "cuvid")
(enableFeature withNvdec "nvdec")
(enableFeature withNvenc "nvenc")
(enableFeature withOpenal "openal")
(enableFeature withOpencl "opencl")
(enableFeature withOpencoreAmrnb "libopencore-amrnb")
(enableFeature withOpengl "opengl")
(enableFeature withOpenh264 "libopenh264")
(enableFeature withOpenjpeg "libopenjpeg")
(enableFeature withOpenmpt "libopenmpt")
(enableFeature withPulse "libpulse")
(enableFeature withRav1e "librav1e")
(enableFeature withSvtav1 "libsvtav1")
(enableFeature withRtmp "librtmp")
(enableFeature withSdl2 "sdl2")
(enableFeature withSoxr "libsoxr")
(enableFeature withSpeex "libspeex")
(enableFeature withVidStab "libvidstab") # Actual min. version 2.0
(enableFeature withVoAmrwbenc "libvo-amrwbenc")
(enableFeature withX264 "libx264")
(enableFeature withX265 "libx265")
(enableFeature withXavs "libxavs")
(enableFeature withXvid "libxvid")
(enableFeature withZmq "libzmq")
(enableFeature withZimg "libzimg")
(enableFeature withZlib "zlib")
(enableFeature withVulkan "vulkan")
(enableFeature withGlslang "libglslang")
(enableFeature withSamba "libsmbclient")
/*
* Developer flags
*/
(enableFeature withDebug "debug")
(enableFeature withOptimisations "optimizations")
(enableFeature withExtraWarnings "extra-warnings")
(enableFeature withStripping "stripping")
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--cross-prefix=${stdenv.cc.targetPrefix}"
"--enable-cross-compile"
] ++ optional stdenv.cc.isClang "--cc=clang");
"--cross-prefix=${stdenv.cc.targetPrefix}"
"--enable-cross-compile"
"--host-cc=${buildPackages.stdenv.cc}/bin/cc"
] ++ optionals stdenv.cc.isClang [
"--cc=clang"
"--cxx=clang++"
];
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ addOpenGLRunpath perl pkg-config texinfo yasm ];
# ffmpeg embeds the configureFlags verbatim in its binaries and because we
# configure binary, include, library dir etc., this causes references in
# outputs where we don't want them. Patch the generated config.h to remove all
# such references except for data.
postConfigure = let
toStrip = lib.remove "data" outputs; # We want to keep references to the data dir.
in
"remove-references-to ${lib.concatStringsSep " " (map (o: "-t ${placeholder o}") toStrip)} config.h";
buildInputs = [
bzip2 fontconfig freetype gnutls libiconv lame libass libogg libssh libtheora
libvorbis xz soxr x264 x265 xvidcore zimg zlib libopus speex nv-codec-headers
] ++ optionals openglSupport [ libGL libGLU ]
++ optional libmfxSupport intel-media-sdk
++ optional libaomSupport libaom
++ optional vpxSupport libvpx
++ optionals (!stdenv.isDarwin && pulseaudioSupport) [ libpulseaudio ] # Need to be fixed on Darwin
++ optionals vaapiSupport [ libva libdrm ]
++ optional stdenv.isLinux alsa-lib
++ optionals stdenv.isDarwin [ Cocoa CoreMedia VideoToolbox ]
++ optional vdpauSupport libvdpau
++ optional sdlSupport SDL2
++ optional srtSupport srt
++ optional (reqMin "4.2") dav1d;
nativeBuildInputs = [ removeReferencesTo addOpenGLRunpath perl pkg-config texinfo yasm ];
enableParallelBuilding = true;
# TODO This was always in buildInputs before, why?
buildInputs = optionals withFullDeps [ libdc1394 ]
++ optionals (withFullDeps && !stdenv.isDarwin) [ libraw1394 ] # TODO where does this belong to
++ optionals (withNvdec || withNvenc) [ nv-codec-headers ]
++ optionals withAlsa [ alsa-lib ]
++ optionals withAom [ libaom ]
++ optionals withAss [ libass ]
++ optionals withBluray [ libbluray ]
++ optionals withBs2b [ libbs2b ]
++ optionals withBzlib [ bzip2 ]
++ optionals withCaca [ libcaca ]
++ optionals withCelt [ celt ]
++ optionals withCudaLLVM [ clang ]
++ optionals withDav1d [ dav1d ]
++ optionals withDrm [ libdrm ]
++ optionals withFdkAac [ fdk_aac ]
++ optionals withFontconfig [ fontconfig ]
++ optionals withFreetype [ freetype ]
++ optionals withFrei0r [ frei0r ]
++ optionals withFribidi [ fribidi ]
++ optionals withGlslang [ glslang ]
++ optionals withGme [ game-music-emu ]
++ optionals withGnutls [ gnutls ]
++ optionals withGsm [ gsm ]
++ optionals withIconv [ libiconv ] # On Linux this should be in libc, do we really need it?
++ optionals withJack [ libjack2 ]
++ optionals withLadspa [ ladspaH ]
++ optionals withLzma [ xz ]
++ optionals withMfx [ intel-media-sdk ]
++ optionals withModplug [ libmodplug ]
++ optionals withMp3lame [ lame ]
++ optionals withMysofa [ libmysofa ]
++ optionals withOgg [ libogg ]
++ optionals withOpenal [ openal ]
++ optionals withOpencl [ ocl-icd opencl-headers ]
++ optionals withOpencoreAmrnb [ opencore-amr ]
++ optionals withOpengl [ libGL libGLU ]
++ optionals withOpenh264 [ openh264 ]
++ optionals withOpenjpeg [ openjpeg ]
++ optionals withOpenmpt [ libopenmpt ]
++ optionals withOpus [ libopus ]
++ optionals withPulse [ libpulseaudio ]
++ optionals withRav1e [ rav1e ]
++ optionals withRtmp [ rtmpdump ]
++ optionals withSamba [ samba ]
++ optionals withSdl2 [ SDL2 ]
++ optionals withSoxr [ soxr ]
++ optionals withSpeex [ speex ]
++ optionals withSrt [ srt ]
++ optionals withSsh [ libssh ]
++ optionals withSvg [ librsvg ]
++ optionals withSvtav1 [ svt-av1 ]
++ optionals withTheora [ libtheora ]
++ optionals withVaapi [ (if withSmallDeps then libva else libva-minimal) ]
++ optionals withVdpau [ libvdpau ]
++ optionals withVidStab [ vid-stab ]
++ optionals withVmaf [ libvmaf ]
++ optionals withVoAmrwbenc [ vo-amrwbenc ]
++ optionals withVorbis [ libvorbis ]
++ optionals withVpx [ libvpx ]
++ optionals withV4l2 [ libv4l ]
++ optionals withVulkan [ vulkan-loader ]
++ optionals withWebp [ libwebp ]
++ optionals withX264 [ x264 ]
++ optionals withX265 [ x265 ]
++ optionals withXavs [ xavs ]
++ optionals withXcb [ libxcb ]
++ optionals withXlib [ libX11 libXv libXext ]
++ optionals withXml2 [ libxml2 ]
++ optionals withXvid [ xvidcore ]
++ optionals withZimg [ zimg ]
++ optionals withZlib [ zlib ]
++ optionals withZmq [ zeromq4 ]
++ optionals stdenv.isDarwin [
# TODO fine-grained flags
AVFoundation
Cocoa
CoreAudio
CoreMedia
CoreServices
MediaToolbox
VideoDecodeAcceleration
VideoToolbox
];
inherit doCheck;
buildFlags = [ "all" ]
++ optional buildQtFaststart "tools/qt-faststart"; # Build qt-faststart executable
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
# Fails with SIGABRT otherwise
checkPhase = let
ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
in ''
${ldLibraryPathEnv}="libavcodec:libavdevice:libavfilter:libavformat:libavresample:libavutil:libpostproc:libswresample:libswscale:''${${ldLibraryPathEnv}}" \
${ldLibraryPathEnv}="libavcodec:libavdevice:libavfilter:libavformat:libavutil:libpostproc${
optionalString (withHeadlessDeps) ":libswresample" # TODO this can probably go away
}:libswscale:''${${ldLibraryPathEnv}}" \
make check -j$NIX_BUILD_CORES
'';
# ffmpeg 3+ generates pkg-config (.pc) files that don't have the
# form automatically handled by the multiple-outputs hooks.
postFixup = ''
moveToOutput bin "$bin"
moveToOutput share/ffmpeg/examples "$doc"
for pc in ''${!outputDev}/lib/pkgconfig/*.pc; do
substituteInPlace $pc \
--replace "includedir=$out" "includedir=''${!outputInclude}"
done
'' + optionalString stdenv.isLinux ''
# Set RUNPATH so that libnvcuvid and libcuda in /run/opengl-driver(-32)/lib can be found.
# See the explanation in addOpenGLRunpath.
outputs = optionals withBin [ "bin" ] # The first output is the one that gets symlinked by default!
++ optionals withLib [ "lib" "dev" ]
++ optionals withDoc [ "doc" ]
++ optionals withManPages [ "man" ]
++ [ "data" "out" ] # We need an "out" output because we get an error otherwise. It's just an empty dir.
;
postInstall = optionalString buildQtFaststart ''
install -D tools/qt-faststart -t $bin/bin
'';
# Set RUNPATH so that libnvcuvid and libcuda in /run/opengl-driver(-32)/lib can be found.
# See the explanation in addOpenGLRunpath.
postFixup = optionalString stdenv.isLinux ''
addOpenGLRunpath $out/lib/libavcodec.so
addOpenGLRunpath $out/lib/libavutil.so
'';
installFlags = [ "install-man" ];
passthru = {
inherit vaapiSupport vdpauSupport;
};
enableParallelBuilding = true;
meta = with lib; {
description = "A complete, cross-platform solution to record, convert and stream audio and video";
@ -212,9 +652,11 @@ stdenv.mkDerivation rec {
No matter if they were designed by some standards committee, the community or
a corporation.
'';
license = licenses.gpl3;
maintainers = with maintainers; [ ];
license = with licenses; [ lgpl21Plus ]
++ optional withGPL gpl2Plus
++ optional withGPLv3 gpl3Plus
++ optional withUnfree unfreeRedistributable;
platforms = platforms.all;
inherit branch knownVulnerabilities;
maintainers = with maintainers; [ atemu ];
};
}

View file

@ -4,6 +4,8 @@ stdenv.mkDerivation rec {
pname = "gsl";
version = "2.7.1";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "mirror://gnu/gsl/${pname}-${version}.tar.gz";
sha256 = "sha256-3LD71DBIgyt1f/mUJpGo3XACbV2g/4VgHlJof23us0s=";
@ -13,6 +15,10 @@ stdenv.mkDerivation rec {
MACOSX_DEPLOYMENT_TARGET=10.16
'' else null;
postInstall = ''
moveToOutput bin/gsl-config "$dev"
'';
# do not let -march=skylake to enable FMA (https://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html)
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isx86_64 "-mno-fma";

View file

@ -2,13 +2,21 @@
stdenv.mkDerivation rec {
pname = "gsmlib";
version = "unstable-2017-10-06";
src = fetchFromGitHub {
owner = "x-logLT";
repo = "gsmlib";
rev = "4f794b14450132f81673f7d3570c5a859aecf7ae";
sha256 = "16v8aj914ac1ipf14a867ljib3gy7fhzd9ypxnsg9l0zi8mm3ml5";
};
nativeBuildInputs = [ autoreconfHook ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-std=c++14"
];
meta = with lib; {
description = "Library to access GSM mobile phones through GSM modems";
homepage = "https://github.com/x-logLT/gsmlib";

View file

@ -19,7 +19,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ninja ];
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=ON"
] ++ lib.optionals (stdenv.cc.isClang && (lib.versionOlder stdenv.cc.version "16.0")) [
# Enable C++17 support
# https://github.com/google/googletest/issues/3081
"-DCMAKE_CXX_STANDARD=17"
];
meta = with lib; {
description = "Google's framework for writing C++ tests";

View file

@ -90,7 +90,6 @@ stdenv.mkDerivation rec {
# Slightly hacky; some pkgs expect them in a single directory.
postFixup = lib.optionalString withIcu ''
rm "$out"/lib/libharfbuzz.* "$dev/lib/pkgconfig/harfbuzz.pc"
ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.la
ln -s {'${harfbuzz.dev}',"$dev"}/lib/pkgconfig/harfbuzz.pc
${lib.optionalString stdenv.isDarwin ''
ln -s {'${harfbuzz.out}',"$out"}/lib/libharfbuzz.dylib

View file

@ -1,14 +1,14 @@
{ lib, stdenv, fetchFromGitHub, ncurses, readline, autoreconfHook }:
stdenv.mkDerivation rec {
version = "1.7.1";
version = "1.7.2";
pname = "hunspell";
src = fetchFromGitHub {
owner = "hunspell";
repo = "hunspell";
rev = "v${version}";
sha256 = "sha256-J1kgNUElRO63mtU62qU7asf7hht9oyplMIO9I/E6BPU=";
sha256 = "sha256-x2FXxnVIqsf5/UEQcvchAndXBv/3mW8Z55djQAFgNA8=";
};
outputs = [ "bin" "dev" "out" "man" ];

View file

@ -12,6 +12,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libbsd microsoft_gsl ];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-parameter"
"-Wno-error=misleading-indentation"
];
meta = with lib; {
homepage = "https://github.com/twosigma/iqueue";
description = "Indexed queue";

View file

@ -57,6 +57,11 @@ stdenv.mkDerivation rec {
sourceRoot = "krb5-${version}/src";
postPatch = ''
substituteInPlace config/shlib.conf \
--replace "'ld " "'${stdenv.cc.targetPrefix}ld "
'';
libFolders = [ "util" "include" "lib" "build-tools" ];
buildPhase = lib.optionalString libOnly ''

View file

@ -13,11 +13,7 @@ stdenv.mkDerivation rec {
outputBin = "dev"; # libassuan-config
depsBuildBuild = [ buildPackages.stdenv.cc ];
buildInputs = [ npth gettext ];
configureFlags = [
"--with-libgpg-error-prefix=${libgpg-error.dev}"
];
buildInputs = [ npth gettext libgpg-error ];
doCheck = true;

View file

@ -46,6 +46,11 @@ in stdenv.mkDerivation rec {
"-DBLADERF_GROUP=bladerf"
];
NIX_CFLAGS_COMPILE = [
# Needed with GCC 12
"-Wno-error=array-bounds"
];
hardeningDisable = [ "fortify" ];
meta = with lib; {

View file

@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
hash = "sha256-0/wvH07bJRKFwYnOARRJNzH8enIX3TNnWQnJdfpfvgE=";
};
outputs = [ "out" "dev" "doc" ];
postPatch = ''
patchShebangs utils/
'';

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