diff --git a/lib/sources.nix b/lib/sources.nix index 0ffadea8f1b..c4680087b24 100644 --- a/lib/sources.nix +++ b/lib/sources.nix @@ -53,12 +53,16 @@ rec { # Filter sources by a list of regular expressions. # # E.g. `src = sourceByRegex ./my-subproject [".*\.py$" "^database.sql$"]` - sourceByRegex = src: regexes: cleanSourceWith { - filter = (path: type: - let relPath = lib.removePrefix (toString src + "/") (toString path); - in lib.any (re: builtins.match re relPath != null) regexes); - inherit src; - }; + sourceByRegex = src: regexes: + let + isFiltered = src ? _isLibCleanSourceWith; + origSrc = if isFiltered then src.origSrc else src; + in lib.cleanSourceWith { + filter = (path: type: + let relPath = lib.removePrefix (toString origSrc + "/") (toString path); + in lib.any (re: builtins.match re relPath != null) regexes); + inherit src; + }; # Get all files ending with the specified suffices from the given # directory or its descendants. E.g. `sourceFilesBySuffices ./dir diff --git a/nixos/doc/manual/configuration/matrix.xml b/nixos/doc/manual/configuration/matrix.xml index 40dd1406bb6..ef8d5cbda88 100644 --- a/nixos/doc/manual/configuration/matrix.xml +++ b/nixos/doc/manual/configuration/matrix.xml @@ -95,7 +95,7 @@ in { # forward all Matrix API calls to the synapse Matrix homeserver locations."/_matrix" = { - proxyPass = "http://[::1]:8008/_matrix"; + proxyPass = "http://[::1]:8008"; # without a trailing / }; }; }; diff --git a/pkgs/applications/misc/kitty/default.nix b/pkgs/applications/misc/kitty/default.nix index 63e77ec0e67..0be9bc82187 100644 --- a/pkgs/applications/misc/kitty/default.nix +++ b/pkgs/applications/misc/kitty/default.nix @@ -1,6 +1,6 @@ { stdenv, substituteAll, fetchFromGitHub, python3Packages, glfw, libunistring, harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel, - libstartup_notification, libX11, libXrandr, libXinerama, libXcursor, + libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor, libxkbcommon, libXi, libXext, wayland-protocols, wayland, which, dbus, Cocoa, @@ -57,6 +57,8 @@ buildPythonApplication rec { optipng ]; + propagatedBuildInputs = stdenv.lib.optional stdenv.isLinux libGL; + outputs = [ "out" "terminfo" ]; patches = [ @@ -70,6 +72,10 @@ buildPythonApplication rec { ./png2icns.patch ]; + preConfigure = stdenv.lib.optional (!stdenv.isDarwin) '' + substituteInPlace glfw/egl_context.c --replace "libEGL.so.1" "${stdenv.lib.getLib libGL}/lib/libEGL.so.1" + ''; + buildPhase = if stdenv.isDarwin then '' make app '' else '' diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix index 4e19b244f3c..72725f9818c 100644 --- a/pkgs/build-support/build-bazel-package/default.nix +++ b/pkgs/build-support/build-bazel-package/default.nix @@ -1,4 +1,8 @@ -{ stdenv, bazel, cacert }: +{ stdenv +, bazel +, cacert +, lib +}: args@{ name, bazelFlags ? [], bazelTarget, buildAttrs, fetchAttrs, ... }: @@ -109,6 +113,31 @@ in stdenv.mkDerivation (fBuildAttrs // { buildPhase = fBuildAttrs.buildPhase or '' runHook preBuild + '' + lib.optionalString stdenv.isDarwin '' + # Bazel sandboxes the execution of the tools it invokes, so even though we are + # calling the correct nix wrappers, the values of the environment variables + # the wrappers are expecting will not be set. So instead of relying on the + # wrappers picking them up, pass them in explicitly via `--copt`, `--linkopt` + # and related flags. + # + copts=() + host_copts=() + for flag in $NIX_CFLAGS_COMPILE; do + copts+=( "--copt=$flag" ) + host_copts+=( "--host_copt=$flag" ) + done + for flag in $NIX_CXXSTDLIB_COMPILE; do + copts+=( "--copt=$flag" ) + host_copts+=( "--host_copt=$flag" ) + done + linkopts=() + host_linkopts=() + for flag in $NIX_LD_FLAGS; do + linkopts+=( "--linkopt=$flag" ) + host_linkopts+=( "--host_linkopt=$flag" ) + done + '' + '' + BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \ USER=homeless-shelter \ bazel \ @@ -116,6 +145,12 @@ in stdenv.mkDerivation (fBuildAttrs // { --output_user_root="$bazelUserRoot" \ build \ -j $NIX_BUILD_CORES \ + '' + lib.optionalString stdenv.isDarwin '' + "''${copts[@]}" \ + "''${host_copts[@]}" \ + "''${linkopts[@]}" \ + "''${host_linkopts[@]}" \ + '' + '' $bazelFlags \ $bazelTarget diff --git a/pkgs/development/libraries/gstreamer/bad/default.nix b/pkgs/development/libraries/gstreamer/bad/default.nix index ba59a251437..2ae0ad2b453 100644 --- a/pkgs/development/libraries/gstreamer/bad/default.nix +++ b/pkgs/development/libraries/gstreamer/bad/default.nix @@ -2,6 +2,7 @@ , config , pkgconfig, python3, gst-plugins-base, orc , gobject-introspection +, enableZbar ? true , faacSupport ? false, faac ? null , faad2, libass, libkate, libmms, librdf, ladspaH , libnice, webrtc-audio-processing, lilv, lv2, serd, sord, sratom @@ -136,13 +137,13 @@ stdenv.mkDerivation rec { soundtouch spandsp srtp - zbar fluidsynth libvdpau libwebp xvidcore gnutls libGLU_combined libgme openssl x265 libxml2 libintl srt ] + ++ optional enableZbar zbar ++ optional faacSupport faac ++ optional stdenv.isLinux wayland # wildmidi requires apple's OpenAL @@ -158,6 +159,7 @@ stdenv.mkDerivation rec { "-Dexamples=disabled" # requires many dependencies and probably not useful for our users "-Ddts=disabled" # required `libdca` library not packaged in nixpkgs as of writing, and marked as "BIG FAT WARNING: libdca is still in early development" + "-Dzbar=${if enableZbar then "enabled" else "disabled"}" "-Dfaac=${if faacSupport then "enabled" else "disabled"}" "-Diqa=disabled" # required `dssim` library not packaging in nixpkgs as of writing "-Dmsdk=disabled" # not packaged in nixpkgs as of writing / no Windows support diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix index 074e4e29d51..94b745794f1 100644 --- a/pkgs/development/libraries/gtk+/3.x.nix +++ b/pkgs/development/libraries/gtk+/3.x.nix @@ -154,17 +154,13 @@ stdenv.mkDerivation rec { done ''; - # Make all demo related things in dev - postFixup = '' - moveToOutput share/icons/hicolor "$dev" - moveToOutput share/applications "$dev" - moveToOutput share/gsettings-schemas "$dev" - + # Wrap demos + postFixup = optionalString (!stdenv.isDarwin) '' demos=(gtk3-demo gtk3-demo-application gtk3-icon-browser gtk3-widget-factory) for program in ''${demos[@]}; do wrapProgram $dev/bin/$program \ - --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$dev/share/gsettings-schemas/${pname}-${version}" + --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${pname}-${version}" done ''; diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix index bd6441eeb0e..05ecf0f8f25 100644 --- a/pkgs/development/libraries/rocksdb/default.nix +++ b/pkgs/development/libraries/rocksdb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, lib, bzip2, cmake, gflags, lz4, snappy, zlib, zstd, enableLite ? false }: +{ stdenv, fetchFromGitHub, lib, bzip2, cmake, lz4, snappy, zlib, zstd, enableLite ? false }: stdenv.mkDerivation rec { pname = "rocksdb"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ cmake ]; - buildInputs = [ bzip2 gflags lz4 snappy zlib zstd ]; + buildInputs = [ bzip2 lz4 snappy zlib zstd ]; patches = [ ./0001-findzlib.patch ]; @@ -27,6 +27,7 @@ stdenv.mkDerivation rec { "-DWITH_SNAPPY=1" "-DWITH_ZLIB=1" "-DWITH_ZSTD=1" + "-DWITH_GFLAGS=0" (lib.optional (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") diff --git a/pkgs/development/libraries/zeromq/4.x.nix b/pkgs/development/libraries/zeromq/4.x.nix index 1d56742ba1c..8a89d2ae1c7 100644 --- a/pkgs/development/libraries/zeromq/4.x.nix +++ b/pkgs/development/libraries/zeromq/4.x.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, asciidoc }: +{ stdenv, fetchFromGitHub, cmake, asciidoc, enableDrafts ? false }: stdenv.mkDerivation rec { name = "zeromq-${version}"; @@ -17,6 +17,8 @@ stdenv.mkDerivation rec { doCheck = false; # fails all the tests (ctest) + cmakeFlags = if enableDrafts then [ "-DENABLE_DRAFTS=ON" ] else null; + meta = with stdenv.lib; { branch = "4"; homepage = http://www.zeromq.org; diff --git a/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh b/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh index 65fb6e615f5..9836bbe5642 100755 --- a/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh +++ b/pkgs/development/lisp-modules/clwrapper/cl-wrapper.sh @@ -8,7 +8,12 @@ eval "$NIX_LISP_PREHOOK" NIX_LISP_COMMAND="$1" shift -[ -z "$NIX_LISP" ] && NIX_LISP="${NIX_LISP_COMMAND##*/}" +if [ -z "$NIX_LISP" ]; then + while [ -h "${NIX_LISP_COMMAND}" ]; do + NIX_LISP_COMMAND="$(readlink -n "${NIX_LISP_COMMAND}")" + done + NIX_LISP="${NIX_LISP_COMMAND##*/}" +fi export NIX_LISP NIX_LISP_LOAD_FILE NIX_LISP_EXEC_CODE NIX_LISP_COMMAND NIX_LISP_FINAL_PARAMETERS @@ -116,8 +121,10 @@ nix_lisp_build_system(){ eval "$NIX_LISP_PRELAUNCH_HOOK" -[ -z "$NIX_LISP_SKIP_CODE" ] && "$NIX_LISP_COMMAND" $NIX_LISP_EARLY_OPTIONS \ - $NIX_LISP_EXEC_CODE "${NIX_LISP_ASDF_LOAD:-"(load \"$NIX_LISP_ASDF/lib/common-lisp/asdf/build/asdf.$NIX_LISP_FASL_TYPE\")"}" \ - $NIX_LISP_EXEC_CODE "$NIX_LISP_ASDF_REGISTRY_CODE" \ - ${NIX_LISP_FINAL_PARAMETERS[*]:+"${NIX_LISP_FINAL_PARAMETERS[@]}"} \ - "$@" +if [ -z "$NIX_LISP_SKIP_CODE" ]; then + "$NIX_LISP_COMMAND" $NIX_LISP_EARLY_OPTIONS \ + $NIX_LISP_EXEC_CODE "${NIX_LISP_ASDF_LOAD:-"(load \"$NIX_LISP_ASDF/lib/common-lisp/asdf/build/asdf.$NIX_LISP_FASL_TYPE\")"}" \ + $NIX_LISP_EXEC_CODE "$NIX_LISP_ASDF_REGISTRY_CODE" \ + ${NIX_LISP_FINAL_PARAMETERS[*]:+"${NIX_LISP_FINAL_PARAMETERS[@]}"} \ + "$@" +fi diff --git a/pkgs/development/python-modules/capturer/default.nix b/pkgs/development/python-modules/capturer/default.nix new file mode 100644 index 00000000000..86062d28a85 --- /dev/null +++ b/pkgs/development/python-modules/capturer/default.nix @@ -0,0 +1,27 @@ +{ lib, buildPythonPackage, fetchFromGitHub, humanfriendly, pytest, pytestcov }: + +buildPythonPackage rec { + pname = "capturer"; + version = "2.4"; + + src = fetchFromGitHub { + owner = "xolox"; + repo = "python-capturer"; + rev = version; + sha256 = "07zy264xd0g7pz9sxjqcpwmrck334xcbb7wfss26lmvgdr5nhcb9"; + }; + + propagatedBuildInputs = [ humanfriendly ]; + + checkPhase = '' + PATH=$PATH:$out/bin pytest . + ''; + checkInputs = [ pytest ]; + + meta = with lib; { + description = "Easily capture stdout/stderr of the current process and subprocesses"; + homepage = https://github.com/xolox/python-capturer; + license = licenses.mit; + maintainers = with maintainers; [ eyjhb ]; + }; +} diff --git a/pkgs/development/python-modules/coloredlogs/default.nix b/pkgs/development/python-modules/coloredlogs/default.nix new file mode 100644 index 00000000000..48eb4520b16 --- /dev/null +++ b/pkgs/development/python-modules/coloredlogs/default.nix @@ -0,0 +1,34 @@ +{ lib, buildPythonPackage, fetchFromGitHub, stdenv, isPy3k, fetchpatch, humanfriendly, verboselogs, capturer, pytest, mock, utillinux }: + +buildPythonPackage rec { + pname = "coloredlogs"; + version = "10.0"; + + src = fetchFromGitHub { + owner = "xolox"; + repo = "python-coloredlogs"; + rev = version; + sha256 = "0rdvp4dfvzhx7z7s2jdl3fv7x1hazgpy5gc7bcf05bnbv2iia54a"; + }; + + # patch by risicle + patches = lib.optional (stdenv.isDarwin && isPy3k) (fetchpatch { + name = "darwin-py3-capture-fix.patch"; + url = "https://github.com/xolox/python-coloredlogs/pull/74.patch"; + sha256 = "0pk7k94iz0gdripw623vzdl4hd83vwhsfzshl8pbvh1n6swi0xx9"; + }); + + checkPhase = '' + PATH=$PATH:$out/bin pytest . -k "not test_plain_text_output_format" + ''; + checkInputs = [ pytest mock utillinux ]; + + propagatedBuildInputs = [ humanfriendly verboselogs capturer ]; + + meta = with lib; { + description = "Colored stream handler for Python's logging module"; + homepage = https://github.com/xolox/python-coloredlogs; + license = licenses.mit; + maintainers = with maintainers; [ eyjhb ]; + }; +} diff --git a/pkgs/development/python-modules/dm-sonnet/default.nix b/pkgs/development/python-modules/dm-sonnet/default.nix index c10dafdabc6..ed6bff96d73 100644 --- a/pkgs/development/python-modules/dm-sonnet/default.nix +++ b/pkgs/development/python-modules/dm-sonnet/default.nix @@ -36,7 +36,7 @@ let bazelTarget = ":install"; fetchAttrs = { - sha256 = "0f2rlzrlazmgjrsin8vq3jfv431cc8sx8lxsr6x4wgd4jx5d1zzy"; + sha256 = "141k2caj5hlk31gnqryp6w2mzyz4i5s1rf8f3qr18isxy235k3w6"; }; bazelFlags = [ diff --git a/pkgs/development/python-modules/executor/default.nix b/pkgs/development/python-modules/executor/default.nix new file mode 100644 index 00000000000..8c71d63ef5c --- /dev/null +++ b/pkgs/development/python-modules/executor/default.nix @@ -0,0 +1,31 @@ +{ lib, buildPythonPackage, fetchFromGitHub, coloredlogs, property-manager, fasteners, pytest, mock, virtualenv }: + +buildPythonPackage rec { + pname = "executor"; + version = "21.3"; + + src = fetchFromGitHub { + owner = "xolox"; + repo = "python-executor"; + rev = version; + sha256 = "0rc14vjx3d6irfaw0pczzw1pn0xjl7xikv32hc1fvxv2ibnldv5d"; + }; + + propagatedBuildInputs = [ coloredlogs property-manager fasteners ]; + + checkInputs = [ pytest mock virtualenv ]; + + # ignore impure tests + checkPhase = '' + pytest . -k "not option and not retry \ + and not remote and not ssh \ + and not foreach and not local_context" + ''; + + meta = with lib; { + description = "Programmer friendly subprocess wrapper"; + homepage = https://github.com/xolox/python-executor; + license = licenses.mit; + maintainers = with maintainers; [ eyjhb ]; + }; +} diff --git a/pkgs/development/python-modules/google-api-python-client/default.nix b/pkgs/development/python-modules/google-api-python-client/default.nix index 1acc9603db3..60a6caace5e 100644 --- a/pkgs/development/python-modules/google-api-python-client/default.nix +++ b/pkgs/development/python-modules/google-api-python-client/default.nix @@ -3,11 +3,11 @@ buildPythonPackage rec { pname = "google-api-python-client"; - version = "1.7.9"; + version = "1.7.10"; src = fetchPypi { inherit pname version; - sha256 = "1v551xaavqff085gplinnnrz2sk6sikmm7j47gi0wf34hpba1384"; + sha256 = "1mlx5dvkh6rjkvkd91flyhrmji2kw9rlr05n8n4wccv2np3sam9f"; }; # No tests included in archive diff --git a/pkgs/development/python-modules/jsondiff/default.nix b/pkgs/development/python-modules/jsondiff/default.nix index fd31dc93fbf..6b254a7221a 100644 --- a/pkgs/development/python-modules/jsondiff/default.nix +++ b/pkgs/development/python-modules/jsondiff/default.nix @@ -5,13 +5,17 @@ buildPythonPackage rec { pname = "jsondiff"; - version = "1.1.2"; + version = "1.2.0"; src = fetchPypi { inherit pname version; - sha256 = "7e18138aecaa4a8f3b7ac7525b8466234e6378dd6cae702b982c9ed851d2ae21"; + sha256 = "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"; }; + postPatch = '' + sed -e "/'jsondiff=jsondiff.cli:main_deprecated',/d" -i setup.py + ''; + # No tests doCheck = false; @@ -20,5 +24,4 @@ buildPythonPackage rec { homepage = https://github.com/ZoomerAnalytics/jsondiff; license = lib.licenses.mit; }; - -} \ No newline at end of file +} diff --git a/pkgs/development/python-modules/mkl-service/default.nix b/pkgs/development/python-modules/mkl-service/default.nix new file mode 100644 index 00000000000..ad3f30a66da --- /dev/null +++ b/pkgs/development/python-modules/mkl-service/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub, cython, mkl, nose, six }: + +buildPythonPackage rec { + pname = "mkl-service"; + version = "2.1.0"; + + src = fetchFromGitHub { + owner = "IntelPython"; + repo = "mkl-service"; + rev = "v${version}"; + sha256 = "1bnpgx629rxqf0yhn0jn68ypj3dqv6njc3981j1g8j8rsm5lycrn"; + }; + + MKLROOT = mkl; + + checkInputs = [ nose ]; + nativeBuildInputs = [ cython ]; + propagatedBuildInputs = [ mkl six ]; + + meta = with lib; { + description = "Python hooks for Intel(R) Math Kernel Library runtime control settings"; + homepage = "https://github.com/IntelPython/mkl-service"; + license = licenses.bsd3; + maintainers = with maintainers; [ bhipple ]; + }; +} diff --git a/pkgs/development/python-modules/naturalsort/default.nix b/pkgs/development/python-modules/naturalsort/default.nix new file mode 100644 index 00000000000..f7dcbe4d827 --- /dev/null +++ b/pkgs/development/python-modules/naturalsort/default.nix @@ -0,0 +1,20 @@ +{ lib, buildPythonPackage, fetchFromGitHub }: + +buildPythonPackage rec { + pname = "naturalsort"; + version = "1.5.1"; + + src = fetchFromGitHub { + owner = "xolox"; + repo = "python-naturalsort"; + rev = version; + sha256 = "0w43vlddzh97hffnvxp2zkrns9qyirx5g8ijxnxkbx1c4b4gq5ih"; + }; + + meta = with lib; { + description = "Simple natural order sorting API for Python that just works"; + homepage = https://github.com/xolox/python-naturalsort; + license = licenses.mit; + maintainers = with maintainers; [ eyjhb ]; + }; +} diff --git a/pkgs/development/python-modules/property-manager/default.nix b/pkgs/development/python-modules/property-manager/default.nix new file mode 100644 index 00000000000..30c720927e7 --- /dev/null +++ b/pkgs/development/python-modules/property-manager/default.nix @@ -0,0 +1,23 @@ +{ lib, buildPythonPackage, fetchFromGitHub, humanfriendly, verboselogs, coloredlogs, pytest, pytestcov }: + +buildPythonPackage rec { + pname = "property-manager"; + version = "2.3.1"; + + src = fetchFromGitHub { + owner = "xolox"; + repo = "python-property-manager"; + rev = version; + sha256 = "0s4nwipxd8c2vp4rd8mxrj8wbycniz5ki5n177d0dbrnll5amcz0"; + }; + + propagatedBuildInputs = [ coloredlogs humanfriendly verboselogs ]; + checkInputs = [ pytest pytestcov ]; + + meta = with lib; { + description = "Useful property variants for Python programming"; + homepage = https://github.com/xolox/python-property-manager; + license = licenses.mit; + maintainers = with maintainers; [ eyjhb ]; + }; +} diff --git a/pkgs/development/python-modules/update-dotdee/default.nix b/pkgs/development/python-modules/update-dotdee/default.nix new file mode 100644 index 00000000000..b537ca8c264 --- /dev/null +++ b/pkgs/development/python-modules/update-dotdee/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchFromGitHub, executor, naturalsort }: + +buildPythonPackage rec { + pname = "update-dotdee"; + version = "5.0"; + + src = fetchFromGitHub { + owner = "xolox"; + repo = "python-update-dotdee"; + rev = version; + sha256 = "1h3m593nwzx6vwa24k0wizb7la49yhqxwn73ipclxgxxi4dfdj01"; + }; + + propagatedBuildInputs = [ executor naturalsort ]; + + meta = with lib; { + description = "Generic modularized configuration file manager"; + homepage = https://github.com/xolox/python-update-dotdee; + license = licenses.mit; + maintainers = with maintainers; [ eyjhb ]; + }; +} diff --git a/pkgs/development/python-modules/verboselogs/default.nix b/pkgs/development/python-modules/verboselogs/default.nix new file mode 100644 index 00000000000..f4c78858913 --- /dev/null +++ b/pkgs/development/python-modules/verboselogs/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchFromGitHub, pytest, mock }: + +buildPythonPackage rec { + pname = "verboselogs"; + version = "1.7"; + + src = fetchFromGitHub { + owner = "xolox"; + repo = "python-verboselogs"; + rev = version; + sha256 = "10jzm8pkl49as4y2zyiidmfqqj5zmqg3p73jvx4lfxi0gmp1vhl5"; + }; + + # do not run pylint plugin test, as astroid is a old unsupported version + checkPhase = '' + PATH=$PATH:$out/bin pytest . -k "not test_pylint_plugin" + ''; + checkInputs = [ pytest mock ]; + + meta = with lib; { + description = "Verbose logging for Python's logging module"; + homepage = https://github.com/xolox/python-verboselogs; + license = licenses.mit; + maintainers = with maintainers; [ eyjhb ]; + }; +} diff --git a/pkgs/development/tools/build-managers/bazel/bazel-deps/default.nix b/pkgs/development/tools/build-managers/bazel/bazel-deps/default.nix index 6fdb5734507..62a1329eca6 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel-deps/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel-deps/default.nix @@ -2,7 +2,7 @@ buildBazelPackage rec { name = "bazel-deps-${version}"; - version = "2019-02-01"; + version = "2019-07-11"; meta = with stdenv.lib; { homepage = "https://github.com/johnynek/bazel-deps"; @@ -10,13 +10,14 @@ buildBazelPackage rec { license = licenses.mit; maintainers = [ maintainers.uri-canva ]; platforms = platforms.all; + broken = true; # global variable '_common_attrs_for_plugin_bootstrapping' is referenced before assignment. }; src = fetchFromGitHub { owner = "johnynek"; repo = "bazel-deps"; - rev = "6585033409e09028852403ec15ec0c77851234be"; - sha256 = "0hypf7mcbpx2djqm92k82vn1k6pbnv564xbnazx8nw60f6ns0x87"; + rev = "48fdf7f8bcf3aadfa07f9f7e6f0c9f4247cb0f58"; + sha256 = "0wpn5anfgq5wfljfhpn8gbgdmgcp0claffjgqcnv5dh70ch7i0gi"; }; bazelTarget = "//src/scala/com/github/johnynek/bazel_deps:parseproject_deploy.jar"; @@ -24,49 +25,7 @@ buildBazelPackage rec { buildInputs = [ git makeWrapper ]; fetchAttrs = { - preInstall = '' - # Remove all built in external workspaces, Bazel will recreate them when building - rm -rf $bazelOut/external/{bazel_tools,\@bazel_tools.marker,embedded_jdk,\@embedded_jdk.marker,local_*,\@local_*} - # For each external workspace, remove all files that aren't referenced by Bazel - # Many of these files are non-hermetic (for example .git/refs/remotes/origin/HEAD) - files_to_delete=() - for workspace in $(find $bazelOut/external -maxdepth 2 -name "WORKSPACE" -print0 | xargs -0L1 dirname); do - workspaceOut="$NIX_BUILD_TOP/workspaces/$(basename workspace)/output" - workspaceUserRoot="$NIX_BUILD_TOP/workspaces/$(basename workspace)/tmp" - rm -rf $workspace/.git - if ! targets_and_files=$(cd "$workspace" && bazel --output_base="$workspaceOut" --output_user_root="$workspaceUserRoot" query '//...:*' 2> /dev/null | sort -u); then - continue - fi - if ! targets=$(cd "$workspace" && bazel --output_base="$workspaceOut" --output_user_root="$workspaceUserRoot" query '//...:all' 2> /dev/null | sort -u); then - continue - fi - mapfile -t referenced_files < <(comm -23 <(printf '%s' "$targets_and_files") <(printf '%s' "$targets") | sed -e 's,^//:,,g' | sed -e 's,^//,,g' | sed -e 's,:,/,g') - referenced_files+=( "WORKSPACE" ) - for referenced_file in "''${referenced_files[@]}"; do - # Some of the referenced files are symlinks to non-referenced files. - # The symlink targets have deterministic contents, but non-deterministic - # paths. Copy them to the referenced path, which is deterministic. - if target=$(readlink "$workspace/$referenced_file"); then - rm "$workspace/$referenced_file" - cp -a "$target" "$workspace/$referenced_file" - fi - done - mapfile -t workspace_files_to_delete < <(find "$workspace" -type f -or -type l | sort -u | comm -23 - <(printf "$workspace/%s\n" "''${referenced_files[@]}" | sort -u)) - for workspace_file_to_delete in "''${workspace_files_to_delete[@]}"; do - files_to_delete+=("$workspace_file_to_delete") - done - # We're running bazel in many different workspaces in a loop. Letting the - # daemon shut down on its own would leave several daemons alive at the - # same time, using up a lot of memory. Shut them down explicitly instead. - bazel --output_base="$workspaceOut" --output_user_root="$workspaceUserRoot" shutdown 2> /dev/null - done - for file_to_delete in "''${files_to_delete[@]}"; do - rm "$file_to_delete" - done - find . -type d -empty -delete - ''; - - sha256 = "1yirrzhhrsmbgd27fg709plhrhyi8pzwqv84yg72sd3799kswh9m"; + sha256 = "1r5qxsbw2cgww7vcg5psh7404l3jcxpvc0ndgl3k8vj1x8y93nkf"; }; buildAttrs = { diff --git a/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix b/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix index 0d821fa6166..2eb5f772f89 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix @@ -76,5 +76,6 @@ buildBazelPackage rec { license = licenses.asl20; maintainers = [ maintainers.uri-canva ]; platforms = platforms.darwin; + broken = true; # global variable '_layer' is referenced before assignment. }; } diff --git a/pkgs/development/tools/build-managers/bazel/default.nix b/pkgs/development/tools/build-managers/bazel/default.nix index 1a383b76d5d..8c19c0021d1 100644 --- a/pkgs/development/tools/build-managers/bazel/default.nix +++ b/pkgs/development/tools/build-managers/bazel/default.nix @@ -1,4 +1,5 @@ -{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub, runCommand, runCommandCC, makeWrapper +{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub +, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs # this package (through the fixpoint glass) , bazel , lr, xe, zip, unzip, bash, writeCBin, coreutils @@ -11,6 +12,8 @@ , buildJdk, runJdk , buildJdkName , runtimeShell +# Downstream packages for tests +, bazel-watcher # Always assume all markers valid (don't redownload dependencies). # Also, don't clean up environment variables. , enableNixHacks ? false @@ -221,10 +224,22 @@ stdenv.mkDerivation rec { pythonBinPath = callPackage ./python-bin-path-test.nix { inherit runLocal bazelTest; }; bashToolsWithNixHacks = callPackage ./bash-tools-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; }; + cppWithNixHacks = callPackage ./cpp-test.nix { inherit runLocal bazelTest bazel-examples; bazel = bazelWithNixHacks; }; javaWithNixHacks = callPackage ./java-test.nix { inherit runLocal bazelTest bazel-examples; bazel = bazelWithNixHacks; }; protobufWithNixHacks = callPackage ./protobuf-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; }; pythonBinPathWithNixHacks = callPackage ./python-bin-path-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; }; + + # downstream packages using buildBazelPackage + # fixed-output hashes of the fetch phase need to be spot-checked manually + downstream = recurseIntoAttrs ({ + inherit bazel-watcher; + } + # dm-sonnet is only packaged for linux + // (lib.optionalAttrs stdenv.isLinux { + # TODO(timokau) dm-sonnet is broken currently + # dm-sonnet-linux = python3.pkgs.dm-sonnet; + })); }; # update the list of workspace dependencies diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix index 9c5d22ee07b..ce7b0871044 100644 --- a/pkgs/development/tools/build-managers/conan/default.nix +++ b/pkgs/development/tools/build-managers/conan/default.nix @@ -37,13 +37,7 @@ let newPython = python3.override { sha256 = "c0abe3218b86533cca287e7057a37481883c07acef7814b70583406938214cc8"; }; }); - pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec { - version = "3.13"; - src = oldAttrs.src.override { - inherit version; - sha256 = "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf"; - }; - }); + pyyaml = super.pyyaml_3; }; }; diff --git a/pkgs/misc/emulators/wine/base.nix b/pkgs/misc/emulators/wine/base.nix index 8edf7ad3959..01d09659915 100644 --- a/pkgs/misc/emulators/wine/base.nix +++ b/pkgs/misc/emulators/wine/base.nix @@ -46,7 +46,9 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) { ++ lib.optional udevSupport pkgs.udev ++ lib.optional vulkanSupport pkgs.vulkan-loader ++ lib.optional sdlSupport pkgs.SDL2 - ++ lib.optionals gstreamerSupport (with pkgs.gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav ]) + ++ lib.optionals gstreamerSupport (with pkgs.gst_all_1; + [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-libav + (gst-plugins-bad.override { enableZbar = false; }) ]) ++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.glib ] ++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ] ++ lib.optionals xmlSupport [ pkgs.libxml2 pkgs.libxslt ] diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix index 6c85f9a6329..8d885cbf516 100644 --- a/pkgs/misc/tmux-plugins/default.nix +++ b/pkgs/misc/tmux-plugins/default.nix @@ -1,4 +1,5 @@ { fetchgit +, fetchFromGitHub , lib , pkgs , reattach-to-user-namespace @@ -90,6 +91,15 @@ in rec { }; }; + ctrlw = mkDerivation { + pluginName = "ctrlw"; + src = fetchgit { + url = "https://github.com/eraserhd/tmux-ctrlw"; + rev = "2354b5d56828813d0f7a4b228ca74b6134c2695f"; + sha256 = "00hy1axmki8h2285mivsj923z327xkq89wfl2x4dxc71xjhdl216"; + }; + }; + fpp = mkDerivation { pluginName = "fpp"; src = fetchgit { @@ -215,6 +225,16 @@ in rec { }; }; + tmux-colors-solarized = mkDerivation { + pluginName = "tmuxcolors"; + src = fetchFromGitHub { + owner = "seebi"; + repo = "tmux-colors-solarized"; + rev = "e5e7b4f1af37f8f3fc81ca17eadee5ae5d82cd09"; + sha256 = "1l3i82abzi4b395cgdsjg7lcfaq15kyyhijwvrgchzxi95z3hl4x"; + }; + }; + urlview = mkDerivation { pluginName = "urlview"; src = fetchgit { diff --git a/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch b/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch index 2caf52f3c0a..9beeab0f954 100644 --- a/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch +++ b/pkgs/os-specific/linux/checksec/0001-attempt-to-modprobe-config-before-checking-kernel.patch @@ -8,20 +8,21 @@ Signed-off-by: Austin Seipp checksec.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/checksec.sh b/checksec.sh +diff --git a/checksec b/checksec index dd1f72e..63acc29 100644 ---- a/checksec.sh -+++ b/checksec.sh -@@ -337,7 +337,8 @@ kernelcheck() { - printf " userspace processes, this option lists the status of kernel configuration\n" - printf " options that harden the kernel itself against attack.\n\n" - printf " Kernel config: " -- +--- a/checksec ++++ b/checksec +@@ -676,7 +676,8 @@ kernelcheck() { + echo_message " userspace processes, this option lists the status of kernel configuration\n" '' '' '' + echo_message " options that harden the kernel itself against attack.\n\n" '' '' '' + echo_message " Kernel config:\n" '' '' '{ "kernel": ' +- + + modprobe configs 2> /dev/null - if [ -f /proc/config.gz ] ; then - kconfig="zcat /proc/config.gz" - printf "\033[32m/proc/config.gz\033[m\n\n" + if [[ ! "${1}" == "" ]] ; then + kconfig="cat ${1}" + echo_message " Warning: The config ${1} on disk may not represent running kernel config!\n\n" "${1}" "