mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 04:02:10 +00:00
Merge pull request #84415 from matthewbauer/mb-cross-fixes-april2020
Cross compilation fixes [april 2020]
This commit is contained in:
commit
e520d6af29
|
@ -45,6 +45,9 @@ let
|
|||
|
||||
# generate the font cache setting file for a fontconfig version
|
||||
# use latest when no version is passed
|
||||
# When cross-compiling, we can’t generate the cache, so we skip the
|
||||
# <cachedir> part. fontconfig still works but is a little slower in
|
||||
# looking things up.
|
||||
makeCacheConf = { version ? null }:
|
||||
let
|
||||
fcPackage = if version == null
|
||||
|
@ -60,11 +63,13 @@ let
|
|||
<fontconfig>
|
||||
<!-- Font directories -->
|
||||
${concatStringsSep "\n" (map (font: "<dir>${font}</dir>") config.fonts.fonts)}
|
||||
${optionalString (pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform) ''
|
||||
<!-- Pre-generated font caches -->
|
||||
<cachedir>${cache}</cachedir>
|
||||
${optionalString (pkgs.stdenv.isx86_64 && cfg.cache32Bit) ''
|
||||
<cachedir>${cache32}</cachedir>
|
||||
''}
|
||||
''}
|
||||
</fontconfig>
|
||||
'';
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ in
|
|||
|
||||
} // optionalAttrs (pkgs.stdenv.hostPlatform.libc == "glibc") {
|
||||
# /etc/rpc: RPC program numbers.
|
||||
rpc.source = pkgs.glibc.out + "/etc/rpc";
|
||||
rpc.source = pkgs.stdenv.cc.libc.out + "/etc/rpc";
|
||||
};
|
||||
|
||||
networking.proxy.envVars =
|
||||
|
|
|
@ -7,6 +7,10 @@ let
|
|||
nssModulesPath = config.system.nssModules.path;
|
||||
cfg = config.services.nscd;
|
||||
|
||||
nscd = if pkgs.stdenv.hostPlatform.libc == "glibc"
|
||||
then pkgs.stdenv.cc.libc.bin
|
||||
else pkgs.glibc.bin;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -59,16 +63,16 @@ in
|
|||
# files. So prefix the ExecStart command with "!" to prevent systemd
|
||||
# from dropping privileges early. See ExecStart in systemd.service(5).
|
||||
serviceConfig =
|
||||
{ ExecStart = "!@${pkgs.glibc.bin}/sbin/nscd nscd";
|
||||
{ ExecStart = "!@${nscd}/sbin/nscd nscd";
|
||||
Type = "forking";
|
||||
DynamicUser = true;
|
||||
RuntimeDirectory = "nscd";
|
||||
PIDFile = "/run/nscd/nscd.pid";
|
||||
Restart = "always";
|
||||
ExecReload =
|
||||
[ "${pkgs.glibc.bin}/sbin/nscd --invalidate passwd"
|
||||
"${pkgs.glibc.bin}/sbin/nscd --invalidate group"
|
||||
"${pkgs.glibc.bin}/sbin/nscd --invalidate hosts"
|
||||
[ "${nscd}/sbin/nscd --invalidate passwd"
|
||||
"${nscd}/sbin/nscd --invalidate group"
|
||||
"${nscd}/sbin/nscd --invalidate hosts"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@ let
|
|||
continue
|
||||
fi
|
||||
GDK_PIXBUF_MODULEDIR="$module_dir" \
|
||||
${pkgs.gdk-pixbuf.dev}/bin/gdk-pixbuf-query-loaders
|
||||
${pkgs.stdenv.hostPlatform.emulator pkgs.buildPackages} ${pkgs.gdk-pixbuf.dev}/bin/gdk-pixbuf-query-loaders
|
||||
done
|
||||
) > "$out"
|
||||
'';
|
||||
|
@ -37,7 +37,7 @@ in
|
|||
# If there is any package configured in modulePackages, we generate the
|
||||
# loaders.cache based on that and set the environment variable
|
||||
# GDK_PIXBUF_MODULE_FILE to point to it.
|
||||
config = mkIf (cfg.modulePackages != []) {
|
||||
config = mkIf (cfg.modulePackages != [] || pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform) {
|
||||
environment.variables = {
|
||||
GDK_PIXBUF_MODULE_FILE = "${loadersCache}";
|
||||
};
|
||||
|
|
|
@ -80,6 +80,8 @@ stdenv.mkDerivation {
|
|||
configureFlags = stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
"ac_cv_fread_reads_directories=yes"
|
||||
"ac_cv_snprintf_returns_bogus=no"
|
||||
"ac_cv_iconv_omits_bom=no"
|
||||
"ac_cv_prog_CURL_CONFIG=${curl.dev}/bin/curl-config"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
|
|
|
@ -4,22 +4,20 @@
|
|||
, boost, avahi, lame, autoreconfHook
|
||||
, gettext, pcre-cpp, yajl, fribidi, which
|
||||
, openssl, gperf, tinyxml2, taglib, libssh, swig, jre
|
||||
, libX11, xorgproto, libxml2
|
||||
, libXt, libXmu, libXext
|
||||
, libXinerama, libXrandr
|
||||
, libXtst, libXfixes, systemd
|
||||
, libxml2, systemd
|
||||
, alsaLib, libGLU, libGL, glew, fontconfig, freetype, ftgl
|
||||
, libjpeg, libpng, libtiff
|
||||
, libmpeg2, libsamplerate, libmad
|
||||
, libogg, libvorbis, flac, libxslt
|
||||
, lzo, libcdio, libmodplug, libass, libbluray
|
||||
, sqlite, libmysqlclient, nasm, gnutls, libva, libdrm
|
||||
, curl, bzip2, zip, unzip, glxinfo, xdpyinfo
|
||||
, curl, bzip2, zip, unzip, glxinfo
|
||||
, libcec, libcec_platform, dcadec, libuuid
|
||||
, libcrossguid, libmicrohttpd
|
||||
, bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn, libpthreadstubs, libtasn1, libXdmcp
|
||||
, bluez, doxygen, giflib, glib, harfbuzz, lcms2, libidn, libpthreadstubs, libtasn1
|
||||
, libplist, p11-kit, zlib, flatbuffers, fmt, fstrcmp, rapidjson
|
||||
, lirc
|
||||
, x11Support ? true, libX11, xorgproto, libXt, libXmu, libXext, libXinerama, libXrandr, libXtst, libXfixes, xdpyinfo, libXdmcp
|
||||
, dbusSupport ? true, dbus ? null
|
||||
, joystickSupport ? true, cwiid ? null
|
||||
, nfsSupport ? true, libnfs ? null
|
||||
|
@ -32,6 +30,7 @@
|
|||
, useWayland ? false, wayland ? null, wayland-protocols ? null
|
||||
, waylandpp ? null, libxkbcommon ? null
|
||||
, useGbm ? false, mesa ? null, libinput ? null
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
assert dbusSupport -> dbus != null;
|
||||
|
@ -94,10 +93,18 @@ let
|
|||
sha256 = "1krsjlr949iy5l6ljxancza1yi6w1annxc5s6k283i9mb15qy8cy";
|
||||
preConfigure = ''
|
||||
cp ${kodi_src}/tools/depends/target/ffmpeg/{CMakeLists.txt,*.cmake} .
|
||||
sed -i 's/ --cpu=''${CPU}//' CMakeLists.txt
|
||||
sed -i 's/--strip=''${CMAKE_STRIP}/--strip=''${CMAKE_STRIP} --ranlib=''${CMAKE_RANLIB}/' CMakeLists.txt
|
||||
'';
|
||||
buildInputs = [ gnutls libidn libtasn1 p11-kit zlib libva ]
|
||||
cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"-DCROSSCOMPILING=ON"
|
||||
"-DCPU=${stdenv.hostPlatform.parsed.cpu.name}"
|
||||
"-DOS=${stdenv.hostPlatform.parsed.kernel.name}"
|
||||
"-DPKG_CONFIG_EXECUTABLE=pkgconfig"
|
||||
];
|
||||
buildInputs = [ libidn libtasn1 p11-kit zlib libva ]
|
||||
++ lib.optional vdpauSupport libvdpau;
|
||||
nativeBuildInputs = [ cmake nasm pkgconfig ];
|
||||
nativeBuildInputs = [ cmake nasm pkgconfig gnutls ];
|
||||
};
|
||||
|
||||
# We can build these externally but FindLibDvd.cmake forces us to build it
|
||||
|
@ -152,29 +159,31 @@ in stdenv.mkDerivation {
|
|||
|
||||
buildInputs = [
|
||||
gnutls libidn libtasn1 nasm p11-kit
|
||||
libxml2 yasm python2Packages.python
|
||||
libxml2 python2Packages.python
|
||||
boost libmicrohttpd
|
||||
gettext pcre-cpp yajl fribidi libva libdrm
|
||||
openssl gperf tinyxml2 taglib libssh swig jre
|
||||
libX11 xorgproto libXt libXmu libXext
|
||||
libXinerama libXrandr libXtst libXfixes
|
||||
alsaLib libGL libGLU glew fontconfig freetype ftgl
|
||||
openssl gperf tinyxml2 taglib libssh
|
||||
alsaLib libGL libGLU fontconfig freetype ftgl
|
||||
libjpeg libpng libtiff
|
||||
libmpeg2 libsamplerate libmad
|
||||
libogg libvorbis flac libxslt systemd
|
||||
lzo libcdio libmodplug libass libbluray
|
||||
sqlite libmysqlclient avahi lame
|
||||
curl bzip2 zip unzip glxinfo xdpyinfo
|
||||
curl bzip2 zip unzip glxinfo
|
||||
libcec libcec_platform dcadec libuuid
|
||||
libgcrypt libgpgerror libunistring
|
||||
libcrossguid cwiid libplist
|
||||
bluez giflib glib harfbuzz lcms2 libpthreadstubs libXdmcp
|
||||
libcrossguid libplist
|
||||
bluez giflib glib harfbuzz lcms2 libpthreadstubs
|
||||
ffmpeg flatbuffers fmt fstrcmp rapidjson
|
||||
lirc
|
||||
# libdvdcss libdvdnav libdvdread
|
||||
]
|
||||
++ lib.optional x11Support [
|
||||
libX11 xorgproto libXt libXmu libXext libXdmcp
|
||||
libXinerama libXrandr libXtst libXfixes
|
||||
]
|
||||
++ lib.optional dbusSupport dbus
|
||||
++ lib.optionals joystickSupport [ cwiid ]
|
||||
++ lib.optional joystickSupport cwiid
|
||||
++ lib.optional nfsSupport libnfs
|
||||
++ lib.optional pulseSupport libpulseaudio
|
||||
++ lib.optional rtmpSupport rtmpdump
|
||||
|
@ -183,7 +192,7 @@ in stdenv.mkDerivation {
|
|||
++ lib.optional usbSupport libusb
|
||||
++ lib.optional vdpauSupport libvdpau
|
||||
++ lib.optionals useWayland [
|
||||
wayland waylandpp
|
||||
wayland waylandpp wayland-protocols
|
||||
# Not sure why ".dev" is needed here, but CMake doesn't find libxkbcommon otherwise
|
||||
libxkbcommon.dev
|
||||
]
|
||||
|
@ -200,8 +209,16 @@ in stdenv.mkDerivation {
|
|||
which
|
||||
pkgconfig gnumake
|
||||
autoconf automake libtool # still needed for some components. Check if that is the case with 19.0
|
||||
jre yasm gettext python2Packages.python flatbuffers
|
||||
|
||||
# for TexturePacker
|
||||
giflib zlib libpng libjpeg lzo
|
||||
] ++ lib.optionals useWayland [ wayland-protocols ];
|
||||
|
||||
depsBuildBuild = [
|
||||
buildPackages.stdenv.cc
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-Dlibdvdcss_URL=${libdvdcss.src}"
|
||||
"-Dlibdvdnav_URL=${libdvdnav.src}"
|
||||
|
@ -210,9 +227,14 @@ in stdenv.mkDerivation {
|
|||
"-DENABLE_EVENTCLIENTS=ON"
|
||||
"-DENABLE_INTERNAL_CROSSGUID=OFF"
|
||||
"-DENABLE_OPTICAL=ON"
|
||||
"-DLIRC_DEVICE=/run/lirc/lircd"
|
||||
"-DSWIG_EXECUTABLE=${buildPackages.swig}/bin/swig"
|
||||
"-DFLATBUFFERS_FLATC_EXECUTABLE=${buildPackages.flatbuffers}/bin/flatc"
|
||||
"-DPYTHON_EXECUTABLE=${buildPackages.python2Packages.python}/bin/python"
|
||||
] ++ lib.optional useWayland [
|
||||
"-DCORE_PLATFORM_NAME=wayland"
|
||||
"-DWAYLAND_RENDER_SYSTEM=gl"
|
||||
"-DWAYLANDPP_SCANNER=${buildPackages.waylandpp}/bin/wayland-scanner++"
|
||||
] ++ lib.optional useGbm [
|
||||
"-DCORE_PLATFORM_NAME=gbm"
|
||||
"-DGBM_RENDER_SYSTEM=gles"
|
||||
|
@ -224,6 +246,16 @@ in stdenv.mkDerivation {
|
|||
# I'm guessing there is a thing waiting to time out
|
||||
doCheck = false;
|
||||
|
||||
# Need these tools on the build system when cross compiling,
|
||||
# hacky, but have found no other way.
|
||||
preConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
CXX=c++ LD=ld make -C tools/depends/native/JsonSchemaBuilder
|
||||
cmakeFlags+=" -DWITH_JSONSCHEMABUILDER=$PWD/tools/depends/native/JsonSchemaBuilder/bin"
|
||||
|
||||
CXX=c++ LD=ld make EXTRA_CONFIGURE= -C tools/depends/native/TexturePacker
|
||||
cmakeFlags+=" -DWITH_TEXTUREPACKER=$PWD/tools/depends/native/TexturePacker/bin"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace xbmc/platform/linux/LinuxTimezone.cpp \
|
||||
--replace 'usr/share/zoneinfo' 'etc/zoneinfo'
|
||||
|
@ -232,9 +264,11 @@ in stdenv.mkDerivation {
|
|||
postInstall = ''
|
||||
for p in $(ls $out/bin/) ; do
|
||||
wrapProgram $out/bin/$p \
|
||||
--prefix PATH ":" "${lib.makeBinPath [ python2Packages.python glxinfo xdpyinfo ]}" \
|
||||
--prefix PATH ":" "${lib.makeBinPath ([ python2Packages.python glxinfo ] ++ lib.optional x11Support xdpyinfo)}" \
|
||||
--prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
|
||||
([ curl systemd libmad libvdpau libcec libcec_platform rtmpdump libass ] ++ lib.optional nfsSupport libnfs)}"
|
||||
([ curl systemd libmad libvdpau libcec libcec_platform libass ]
|
||||
++ lib.optional nfsSupport libnfs
|
||||
++ lib.optional rtmpSupport rtmpdump)}"
|
||||
done
|
||||
|
||||
substituteInPlace $out/share/xsessions/kodi.desktop \
|
||||
|
|
|
@ -15,7 +15,7 @@ isExecutable() {
|
|||
# *or* there is an INTERP section. This also catches position-independent
|
||||
# executables, as they typically have an INTERP section but their ELF type
|
||||
# is DYN.
|
||||
isExeResult="$(LANG=C readelf -h -l "$1" 2> /dev/null \
|
||||
isExeResult="$(LANG=C $READELF -h -l "$1" 2> /dev/null \
|
||||
| grep '^ *Type: *EXEC\>\|^ *INTERP\>')"
|
||||
# not using grep -q, because it can cause Broken pipe
|
||||
[ -n "$isExeResult" ]
|
||||
|
@ -207,7 +207,7 @@ autoPatchelf() {
|
|||
# outside of this function.
|
||||
while IFS= read -r -d $'\0' file; do
|
||||
isELF "$file" || continue
|
||||
segmentHeaders="$(LANG=C readelf -l "$file")"
|
||||
segmentHeaders="$(LANG=C $READELF -l "$file")"
|
||||
# Skip if the ELF file doesn't have segment headers (eg. object files).
|
||||
# not using grep -q, because it can cause Broken pipe
|
||||
[ -n "$(echo "$segmentHeaders" | grep '^Program Headers:')" ] || continue
|
||||
|
|
|
@ -10,4 +10,4 @@ hicolorIconThemeHook() {
|
|||
}
|
||||
|
||||
# I think this is meant to be a runtime dep
|
||||
addEnvHooks "${hostOffset:?}" hicolorIconThemeHook
|
||||
addEnvHooks "${targetOffset:?}" hicolorIconThemeHook
|
||||
|
|
|
@ -58,6 +58,7 @@ stdenv.mkDerivation rec {
|
|||
python3
|
||||
wrapGAppsHook
|
||||
buildPackages.glib
|
||||
buildPackages.gtk3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -18,10 +18,11 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) buildPackages.cracklib;
|
||||
buildInputs = [ zlib gettext ];
|
||||
|
||||
postPatch = ''
|
||||
postPatch = stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
chmod +x util/cracklib-format
|
||||
patchShebangs util
|
||||
|
||||
'' + ''
|
||||
ln -vs ${toString wordlists} dicts/
|
||||
'';
|
||||
|
||||
|
|
|
@ -18,7 +18,9 @@ stdenv.mkDerivation (rec {
|
|||
nativeBuildInputs = [ cmake ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
cmakeFlags = [ "-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" ];
|
||||
|
||||
doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
|
||||
checkTarget = "test";
|
||||
|
||||
meta = {
|
||||
|
|
24
pkgs/development/libraries/fstrcmp/cross.patch
Normal file
24
pkgs/development/libraries/fstrcmp/cross.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
diff '--color=auto' -ur fstrcmp-0.7-D001-old/configure.ac fstrcmp-0.7.D001/configure.ac
|
||||
--- fstrcmp-0.7-D001-old/configure.ac 2014-03-04 19:13:45.000000000 -0500
|
||||
+++ fstrcmp-0.7.D001/configure.ac 2020-04-02 13:57:52.805154634 -0400
|
||||
@@ -32,6 +32,8 @@
|
||||
AC_OBJEXT
|
||||
AC_EXEEXT
|
||||
|
||||
+LT_INIT
|
||||
+
|
||||
dnl @synopsis AC_ADD_CFLAGS
|
||||
dnl
|
||||
dnl Add the given option to CFLAGS, if it doesn't break the compiler
|
||||
diff '--color=auto' -ur fstrcmp-0.7-D001-old/Makefile.in fstrcmp-0.7.D001/Makefile.in
|
||||
--- fstrcmp-0.7-D001-old/Makefile.in 2014-03-04 19:13:45.000000000 -0500
|
||||
+++ fstrcmp-0.7.D001/Makefile.in 2020-04-02 13:57:12.355269595 -0400
|
||||
@@ -37,6 +37,8 @@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
+top_builddir = $(srcdir)
|
||||
+
|
||||
#
|
||||
# the name of the install program to use
|
||||
#
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchzip, libtool, ghostscript, groff }:
|
||||
{ stdenv, fetchzip, libtool, ghostscript, groff, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fstrcmp";
|
||||
|
@ -9,9 +9,11 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0yg3y3k0wz50gmhgigfi2dx725w1gc8snb95ih7vpcnj6kabgz9a";
|
||||
};
|
||||
|
||||
patches = [ ./cross.patch ];
|
||||
|
||||
outputs = [ "out" "dev" "doc" "man" "devman" ];
|
||||
|
||||
nativeBuildInputs = [ libtool ghostscript groff ];
|
||||
nativeBuildInputs = [ libtool ghostscript groff autoreconfHook ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@ stdenv.mkDerivation {
|
|||
[ libGL libGLU ])
|
||||
;
|
||||
|
||||
configureFlags = [ "--with-ft-prefix=${stdenv.lib.getDev freetype}" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [
|
||||
meson ninja pkgconfig gettext python3 libxml2 libxslt docbook_xsl docbook_xml_dtd_43
|
||||
gtk-doc gobject-introspection makeWrapper
|
||||
gtk-doc gobject-introspection makeWrapper glib
|
||||
]
|
||||
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
|
@ -68,7 +68,7 @@ in stdenv.mkDerivation rec {
|
|||
+ ''
|
||||
moveToOutput "bin" "$dev"
|
||||
moveToOutput "bin/gdk-pixbuf-thumbnailer" "$out"
|
||||
|
||||
'' + stdenv.lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
# We need to install 'loaders.cache' in lib/gdk-pixbuf-2.0/2.10.0/
|
||||
$dev/bin/gdk-pixbuf-query-loaders --update-cache
|
||||
'';
|
||||
|
|
|
@ -14,4 +14,4 @@ findGdkPixbufLoaders() {
|
|||
|
||||
}
|
||||
|
||||
addEnvHooks "$hostOffset" findGdkPixbufLoaders
|
||||
addEnvHooks "$targetOffset" findGdkPixbufLoaders
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
make_glib_find_gsettings_schemas() {
|
||||
# For packages that need gschemas of other packages (e.g. empathy)
|
||||
for maybe_dir in "$1"/share/gsettings-schemas/*; do
|
||||
|
@ -7,7 +6,7 @@ make_glib_find_gsettings_schemas() {
|
|||
fi
|
||||
done
|
||||
}
|
||||
addEnvHooks "$hostOffset" make_glib_find_gsettings_schemas
|
||||
addEnvHooks "$targetOffset" make_glib_find_gsettings_schemas
|
||||
|
||||
# Install gschemas, if any, in a package-specific directory
|
||||
glibPreInstallPhase() {
|
||||
|
|
|
@ -8,6 +8,11 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg";
|
||||
};
|
||||
|
||||
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"ac_cv_func_malloc_0_nonnull=yes"
|
||||
"ac_cv_func_realloc_0_nonnull=yes"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://0pointer.de/lennart/projects/libasyncns/";
|
||||
description = "A C library for Linux/Unix for executing name service queries asynchronously";
|
||||
|
|
|
@ -10,6 +10,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = stdenv.lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"ac_cv_func_malloc_0_nonnull=yes"
|
||||
"ac_cv_func_realloc_0_nonnull=yes"
|
||||
];
|
||||
|
||||
doCheck = false; # fails 3 of 5 tests with locale errors
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
|
|||
patchShebangs .
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ libcddb ncurses help2man ]
|
||||
nativeBuildInputs = [ pkgconfig help2man ];
|
||||
buildInputs = [ libcddb ncurses ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv Carbon IOKit ];
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
|
|
@ -11,8 +11,8 @@ stdenv.mkDerivation {
|
|||
sha256 = "02j09y06csaic4m0fyb4dr9l3hl15nxbbniwq0i1qlccpxjak0j3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ cmake udev libcec_platform ] ++
|
||||
nativeBuildInputs = [ pkgconfig cmake ];
|
||||
buildInputs = [ udev libcec_platform ] ++
|
||||
stdenv.lib.optional (libraspberrypi != null) libraspberrypi;
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=1" ];
|
||||
|
|
|
@ -15,8 +15,8 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [ libuuid ];
|
||||
|
||||
buildPhase = ''
|
||||
g++ -c guid.cpp -o guid.o $CXXFLAGS -std=c++11 -DGUID_LIBUUID
|
||||
ar rvs libcrossguid.a guid.o
|
||||
$CXX -c guid.cpp -o guid.o $CXXFLAGS -std=c++11 -DGUID_LIBUUID
|
||||
$AR rvs libcrossguid.a guid.o
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out/{lib,include}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
, libXext, libdrm, libXfixes, wayland, libffi, libX11
|
||||
, libGL, mesa
|
||||
, minimal ? false, libva-minimal
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -18,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
outputs = [ "dev" "out" ];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
||||
nativeBuildInputs = [ autoreconfHook pkgconfig wayland ];
|
||||
|
||||
buildInputs = [ libdrm ]
|
||||
++ lib.optionals (!minimal) [ libva-minimal libX11 libXext libXfixes wayland libffi libGL ];
|
||||
|
@ -29,6 +30,7 @@ stdenv.mkDerivation rec {
|
|||
configureFlags = [
|
||||
# Add FHS paths for non-NixOS applications.
|
||||
"--with-drivers-path=${mesa.drivers.driverLink}/lib/dri:/usr/lib/dri:/usr/lib32/dri"
|
||||
"ac_cv_path_WAYLAND_SCANNER=${buildPackages.wayland}/bin/wayland-scanner"
|
||||
] ++ lib.optionals (!minimal) [ "--enable-glx" ];
|
||||
|
||||
installFlags = [
|
||||
|
|
|
@ -13,6 +13,11 @@ stdenv.mkDerivation rec {
|
|||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
"ac_cv_func_malloc_0_nonnull=yes"
|
||||
"ac_cv_func_realloc_0_nonnull=yes"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "An abstraction library for audio visualisations";
|
||||
homepage = "https://sourceforge.net/projects/libvisual/";
|
||||
|
|
|
@ -135,16 +135,10 @@ stdenv.mkDerivation rec {
|
|||
experimentalFpMbStatsSupport ||
|
||||
experimentalEmulateHardwareSupport) "experimental")
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
#"--extra-cflags="
|
||||
#"--extra-cxxflags="
|
||||
#"--prefix="
|
||||
#"--libc="
|
||||
#"--libdir="
|
||||
"--enable-external-build"
|
||||
# libvpx darwin targets include darwin version (ie. ARCH-darwinXX-gcc, XX being the darwin version)
|
||||
# See all_platforms: https://github.com/webmproject/libvpx/blob/master/configure
|
||||
# Darwin versions: 10.4=8, 10.5=9, 10.6=10, 10.7=11, 10.8=12, 10.9=13, 10.10=14
|
||||
"--force-target=${stdenv.hostPlatform.config}${
|
||||
"--force-target=${stdenv.hostPlatform.parsed.cpu.name}-${stdenv.hostPlatform.parsed.kernel.name}${
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
if stdenv.hostPlatform.osxMinVersion == "10.10" then "14"
|
||||
else if stdenv.hostPlatform.osxMinVersion == "10.9" then "13"
|
||||
|
|
|
@ -23,14 +23,14 @@ in stdenv.mkDerivation {
|
|||
./2.6.2-cxx.patch
|
||||
];
|
||||
|
||||
preConfigure = "export LD=${if stdenv.isDarwin then "clang++" else "g++"}";
|
||||
preConfigure = "export LD=${stdenv.cc.targetPrefix}c++";
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
stdenv.lib.optionalString stdenv.isDarwin "-mmacosx-version-min=10.9";
|
||||
|
||||
buildInputs = [ unzip ];
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildPhase = ''
|
||||
# use STL (xbmc requires it)
|
||||
sed '1i#define TIXML_USE_STL 1' -i tinyxml.h
|
||||
|
|
|
@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "12n4mxc6db89258k8i47ql1zna7k94lkwv7lpxg39nm8ypa1ywrv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ cmake python3 xlibsWrapper libxcb libXrandr libXext wayland ];
|
||||
nativeBuildInputs = [ pkgconfig cmake ];
|
||||
buildInputs = [ python3 xlibsWrapper libxcb libXrandr libXext wayland ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, cmake, pkgconfig, pugixml, wayland, libGL }:
|
||||
{ stdenv, fetchFromGitHub, cmake, pkgconfig, pugixml, wayland, libGL, libffi, buildPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "waylandpp";
|
||||
|
@ -11,8 +11,10 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "16h57hzd688664qcyznzhjp3hxipdkzgv46x82yhkww24av8b55n";
|
||||
};
|
||||
|
||||
cmakeFlags = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "-DWAYLAND_SCANNERPP=${buildPackages.waylandpp}/bin/wayland-scanner++";
|
||||
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
buildInputs = [ pugixml wayland libGL ];
|
||||
buildInputs = [ pugixml wayland libGL libffi ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Wayland C++ binding";
|
||||
|
|
|
@ -44,12 +44,12 @@ buildPythonPackage rec {
|
|||
|
||||
checkInputs = [
|
||||
nose dbus dbus-python which pycodestyle pyflakes
|
||||
pygobject3 bluez bluez.test networkmanager
|
||||
pygobject3 bluez (lib.getOutput "test" bluez) networkmanager
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
export PATH="$PATH:${bluez.test}/test";
|
||||
export PATH="$PATH:${lib.getOutput "test" bluez}/test";
|
||||
nosetests -v
|
||||
runHook postCheck
|
||||
'';
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
, enableNvidiaCgToolkit ? false, nvidia_cg_toolkit ? null
|
||||
, withVulkan ? stdenv.isLinux, vulkan-loader ? null
|
||||
, fetchurl
|
||||
, wayland
|
||||
, libxkbcommon
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
@ -30,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||
rev = "v${version}";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ]
|
||||
nativeBuildInputs = [ pkgconfig wayland ]
|
||||
++ optional withVulkan makeWrapper;
|
||||
|
||||
buildInputs = [ ffmpeg freetype libxml2 libGLU libGL python3 SDL2 which ]
|
||||
|
@ -38,7 +40,11 @@ stdenv.mkDerivation rec {
|
|||
++ optional withVulkan vulkan-loader
|
||||
++ optionals stdenv.isDarwin [ libobjc AppKit Foundation ]
|
||||
++ optionals stdenv.isLinux [ alsaLib libdrm libpulseaudio libv4l libX11
|
||||
libXdmcp libXext libXxf86vm mesa udev ];
|
||||
libXdmcp libXext libXxf86vm mesa udev
|
||||
wayland libxkbcommon ];
|
||||
|
||||
# we use prefix-less pkg-config
|
||||
PKG_CONF_PATH = "pkg-config";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
|
|
@ -9,9 +9,11 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0z9k3ssbfk2ky2w13avgyf202j1drsz9sv3834bp33cj1i2hc3qw";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
# ToDo: a52, etc.?
|
||||
buildInputs =
|
||||
[ pkgconfig alsaLib libogg ]
|
||||
[ alsaLib libogg ]
|
||||
++ lib.optional (libpulseaudio != null) libpulseaudio
|
||||
++ lib.optional (libjack2 != null) libjack2;
|
||||
|
||||
|
|
|
@ -11,9 +11,13 @@
|
|||
, readline
|
||||
, systemd
|
||||
, udev
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
}: let
|
||||
pythonPath = with python3.pkgs; [
|
||||
dbus-python
|
||||
pygobject3
|
||||
recursivePthLoader
|
||||
];
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "bluez";
|
||||
version = "5.54";
|
||||
|
||||
|
@ -22,12 +26,6 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1p2ncvjz6alr9n3l5wvq2arqgc7xjs6dqyar1l9jp0z8cfgapkb8";
|
||||
};
|
||||
|
||||
pythonPath = with python3.pkgs; [
|
||||
dbus-python
|
||||
pygobject3
|
||||
recursivePthLoader
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsaLib
|
||||
dbus
|
||||
|
@ -44,7 +42,7 @@ stdenv.mkDerivation rec {
|
|||
python3.pkgs.wrapPython
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" "test" ];
|
||||
outputs = [ "out" "dev" ] ++ lib.optional doCheck "test";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace tools/hid2hci.rules \
|
||||
|
@ -79,7 +77,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
doCheck = stdenv.hostPlatform.isx86_64;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString doCheck ''
|
||||
mkdir -p $test/{bin,test}
|
||||
cp -a test $test
|
||||
pushd $test/test
|
||||
|
@ -94,8 +92,8 @@ stdenv.mkDerivation rec {
|
|||
ln -s ../test/$a $test/bin/bluez-$a
|
||||
done
|
||||
popd
|
||||
wrapPythonProgramsIn $test/test "$test/test $pythonPath"
|
||||
|
||||
wrapPythonProgramsIn $test/test "$test/test ${toString pythonPath}"
|
||||
'' + ''
|
||||
# for bluez4 compatibility for NixOS
|
||||
mkdir $out/sbin
|
||||
ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ stdenv, fetchurl, autoreconfHook, pkgconfig, libxslt, docbook_xsl
|
||||
, gtk3, udev, systemd
|
||||
, gtk3, udev, systemd, lib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -44,6 +44,7 @@ stdenv.mkDerivation rec {
|
|||
"--enable-pango"
|
||||
"--enable-gdm-transition"
|
||||
"--enable-gtk"
|
||||
"ac_cv_path_SYSTEMD_ASK_PASSWORD_AGENT=${lib.getBin systemd}/bin/systemd-tty-ask-password-agent"
|
||||
];
|
||||
|
||||
configurePlatforms = [ "host" ];
|
||||
|
|
|
@ -256,6 +256,15 @@ self: super:
|
|||
|
||||
libXres = super.libXres.overrideAttrs (attrs: {
|
||||
outputs = [ "out" "dev" "devdoc" ];
|
||||
buildInputs = with self; attrs.buildInputs ++ [ utilmacros ];
|
||||
configureFlags = attrs.configureFlags or []
|
||||
++ malloc0ReturnsNullCrossFlag;
|
||||
});
|
||||
|
||||
libXScrnSaver = super.libXScrnSaver.overrideAttrs (attrs: {
|
||||
buildInputs = with self; attrs.buildInputs ++ [ utilmacros ];
|
||||
configureFlags = attrs.configureFlags or []
|
||||
++ malloc0ReturnsNullCrossFlag;
|
||||
});
|
||||
|
||||
libXv = super.libXv.overrideAttrs (attrs: {
|
||||
|
|
|
@ -9,6 +9,7 @@ stdenv.mkDerivation {
|
|||
cp ${builtins.toFile "config.h" customConfig} ./config.h
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ ncurses ];
|
||||
buildInputs = [ ncurses ];
|
||||
|
||||
prePatch = ''
|
||||
|
@ -16,9 +17,7 @@ stdenv.mkDerivation {
|
|||
--replace /usr/share/terminfo $out/share/terminfo
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
make PREFIX=$out install
|
||||
'';
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Dynamic virtual terminal manager";
|
||||
|
|
|
@ -66,12 +66,12 @@ let
|
|||
linux = pkgs.utillinux;
|
||||
};
|
||||
getconf = {
|
||||
linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc
|
||||
linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.stdenv.cc.libc
|
||||
else pkgs.netbsd.getconf;
|
||||
darwin = pkgs.darwin.system_cmds;
|
||||
};
|
||||
getent = {
|
||||
linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.glibc
|
||||
linux = if stdenv.hostPlatform.libc == "glibc" then pkgs.stdenv.cc.libc
|
||||
else pkgs.netbsd.getent;
|
||||
darwin = pkgs.netbsd.getent;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue