diff options
author | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2018-05-16 03:09:33 +0300 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2018-05-16 03:09:33 +0300 |
commit | 6b6a57574828b21632a7b8ff3a99e1465035b93e (patch) | |
tree | 07fe10e97c2d0b4cbf45e90952d8c7d948e84c59 /pkgs/development | |
parent | ce018be2d6ce20960b52ebc4bd86e64a5a58ce29 (diff) | |
parent | 780592ca6ef752f3f4886a66ed6181095e358db5 (diff) | |
download | nixlib-6b6a57574828b21632a7b8ff3a99e1465035b93e.tar nixlib-6b6a57574828b21632a7b8ff3a99e1465035b93e.tar.gz nixlib-6b6a57574828b21632a7b8ff3a99e1465035b93e.tar.bz2 nixlib-6b6a57574828b21632a7b8ff3a99e1465035b93e.tar.lz nixlib-6b6a57574828b21632a7b8ff3a99e1465035b93e.tar.xz nixlib-6b6a57574828b21632a7b8ff3a99e1465035b93e.tar.zst nixlib-6b6a57574828b21632a7b8ff3a99e1465035b93e.zip |
Merge remote-tracking branch 'upstream/master' into staging
Conflicts: pkgs/tools/networking/telnet/default.nix pkgs/top-level/aliases.nix
Diffstat (limited to 'pkgs/development')
19 files changed, 687 insertions, 51 deletions
diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 8137ca30ec2b..fab9b8fe7458 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -325,6 +325,7 @@ stdenv.mkDerivation ({ "--with-gnu-as" "--without-gnu-ld" ] ++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer" + ++ optional (targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419" ; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; diff --git a/pkgs/development/libraries/ffmpeg-full/default.nix b/pkgs/development/libraries/ffmpeg-full/default.nix index 6fd8bfc3e195..fcbaaaba6ba4 100644 --- a/pkgs/development/libraries/ffmpeg-full/default.nix +++ b/pkgs/development/libraries/ffmpeg-full/default.nix @@ -25,7 +25,6 @@ , ffmpegProgram ? true # Build ffmpeg executable , ffplayProgram ? true # Build ffplay executable , ffprobeProgram ? true # Build ffprobe executable -, ffserverProgram ? true # Build ffserver executable , qtFaststartProgram ? true # Build qt-faststart executable /* * Library options @@ -98,13 +97,14 @@ , libXv ? null # Xlib support , lzma ? null # xz-utils , nvenc ? false, nvidia-video-sdk ? null # NVIDIA NVENC support +, callPackage # needed for NVENC to access external ffmpeg nvidia headers , openal ? null # OpenAL 1.1 capture support #, opencl ? null # OpenCL code , opencore-amr ? null # AMR-NB de/encoder & AMR-WB decoder #, opencv ? null # Video filtering , openglExtlib ? false, libGLU_combined ? null # OpenGL rendering #, openh264 ? null # H.264/AVC encoder -, openjpeg_1 ? null # JPEG 2000 de/encoder +, openjpeg ? null # JPEG 2000 de/encoder , opensslExtlib ? false, openssl ? null , libpulseaudio ? null # Pulseaudio input support , rtmpdump ? null # RTMP[E] support @@ -159,7 +159,7 @@ * utvideo vo-aacenc vo-amrwbenc xvmc zvbi blackmagic-design-desktop-video * * Need fixes to support Darwin: - * frei0r, game-music-emu, gsm, libjack2, libssh, libvpx(stable 1.3.0), openal, openjpeg_1, + * frei0r, game-music-emu, gsm, libjack2, libssh, libvpx(stable 1.3.0), openal, openjpeg, * pulseaudio, rtmpdump, samba, vid-stab, wavpack, x265. xavs * * Not supported: @@ -176,6 +176,8 @@ let inherit (stdenv) isCygwin isFreeBSD isLinux; inherit (stdenv.lib) optional optionals optionalString enableFeature; + + nv-codec-headers = callPackage ./nv-codec-headers.nix { }; in /* @@ -201,7 +203,6 @@ assert ffplayProgram -> avcodecLibrary && swresampleLibrary && SDL2 != null; assert ffprobeProgram -> avcodecLibrary && avformatLibrary; -assert ffserverProgram -> avformatLibrary; /* * Library dependencies */ @@ -231,11 +232,11 @@ assert nvenc -> nvidia-video-sdk != null && nonfreeLicensing; stdenv.mkDerivation rec { name = "ffmpeg-full-${version}"; - version = "3.4.2"; + version = "4.0"; src = fetchurl { url = "https://www.ffmpeg.org/releases/ffmpeg-${version}.tar.xz"; - sha256 = "0h6prjn1ijkzzhkyj8mazp0wpx7m0n9ycadjxagf9czqirbyk4ib"; + sha256 = "0gx4ngnhi5glmxh38603qy5n6vq8bl1cr4sqd1xff95i82pmv57d"; }; prePatch = '' @@ -289,7 +290,6 @@ stdenv.mkDerivation rec { (enableFeature ffmpegProgram "ffmpeg") (enableFeature ffplayProgram "ffplay") (enableFeature ffprobeProgram "ffprobe") - (enableFeature ffserverProgram "ffserver") /* * Library flags */ @@ -368,7 +368,7 @@ stdenv.mkDerivation rec { #(enableFeature (opencv != null) "libopencv") (enableFeature openglExtlib "opengl") #(enableFeature (openh264 != null) "openh264") - (enableFeature (openjpeg_1 != null) "libopenjpeg") + (enableFeature (openjpeg != null) "libopenjpeg") (enableFeature (opensslExtlib && gplLicensing) "openssl") (enableFeature (libpulseaudio != null) "libpulse") #(enableFeature quvi "libquvi") @@ -408,14 +408,14 @@ stdenv.mkDerivation rec { bzip2 celt fontconfig freetype frei0r fribidi game-music-emu gnutls gsm libjack2 ladspaH lame libass libbluray libbs2b libcaca libdc1394 libmodplug libogg libopus libssh libtheora libvdpau libvorbis libvpx libwebp libX11 - libxcb libXv lzma openal openjpeg_1 libpulseaudio rtmpdump opencore-amr + libxcb libXv lzma openal openjpeg libpulseaudio rtmpdump opencore-amr samba SDL2 soxr speex vid-stab vo-amrwbenc wavpack x264 x265 xavs xvidcore zeromq4 zlib ] ++ optional openglExtlib libGLU_combined ++ optionals nonfreeLicensing [ fdk_aac openssl ] ++ optional ((isLinux || isFreeBSD) && libva != null) libva ++ optionals isLinux [ alsaLib libraw1394 libv4l ] - ++ optionals nvenc [ nvidia-video-sdk ] + ++ optionals nvenc [ nvidia-video-sdk nv-codec-headers ] ++ optionals stdenv.isDarwin [ Cocoa CoreServices CoreAudio AVFoundation MediaToolbox VideoDecodeAcceleration libiconv ]; diff --git a/pkgs/development/libraries/ffmpeg-full/nv-codec-headers.nix b/pkgs/development/libraries/ffmpeg-full/nv-codec-headers.nix new file mode 100644 index 000000000000..03599c91bf04 --- /dev/null +++ b/pkgs/development/libraries/ffmpeg-full/nv-codec-headers.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchgit }: + +stdenv.mkDerivation rec { + name = "nv-codec-headers-${version}"; + version = "n8.1.24.2"; + + src = fetchgit { + url = "https://git.videolan.org/git/ffmpeg/nv-codec-headers.git"; + rev = "${version}"; + sha256 = "122i3f6whiz5yp44dhk73ifr1973z8vvfbg4216vb782bl8b5bam"; + }; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = { + description = "ffmpeg nvidia headers for NVENC"; + homepage = http://ffmpeg.org/; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = [ stdenv.lib.maintainers.MP2E ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/development/libraries/flatpak/default.nix b/pkgs/development/libraries/flatpak/default.nix new file mode 100644 index 000000000000..f26dad3ce15e --- /dev/null +++ b/pkgs/development/libraries/flatpak/default.nix @@ -0,0 +1,74 @@ +{ stdenv, fetchurl, autoreconfHook, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43, docbook_xsl, which, libxml2 +, gobjectIntrospection, gtk_doc, intltool, libxslt, pkgconfig, xmlto, appstream-glib, substituteAll, glibcLocales, yacc +, bubblewrap, bzip2, dbus, glib, gpgme, json_glib, libarchive, libcap, libseccomp, coreutils, python2, hicolor-icon-theme +, libsoup, lzma, ostree, polkit, python3, systemd, xlibs, valgrind, glib_networking, makeWrapper, gnome3 }: + +let + version = "0.11.7"; + desktop_schemas = gnome3.gsettings_desktop_schemas; +in stdenv.mkDerivation rec { + name = "flatpak-${version}"; + + outputs = [ "out" "man" "doc" "installedTests" ]; + + src = fetchurl { + url = "https://github.com/flatpak/flatpak/releases/download/${version}/${name}.tar.xz"; + sha256 = "1vq4j7v68lp4fsvpas1bcsx1z4snpj0mkbq2mi00kx3jb48z768h"; + }; + + patches = [ + (substituteAll { + src = ./fix-test-paths.patch; + inherit coreutils python2 glibcLocales; + hicolorIconTheme = hicolor-icon-theme; + }) + # patch taken from gtk_doc + ./respect-xml-catalog-files-var.patch + ]; + + nativeBuildInputs = [ + autoreconfHook libxml2 docbook_xml_dtd_412 docbook_xml_dtd_42 docbook_xml_dtd_43 docbook_xsl which gobjectIntrospection + gtk_doc intltool libxslt pkgconfig xmlto appstream-glib yacc makeWrapper + ] ++ stdenv.lib.optionals doCheck checkInputs; + + buildInputs = [ + bubblewrap bzip2 dbus glib gpgme json_glib libarchive libcap libseccomp + libsoup lzma ostree polkit python3 systemd xlibs.libXau + ]; + + checkInputs = [ valgrind ]; + + doCheck = false; # TODO: some issues with temporary files + + enableParallelBuilding = true; + + configureFlags = [ + "--with-system-bubblewrap=${bubblewrap}/bin/bwrap" + "--localstatedir=/var" + "--enable-installed-tests" + ]; + + makeFlags = [ + "installed_testdir=$(installedTests)/libexec/installed-tests/flatpak" + "installed_test_metadir=$(installedTests)/share/installed-tests/flatpak" + ]; + + postPatch = '' + patchShebangs buildutil + patchShebangs tests + ''; + + postFixup = '' + wrapProgram $out/bin/flatpak \ + --prefix GIO_EXTRA_MODULES : "${glib_networking.out}/lib/gio/modules" \ + --prefix XDG_DATA_DIRS : "${desktop_schemas}/share/gsettings-schemas/${desktop_schemas.name}" + ''; + + meta = with stdenv.lib; { + description = "Linux application sandboxing and distribution framework"; + homepage = https://flatpak.org/; + license = licenses.lgpl21; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/libraries/flatpak/fix-test-paths.patch b/pkgs/development/libraries/flatpak/fix-test-paths.patch new file mode 100644 index 000000000000..a548f3882864 --- /dev/null +++ b/pkgs/development/libraries/flatpak/fix-test-paths.patch @@ -0,0 +1,132 @@ +--- a/tests/libtest.sh ++++ b/tests/libtest.sh +@@ -322,7 +322,7 @@ + # running installed-tests: assume we know what we're doing + : + elif ! "$FLATPAK_BWRAP" --unshare-ipc --unshare-net --unshare-pid \ +- --ro-bind / / /bin/true > bwrap-result 2>&1; then ++ --ro-bind / / @coreutils@/bin/true > bwrap-result 2>&1; then + sed -e 's/^/# /' < bwrap-result + echo "1..0 # SKIP Cannot run bwrap" + exit 0 +@@ -330,7 +330,7 @@ + } + + skip_without_python2 () { +- if ! test -f /usr/bin/python2 || ! /usr/bin/python2 -c "import sys; sys.exit(0 if sys.version_info >= (2, 7) else 1)" ; then ++ if ! test -f @python2@/bin/python2 || ! @python2@/bin/python2 -c "import sys; sys.exit(0 if sys.version_info >= (2, 7) else 1)" ; then + echo "1..0 # SKIP this test requires /usr/bin/python2 (2.7) support" + exit 0 + fi +@@ -350,12 +350,12 @@ + export DBUS_SESSION_BUS_ADDRESS="$(cat dbus-session-bus-address)" + DBUS_SESSION_BUS_PID="$(cat dbus-session-bus-pid)" + +-if ! /bin/kill -0 "$DBUS_SESSION_BUS_PID"; then ++if ! @coreutils@/bin/kill -0 "$DBUS_SESSION_BUS_PID"; then + assert_not_reached "Failed to start dbus-daemon" + fi + + cleanup () { +- /bin/kill $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-} ++ @coreutils@/bin/kill $DBUS_SESSION_BUS_PID ${FLATPAK_HTTP_PID:-} + gpg-connect-agent --homedir "${FL_GPG_HOMEDIR}" killagent /bye || true + fusermount -u $XDG_RUNTIME_DIR/doc || : + if test -n "${TEST_SKIP_CLEANUP:-}"; then +--- a/tests/make-test-runtime.sh ++++ b/tests/make-test-runtime.sh +@@ -21,6 +21,7 @@ + cat ${DIR}/metadata + + # Add bash and dependencies ++mkdir -p ${DIR}/nix/store + mkdir -p ${DIR}/usr/bin + mkdir -p ${DIR}/usr/lib + ln -s ../lib ${DIR}/usr/lib64 +@@ -30,47 +31,27 @@ + else + cp `which ldconfig` ${DIR}/usr/bin + fi +-T=`mktemp` +-for i in $@; do +- I=`which $i` +- cp $I ${DIR}/usr/bin +- ldd $I | sed "s/.* => //" | awk '{ print $1}' | grep ^/ | grep ^/ >> $T +- if test $i == python2; then +- mkdir -p ${DIR}/usr/lib/python2.7/lib-dynload +- # This is a hardcoded minimal set of modules we need in the current tests. +- # Pretty hacky stuff. Add modules as needed. +- PYDIR=/usr/lib/python2.7 +- if test -d /usr/lib64/python2.7; then PYDIR=/usr/lib64/python2.7; fi +- for py in site os stat posixpath genericpath warnings \ +- linecache types UserDict abc _abcoll \ +- _weakrefset copy_reg traceback sysconfig \ +- re sre_compile sre_parse sre_constants \ +- _sysconfigdata ; do +- cp ${PYDIR}/$py.py ${DIR}/usr/lib/python2.7 +- done +- # These might not exist, depending how Python was configured; and the +- # part after ${so} might be "module" or ".x86_64-linux-gnu" or +- # something else +- for so in _locale strop ; do +- cp ${PYDIR}/lib-dynload/${so}*.so ${DIR}/usr/lib/python2.7/lib-dynload || : +- done +- for plat in $( cd ${PYDIR} && echo plat-* ); do +- test -e ${PYDIR}/${plat} || continue +- mkdir -p ${DIR}/usr/lib/python2.7/${plat} +- cp ${PYDIR}/${plat}/*.py ${DIR}/usr/lib/python2.7/${plat}/ +- done +- fi +-done + ln -s bash ${DIR}/usr/bin/sh +-for i in `sort -u $T`; do +- cp "$i" ${DIR}/usr/lib/ ++for i in $@; do ++ I=$(readlink -f $(which $i)) ++ requisites=$(nix-store --query --requisites "$I") ++ for r in $requisites; do ++ # a single store item can be needed by multiple paths, no need to copy it again ++ if [ ! -e ${DIR}/$r ]; then ++ cp -r $r ${DIR}/$r ++ fi ++ done ++ ln -s $I ${DIR}/usr/bin/$i + done + +-# We copy the C.UTF8 locale and call it en_US. Its a bit of a lie, but +-# the real en_US locale is often not available, because its in the +-# local archive. ++mv ${DIR}/nix/store ${DIR}/usr/store # files outside /usr are not permitted, we will have to replace /nix/store with /usr/store ++chmod -R u+w ${DIR} # nix store has read-only directories which would cause problems during clean-up, files need to be writable for sed ++find ${DIR} -type f -print0 | xargs -0 sed -i 's~/nix/store/~/usr/store/~g' # replace hardcoded paths ++find ${DIR} -type l | xargs -I '{}' sh -c 'tg="$(readlink "$1")"; newtg="${tg#/nix/store/}"; if [ "$tg" != "$newtg" ]; then ln -fs "/usr/store/$newtg" "$1"; fi' -- '{}' # replace symlink targets ++ ++# We copy the whole locale archive because we do not have C.UTF8 locale + mkdir -p ${DIR}/usr/lib/locale/ +-cp -r /usr/lib/locale/C.* ${DIR}/usr/lib/locale/en_US ++cp @glibcLocales@/lib/locale/locale-archive ${DIR}/usr/lib/locale/locale-archive + + if [ x$COLLECTION_ID != x ]; then + collection_args=--collection-id=${COLLECTION_ID} +--- a/tests/testlibrary.c ++++ b/tests/testlibrary.c +@@ -378,7 +378,7 @@ + { + gint exit_code = 0; + char *argv[] = { (char *)bwrap, "--unshare-ipc", "--unshare-net", +- "--unshare-pid", "--ro-bind", "/", "/", "/bin/true", NULL }; ++ "--unshare-pid", "--ro-bind", "/", "/", "@coreutils@/bin/true", NULL }; + g_autofree char *argv_str = g_strjoinv (" ", argv); + g_test_message ("Spawning %s", argv_str); + g_spawn_sync (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &exit_code, &error); +--- a/triggers/gtk-icon-cache.trigger ++++ b/triggers/gtk-icon-cache.trigger +@@ -1,7 +1,7 @@ + #!/bin/sh + + if test \( -x "$(which gtk-update-icon-cache 2>/dev/null)" \) -a \( -d $1/exports/share/icons/hicolor \); then +- cp /usr/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/ ++ cp @hicolorIconTheme@/share/icons/hicolor/index.theme $1/exports/share/icons/hicolor/ + for dir in $1/exports/share/icons/*; do + if test -f $dir/index.theme; then + if ! gtk-update-icon-cache --quiet $dir; then diff --git a/pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch b/pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch new file mode 100644 index 000000000000..0e259aebd8a5 --- /dev/null +++ b/pkgs/development/libraries/flatpak/respect-xml-catalog-files-var.patch @@ -0,0 +1,13 @@ +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -40,8 +40,8 @@ + [ + AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl + AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog]) +- if $jh_found_xmlcatalog && \ +- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then ++ # empty argument forces libxml to use XML_CATALOG_FILES variable ++ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then + AC_MSG_RESULT([found]) + ifelse([$3],,,[$3 + ])dnl diff --git a/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix b/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix new file mode 100644 index 000000000000..720e394afc70 --- /dev/null +++ b/pkgs/development/libraries/xdg-desktop-portal-gtk/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libxml2, xdg-desktop-portal, gtk3, glib }: + +let + version = "0.11"; +in stdenv.mkDerivation rec { + name = "xdg-desktop-portal-gtk-${version}"; + + src = fetchFromGitHub { + owner = "flatpak"; + repo = "xdg-desktop-portal-gtk"; + rev = version; + sha256 = "03ysv29k7fp14hx0gakjigzzlniwicqd81nrhnc6w4pgin0y0zwg"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig libxml2 xdg-desktop-portal ]; + buildInputs = [ glib gtk3 ]; + + meta = with stdenv.lib; { + description = "Desktop integration portals for sandboxed apps"; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.linux; + license = licenses.lgpl21; + }; +} diff --git a/pkgs/development/libraries/xdg-desktop-portal/default.nix b/pkgs/development/libraries/xdg-desktop-portal/default.nix new file mode 100644 index 000000000000..98bd8ba23bb5 --- /dev/null +++ b/pkgs/development/libraries/xdg-desktop-portal/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fuse }: + +let + version = "0.11"; +in stdenv.mkDerivation rec { + name = "xdg-desktop-portal-${version}"; + + outputs = [ "out" "installedTests" ]; + + src = fetchFromGitHub { + owner = "flatpak"; + repo = "xdg-desktop-portal"; + rev = version; + sha256 = "06gipd51snvlp2jp68v2c8rwbsv36kjzg9xacm81n1w4b2dpz4g0"; + }; + + patches = [ + ./respect-path-env-var.patch + ]; + + nativeBuildInputs = [ autoreconfHook pkgconfig libxml2 ]; + buildInputs = [ glib pipewire fuse ]; + + doCheck = true; + + configureFlags = [ + "--enable-installed-tests" + ]; + + makeFlags = [ + "installed_testdir=$(installedTests)/libexec/installed-tests/xdg-desktop-portal" + "installed_test_metadir=$(installedTests)/share/installed-tests/xdg-desktop-portal" + ]; + + meta = with stdenv.lib; { + description = "Desktop integration portals for sandboxed apps"; + license = licenses.lgpl21; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/libraries/xdg-desktop-portal/respect-path-env-var.patch b/pkgs/development/libraries/xdg-desktop-portal/respect-path-env-var.patch new file mode 100644 index 000000000000..f884899ecd19 --- /dev/null +++ b/pkgs/development/libraries/xdg-desktop-portal/respect-path-env-var.patch @@ -0,0 +1,76 @@ +--- a/src/xdg-desktop-portal.c ++++ b/src/xdg-desktop-portal.c +@@ -177,38 +177,50 @@ + static void + load_installed_portals (void) + { +- const char *portal_dir = PKGDATADIR "/portals"; +- g_autoptr(GFile) dir = g_file_new_for_path (portal_dir); +- g_autoptr(GFileEnumerator) enumerator = NULL; + +- enumerator = g_file_enumerate_children (dir, "*", G_FILE_QUERY_INFO_NONE, NULL, NULL); ++ g_auto(GStrv) portal_dir_list; ++ int i; ++ const char *portal_dir = g_getenv ("XDG_DESKTOP_PORTAL_PATH"); ++ ++ if (portal_dir == NULL) ++ portal_dir = PKGDATADIR "/portals"; + +- if (enumerator == NULL) +- return; ++ portal_dir_list = g_strsplit (portal_dir, G_SEARCHPATH_SEPARATOR_S, 0); + +- while (TRUE) ++ for (i = 0; portal_dir_list[i] != NULL; i++) + { +- g_autoptr(GFileInfo) info = g_file_enumerator_next_file (enumerator, NULL, NULL); +- g_autoptr(GFile) child = NULL; +- g_autofree char *path = NULL; +- const char *name; +- g_autoptr(GError) error = NULL; ++ portal_dir = portal_dir_list[i]; ++ g_autoptr(GFile) dir = g_file_new_for_path (portal_dir); ++ g_autoptr(GFileEnumerator) enumerator = NULL; ++ enumerator = g_file_enumerate_children (dir, "*", G_FILE_QUERY_INFO_NONE, NULL, NULL); + +- if (info == NULL) +- break; ++ if (enumerator == NULL) ++ continue; + +- name = g_file_info_get_name (info); ++ while (TRUE) ++ { ++ g_autoptr(GFileInfo) info = g_file_enumerator_next_file (enumerator, NULL, NULL); ++ g_autoptr(GFile) child = NULL; ++ g_autofree char *path = NULL; ++ const char *name; ++ g_autoptr(GError) error = NULL; + +- if (!g_str_has_suffix (name, ".portal")) +- continue; ++ if (info == NULL) ++ break; + +- child = g_file_enumerator_get_child (enumerator, info); +- path = g_file_get_path (child); ++ name = g_file_info_get_name (info); + +- if (!register_portal (path, &error)) +- { +- g_warning ("Error loading %s: %s", path, error->message); +- continue; ++ if (!g_str_has_suffix (name, ".portal")) ++ continue; ++ ++ child = g_file_enumerator_get_child (enumerator, info); ++ path = g_file_get_path (child); ++ ++ if (!register_portal (path, &error)) ++ { ++ g_warning ("Error loading %s: %s", path, error->message); ++ continue; ++ } + } + } + diff --git a/pkgs/development/ocaml-modules/conduit/lwt-unix.nix b/pkgs/development/ocaml-modules/conduit/lwt-unix.nix index ce7a33a11eed..5f33bbc42c10 100644 --- a/pkgs/development/ocaml-modules/conduit/lwt-unix.nix +++ b/pkgs/development/ocaml-modules/conduit/lwt-unix.nix @@ -1,5 +1,5 @@ { stdenv, ocaml, findlib, jbuilder, conduit-lwt -, logs, ppx_sexp_conv +, logs, ppx_sexp_conv, lwt_ssl }: if !stdenv.lib.versionAtLeast conduit-lwt.version "1.0" @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { buildInputs = [ ocaml findlib jbuilder ppx_sexp_conv ]; - propagatedBuildInputs = [ conduit-lwt logs ]; + propagatedBuildInputs = [ conduit-lwt logs lwt_ssl ]; buildPhase = "jbuilder build -p conduit-lwt-unix"; } diff --git a/pkgs/development/ocaml-modules/ocurl/default.nix b/pkgs/development/ocaml-modules/ocurl/default.nix index 73ffd7f41ea9..4b6bea31b40c 100644 --- a/pkgs/development/ocaml-modules/ocurl/default.nix +++ b/pkgs/development/ocaml-modules/ocurl/default.nix @@ -1,10 +1,10 @@ { stdenv, pkgconfig, ocaml, findlib, fetchurl, curl, ncurses }: stdenv.mkDerivation rec { - name = "ocurl-0.8.0"; + name = "ocurl-0.8.1"; src = fetchurl { url = "http://ygrek.org.ua/p/release/ocurl/${name}.tar.gz"; - sha256 = "0292knvm9g038br0dc03lcsnbjqycyiqha256dp4bxkz3vmmz4wr"; + sha256 = "08ldzbx1k3mbjc01fmzsn86ll4paf331bcjss6iig6y6hgc9q3ry"; }; buildInputs = [ pkgconfig ocaml findlib ncurses ]; diff --git a/pkgs/development/python-modules/podcats/default.nix b/pkgs/development/python-modules/podcats/default.nix new file mode 100644 index 000000000000..a1b8312b134f --- /dev/null +++ b/pkgs/development/python-modules/podcats/default.nix @@ -0,0 +1,28 @@ +{ lib, buildPythonPackage, fetchFromGitHub, flask, mutagen }: + +buildPythonPackage rec { + pname = "podcats"; + version = "v0.5.0"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "jakubroztocil"; + repo = "podcats"; + rev = version; + sha256 = "0zjdgry5n209rv19kj9yaxy7c7zq5gxr488izrgs4sc75vdzz8xc"; + }; + + patchPhase = '' + substituteInPlace podcats.py \ + --replace 'debug=True' 'debug=True, use_reloader=False' + ''; + + propagatedBuildInputs = [ flask mutagen ]; + + meta = { + description = "Application that generates RSS feeds for podcast episodes from local audio files"; + homepage = https://github.com/jakubroztocil/podcats; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ the-kenny ]; + }; +} diff --git a/pkgs/development/python-modules/pytorch/default.nix b/pkgs/development/python-modules/pytorch/default.nix index c8376196d3ac..b0ac4e070935 100644 --- a/pkgs/development/python-modules/pytorch/default.nix +++ b/pkgs/development/python-modules/pytorch/default.nix @@ -1,7 +1,7 @@ -{ buildPythonPackage, +{ buildPythonPackage, pythonOlder, cudaSupport ? false, cudatoolkit ? null, cudnn ? null, - fetchFromGitHub, fetchpatch, lib, numpy, pyyaml, cffi, cmake, - git, stdenv, linkFarm, symlinkJoin, + fetchFromGitHub, fetchpatch, lib, numpy, pyyaml, cffi, typing, cmake, + stdenv, linkFarm, symlinkJoin, utillinux, which }: assert cudnn == null || cudatoolkit != null; @@ -25,7 +25,7 @@ let "LD_LIBRARY_PATH=${cudaStub}\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} "; in buildPythonPackage rec { - version = "0.3.1"; + version = "0.4.0"; pname = "pytorch"; name = "${pname}-${version}"; @@ -34,36 +34,17 @@ in buildPythonPackage rec { repo = "pytorch"; rev = "v${version}"; fetchSubmodules = true; - sha256 = "1k8fr97v5pf7rni5cr2pi21ixc3pdj3h3lkz28njbjbgkndh7mr3"; + sha256 = "12d5vqqaprk0igmih7fwa65ldmaawgijxl58h6dnw660wysc132j"; }; - patches = [ - (fetchpatch { - # make sure stdatomic.h is included when checking for ATOMIC_INT_LOCK_FREE - # Fixes this test failure: - # RuntimeError: refcounted file mapping not supported on your system at /tmp/nix-build-python3.6-pytorch-0.3.0.drv-0/source/torch/lib/TH/THAllocator.c:525 - url = "https://github.com/pytorch/pytorch/commit/502aaf39cf4a878f9e4f849e5f409573aa598aa9.patch"; - stripLen = 3; - extraPrefix = "torch/lib/"; - sha256 = "1miz4lhy3razjwcmhxqa4xmlcmhm65lqyin1czqczj8g16d3f62f"; - }) - ]; - - postPatch = '' - substituteInPlace test/run_test.sh --replace \ - "INIT_METHOD='file://'\$TEMP_DIR'/shared_init_file' \$PYCMD ./test_distributed.py" \ - "echo Skipped for Nix package" - ''; - preConfigure = lib.optionalString cudaSupport '' - export CC=${cudatoolkit.cc}/bin/gcc + export CC=${cudatoolkit.cc}/bin/gcc CXX=${cudatoolkit.cc}/bin/g++ '' + lib.optionalString (cudaSupport && cudnn != null) '' export CUDNN_INCLUDE_DIR=${cudnn}/include ''; buildInputs = [ cmake - git numpy.blas utillinux which @@ -73,10 +54,10 @@ in buildPythonPackage rec { cffi numpy pyyaml - ]; + ] ++ lib.optional (pythonOlder "3.5") typing; checkPhase = '' - ${cudaStubEnv}${stdenv.shell} test/run_test.sh + ${cudaStubEnv}python test/run_test.py --exclude distributed ''; meta = { diff --git a/pkgs/development/r-modules/default.nix b/pkgs/development/r-modules/default.nix index 451fc1dc6fee..cbaea0f0d85e 100644 --- a/pkgs/development/r-modules/default.nix +++ b/pkgs/development/r-modules/default.nix @@ -757,7 +757,7 @@ let }); JuniperKernel = old.JuniperKernel.overrideDerivation (attrs: { - postPatch = '' + postPatch = lib.optionalString stdenv.isDarwin '' for file in {R,src}/*.R; do sed -i 's#system("which \(otool\|install_name_tool\)"[^)]*)#"${pkgs.darwin.cctools}/bin/\1"#g' $file done diff --git a/pkgs/development/tools/flatpak-builder/default.nix b/pkgs/development/tools/flatpak-builder/default.nix new file mode 100644 index 000000000000..351ec2c77dba --- /dev/null +++ b/pkgs/development/tools/flatpak-builder/default.nix @@ -0,0 +1,103 @@ +{ stdenv +, fetchurl +, substituteAll + +, autoreconfHook +, docbook_xml_dtd_412 +, docbook_xml_dtd_42 +, docbook_xml_dtd_43 +, docbook_xsl +, gettext +, libxml2 +, libxslt +, pkgconfig +, xmlto + +, acl +, bazaar +, binutils +, bzip2 +, coreutils +, cpio +, elfutils +, flatpak +, gitMinimal +, glib +, gnutar +, json_glib +, libcap +, libdwarf +, libsoup +, ostree +, patch +, rpm +, unzip +}: + +let + version = "0.10.10"; +in stdenv.mkDerivation rec { + name = "flatpak-builder-${version}"; + + outputs = [ "out" "doc" "man" ]; + + src = fetchurl { + url = "https://github.com/flatpak/flatpak-builder/releases/download/${version}/${name}.tar.xz"; + sha256 = "0b0c2rmf2vj596600blbhsiv2dg7qwpr33lgdcn0bnqc4ddri6f2"; + }; + + nativeBuildInputs = [ + autoreconfHook + docbook_xml_dtd_412 + docbook_xml_dtd_42 + docbook_xml_dtd_43 + docbook_xsl + gettext + libxml2 + libxslt + pkgconfig + xmlto + ]; + + buildInputs = [ + acl + bzip2 + elfutils + flatpak + glib + json_glib + libcap + libdwarf + libsoup + libxml2 + ostree + ]; + + patches = [ + # patch taken from gtk_doc + ./respect-xml-catalog-files-var.patch + (substituteAll { + src = ./fix-paths.patch; + bzr = "${bazaar}/bin/bzr"; + cp = "${coreutils}/bin/cp"; + patch = "${patch}/bin/patch"; + tar = "${gnutar}/bin/tar"; + unzip = "${unzip}/bin/unzip"; + rpm2cpio = "${rpm}/bin/rpm2cpio"; + cpio = "${cpio}/bin/cpio"; + git = "${gitMinimal}/bin/git"; + rofilesfuse = "${ostree}/bin/rofiles-fuse"; + strip = "${binutils}/bin/strip"; + eustrip = "${elfutils}/bin/eu-strip"; + euelfcompress = "${elfutils}/bin/eu-elfcompress"; + }) + ]; + + meta = with stdenv.lib; { + description = "Tool to build flatpaks from source"; + homepage = https://flatpak.org/; + license = licenses.lgpl21; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/tools/flatpak-builder/fix-paths.patch b/pkgs/development/tools/flatpak-builder/fix-paths.patch new file mode 100644 index 000000000000..001ddd645683 --- /dev/null +++ b/pkgs/development/tools/flatpak-builder/fix-paths.patch @@ -0,0 +1,116 @@ +--- a/src/builder-context.c ++++ b/src/builder-context.c +@@ -711,7 +711,7 @@ + g_autoptr(GFile) rofiles_base = NULL; + g_autoptr(GFile) rofiles_dir = NULL; + g_autofree char *tmpdir_name = NULL; +- char *argv[] = { "rofiles-fuse", ++ char *argv[] = { "@rofilesfuse@", + "-o", + "kernel_cache,entry_timeout=60,attr_timeout=60,splice_write,splice_move", + (char *)flatpak_file_get_path_cached (self->app_dir), +--- a/src/builder-git.c ++++ b/src/builder-git.c +@@ -44,7 +44,7 @@ + va_list ap; + + va_start (ap, error); +- res = flatpak_spawn (dir, output, flags, error, "git", ap); ++ res = flatpak_spawn (dir, output, flags, error, "@git@", ap); + va_end (ap); + + return res; +@@ -58,7 +58,7 @@ + va_list ap; + + va_start (ap, error); +- res = flatpak_spawn (NULL, NULL, 0, error, "cp", ap); ++ res = flatpak_spawn (NULL, NULL, 0, error, "@cp@", ap); + va_end (ap); + + return res; +--- a/src/builder-source-archive.c ++++ b/src/builder-source-archive.c +@@ -401,7 +401,7 @@ + va_list ap; + + va_start (ap, error); +- res = flatpak_spawn (dir, NULL, 0, error, "tar", ap); ++ res = flatpak_spawn (dir, NULL, 0, error, "@tar@", ap); + va_end (ap); + + return res; +@@ -416,7 +416,7 @@ + va_list ap; + + va_start (ap, error); +- res = flatpak_spawn (dir, NULL, 0, error, "unzip", ap); ++ res = flatpak_spawn (dir, NULL, 0, error, "@unzip@", ap); + va_end (ap); + + return res; +@@ -428,7 +428,7 @@ + GError **error) + { + gboolean res; +- const gchar *argv[] = { "sh", "-c", "rpm2cpio \"$1\" | cpio -i -d", ++ const gchar *argv[] = { "sh", "-c", "@rpm2cpio@ \"$1\" | @cpio@ -i -d", + "sh", /* shell's $0 */ + rpm_path, /* shell's $1 */ + NULL }; +--- a/src/builder-source-bzr.c ++++ b/src/builder-source-bzr.c +@@ -124,7 +124,7 @@ + va_list ap; + + va_start (ap, error); +- res = flatpak_spawn (dir, output, 0, error, "bzr", ap); ++ res = flatpak_spawn (dir, output, 0, error, "@bzr@", ap); + va_end (ap); + + return res; +--- a/src/builder-source-patch.c ++++ b/src/builder-source-patch.c +@@ -204,11 +204,11 @@ + + args = g_ptr_array_new (); + if (use_git) { +- g_ptr_array_add (args, "git"); ++ g_ptr_array_add (args, "@git@"); + g_ptr_array_add (args, "apply"); + g_ptr_array_add (args, "-v"); + } else { +- g_ptr_array_add (args, "patch"); ++ g_ptr_array_add (args, "@patch@"); + } + for (i = 0; extra_options != NULL && extra_options[i] != NULL; i++) + g_ptr_array_add (args, (gchar *) extra_options[i]); +--- a/src/builder-utils.c ++++ b/src/builder-utils.c +@@ -139,7 +139,7 @@ + va_list ap; + + va_start (ap, error); +- res = flatpak_spawn (NULL, NULL, 0, error, "strip", ap); ++ res = flatpak_spawn (NULL, NULL, 0, error, "@strip@", ap); + va_end (ap); + + return res; +@@ -153,7 +153,7 @@ + va_list ap; + + va_start (ap, error); +- res = flatpak_spawn (NULL, NULL, 0, error, "eu-strip", ap); ++ res = flatpak_spawn (NULL, NULL, 0, error, "@eustrip@", ap); + va_end (ap); + + return res; +@@ -167,7 +167,7 @@ + va_list ap; + + va_start (ap, error); +- res = flatpak_spawn (NULL, NULL, 0, error, "eu-elfcompress", ap); ++ res = flatpak_spawn (NULL, NULL, 0, error, "@euelfcompress@", ap); + va_end (ap); + + return res; diff --git a/pkgs/development/tools/flatpak-builder/respect-xml-catalog-files-var.patch b/pkgs/development/tools/flatpak-builder/respect-xml-catalog-files-var.patch new file mode 100644 index 000000000000..0e259aebd8a5 --- /dev/null +++ b/pkgs/development/tools/flatpak-builder/respect-xml-catalog-files-var.patch @@ -0,0 +1,13 @@ +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -40,8 +40,8 @@ + [ + AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl + AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog]) +- if $jh_found_xmlcatalog && \ +- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then ++ # empty argument forces libxml to use XML_CATALOG_FILES variable ++ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then + AC_MSG_RESULT([found]) + ifelse([$3],,,[$3 + ])dnl diff --git a/pkgs/development/tools/repository-managers/nexus/default.nix b/pkgs/development/tools/repository-managers/nexus/default.nix index 25dba0ac02f1..fb7a60070744 100644 --- a/pkgs/development/tools/repository-managers/nexus/default.nix +++ b/pkgs/development/tools/repository-managers/nexus/default.nix @@ -1,22 +1,22 @@ { stdenv, fetchurl, makeWrapper, jre, gawk }: + stdenv.mkDerivation rec { name = "nexus-${version}"; - version = "3.5.1-02"; + version = "3.11.0-01"; src = fetchurl { url = "https://sonatype-download.global.ssl.fastly.net/nexus/3/nexus-${version}-mac.tgz"; - sha256 = "5ef3512c2bbdd45ef35921c1a0ba109b45bd9dad88311750196aa689262258b6"; + sha256 = "1h5nfzb1sqhzb5j7w2dpmdi7vnnc9g6zx43a44f3zjvlxh1s0vim"; }; sourceRoot = name; nativeBuildInputs = [ makeWrapper ]; - patches = [ ./nexus-bin.patch ]; + patches = [ ./nexus-bin.patch ./nexus-vm-opts.patch ]; postPatch = '' substituteInPlace bin/nexus.vmoptions \ - --replace ../sonatype-work/nexus3 /run/sonatype-work/nexus3 \ --replace etc/karaf $out/etc/karaf \ --replace =. =$out ''; @@ -28,14 +28,12 @@ stdenv.mkDerivation rec { cp -rfv * .install4j $out rm -fv $out/bin/nexus.bat - runHook postInstall - ''; - - postInstall = '' wrapProgram $out/bin/nexus \ --set JAVA_HOME ${jre} \ --set ALTERNATIVE_NAME "nexus" \ --prefix PATH "${stdenv.lib.makeBinPath [ gawk ]}" + + runHook postInstall ''; meta = with stdenv.lib; { @@ -43,6 +41,6 @@ stdenv.mkDerivation rec { homepage = http://www.sonatype.org/nexus; license = licenses.epl10; platforms = platforms.all; - maintainers = with maintainers; [ aespinosa ironpinguin ]; + maintainers = with maintainers; [ aespinosa ironpinguin ma27 ]; }; } diff --git a/pkgs/development/tools/repository-managers/nexus/nexus-vm-opts.patch b/pkgs/development/tools/repository-managers/nexus/nexus-vm-opts.patch new file mode 100644 index 000000000000..744b4b96a56b --- /dev/null +++ b/pkgs/development/tools/repository-managers/nexus/nexus-vm-opts.patch @@ -0,0 +1,14 @@ +diff --git a/bin/nexus b/bin/nexus +index e7ed3fb..8db766b 100755 +--- a/bin/nexus ++++ b/bin/nexus +@@ -440,7 +440,8 @@ add_class_path "$app_home/lib/boot/org.apache.karaf.diagnostic.boot-4.0.9.jar" + add_class_path "$app_home/lib/boot/org.apache.karaf.jaas.boot-4.0.9.jar" + + vmoptions_val="" +-read_vmoptions "$prg_dir/$progname.vmoptions" ++VM_OPTS=${VM_OPTS_FILE:-"$prg_dir/$progname.vmoptions"} ++read_vmoptions "$VM_OPTS" + INSTALL4J_ADD_VM_PARAMS="$INSTALL4J_ADD_VM_PARAMS $vmoptions_val" + + |