diff --git a/nixos/doc/manual/release-notes/rl-2105.xml b/nixos/doc/manual/release-notes/rl-2105.xml index 566cd5d7240..0666b4300ec 100644 --- a/nixos/doc/manual/release-notes/rl-2105.xml +++ b/nixos/doc/manual/release-notes/rl-2105.xml @@ -754,6 +754,40 @@ self: super: once during the time when the timer was inactive. + + + The rustPlatform.buildRustPackage function is split into several hooks: + cargoSetupHook to set up vendoring for Cargo-based projects, + cargoBuildHook to build a project using Cargo, + cargoInstallHook to install a project using Cargo, and + cargoCheckHook to run tests in Cargo-based projects. With this change, + mixed-language projects can use the relevant hooks within builders other than + buildRustPackage. However, these changes also required several API changes to + buildRustPackage itself: + + + + + The target argument was removed. Instead, buildRustPackage + will always use the same target as the C/C++ compiler that is used. + + + + + The cargoParallelTestThreads argument was removed. Parallel tests are + now disabled through dontUseCargoParallelTests. + + + + + + + + The rustPlatform.maturinBuildHook hook was added. This hook can be used + with buildPythonPackage to build Python packages that are written in Rust + and use Maturin as their build tool. + + diff --git a/nixos/lib/qemu-flags.nix b/nixos/lib/qemu-flags.nix index 0f066245893..f786745ba32 100644 --- a/nixos/lib/qemu-flags.nix +++ b/nixos/lib/qemu-flags.nix @@ -18,13 +18,15 @@ rec { ]; qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0" - else if pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64 then "ttyAMA0" + else if (with pkgs.stdenv.hostPlatform; isAarch32 || isAarch64 || isPower) then "ttyAMA0" else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'"; qemuBinary = qemuPkg: { x86_64-linux = "${qemuPkg}/bin/qemu-kvm -cpu max"; armv7l-linux = "${qemuPkg}/bin/qemu-system-arm -enable-kvm -machine virt -cpu host"; aarch64-linux = "${qemuPkg}/bin/qemu-system-aarch64 -enable-kvm -machine virt,gic-version=host -cpu host"; + powerpc64le-linux = "${qemuPkg}/bin/qemu-system-ppc64 -machine powernv"; + powerpc64-linux = "${qemuPkg}/bin/qemu-system-ppc64 -machine powernv"; x86_64-darwin = "${qemuPkg}/bin/qemu-kvm -cpu max"; }.${pkgs.stdenv.hostPlatform.system} or "${qemuPkg}/bin/qemu-kvm"; } diff --git a/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix b/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix index bb5776b65e3..4be867bb4b5 100644 --- a/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix +++ b/pkgs/applications/networking/instant-messengers/deltachat-electron/default.nix @@ -2,13 +2,13 @@ let pname = "deltachat-electron"; - version = "1.15.1"; + version = "1.15.2"; name = "${pname}-${version}"; src = fetchurl { url = "https://download.delta.chat/desktop/v${version}/DeltaChat-${version}.AppImage"; - sha256 = "sha256-lItI1aIFHYQ3wGRVn4Yw0nA7qgfhyHT/43kKbY/1cgI="; + sha256 = "sha256-iw2tU8qqXWbtEdLGlW8HNBHx8F2CgnCGCBUWpM407us="; }; appimageContents = appimageTools.extract { inherit name src; }; diff --git a/pkgs/development/libraries/aws-c-common/default.nix b/pkgs/development/libraries/aws-c-common/default.nix index 36315aa8678..39fb5d7eb21 100644 --- a/pkgs/development/libraries/aws-c-common/default.nix +++ b/pkgs/development/libraries/aws-c-common/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "aws-c-common"; - version = "0.4.64"; + version = "0.5.2"; src = fetchFromGitHub { owner = "awslabs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-izEZMOPHj/9EL78b/t3M0Tki6eA8eRrpG7DO2tkpf1A="; + sha256 = "0rd2qzaa9mmn5f6f2bl1wgv54f17pqx3vwyy9f8ylh59qfnilpmg"; }; patches = [ @@ -23,18 +23,19 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" + "-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests ]; NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-nullability-extension -Wno-typedef-redefinition"; + doCheck = true; + meta = with lib; { description = "AWS SDK for C common core"; homepage = "https://github.com/awslabs/aws-c-common"; license = licenses.asl20; platforms = platforms.unix; - maintainers = with maintainers; [ orivej eelco ]; - # https://github.com/awslabs/aws-c-common/issues/754 - broken = stdenv.hostPlatform.isMusl; + maintainers = with maintainers; [ orivej eelco r-burns ]; }; } diff --git a/pkgs/development/libraries/aws-c-io/default.nix b/pkgs/development/libraries/aws-c-io/default.nix index 373ea66a4b6..337149e6f8e 100644 --- a/pkgs/development/libraries/aws-c-io/default.nix +++ b/pkgs/development/libraries/aws-c-io/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "aws-c-io"; - version = "0.7.1"; + version = "0.9.1"; src = fetchFromGitHub { owner = "awslabs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-dDvq5clOUaPR7lOCJ/1g0lrCzVOmzwCnqHrBZfBewO4="; + sha256 = "0lx72p9xmmnjkz4zkfb1lz0ibw0jsy52qpydhvn56bq85nv44rwx"; }; nativeBuildInputs = [ cmake ]; diff --git a/pkgs/development/python-modules/diskcache/default.nix b/pkgs/development/python-modules/diskcache/default.nix index 8b968c3272f..ed6007f87ed 100644 --- a/pkgs/development/python-modules/diskcache/default.nix +++ b/pkgs/development/python-modules/diskcache/default.nix @@ -7,18 +7,17 @@ , pytest_xdist , pytest-django , mock -, django }: buildPythonPackage rec { pname = "diskcache"; - version = "5.1.0"; + version = "5.2.1"; src = fetchFromGitHub { owner = "grantjenks"; repo = "python-diskcache"; rev = "v${version}"; - sha256 = "0xwqw60dbn1x2294galcs08vm6ydcr677lr8slqz8a3ry6sgkhn9"; + sha256 = "sha256-dWtEyyWpg0rxEwyhBdPyApzgS9o60HVGbtY76ELHvX8="; }; checkInputs = [ @@ -31,6 +30,7 @@ buildPythonPackage rec { # Darwin sandbox causes most tests to fail. doCheck = !stdenv.isDarwin; + pythonImportsCheck = [ "diskcache" ]; meta = with lib; { description = "Disk and file backed persistent cache"; diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 63244618f5b..7fd551e192c 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , buildPythonPackage , fetchPypi , python @@ -8,37 +9,41 @@ , cython , dateutil , html5lib +, jinja2 , lxml , numexpr , openpyxl , pytz -, sqlalchemy , scipy +, sqlalchemy , tables , xlrd , xlwt -# Test Inputs +# Test inputs , glibcLocales , hypothesis , pytestCheckHook +, pytest-xdist +, pytest-asyncio +, XlsxWriter # Darwin inputs , runtimeShell -, libcxx ? null +, libcxx }: buildPythonPackage rec { pname = "pandas"; - version = "1.2.2"; + version = "1.2.3"; src = fetchPypi { inherit pname version; - sha256 = "14ed84b463e9b84c8ff9308a79b04bf591ae3122a376ee0f62c68a1bd917a773"; + sha256 = "078b4nncn6778ymmqn80j2q6n7fcs4d6bbaraar5nypgbaw10vyz"; }; - # See https://github.com/scipy/scipy/issues/13585 and https://github.com/pandas-dev/pandas/pull/40020 - patches = [ ./fix-tests.patch ]; nativeBuildInputs = [ cython ]; + buildInputs = lib.optional stdenv.isDarwin libcxx; + propagatedBuildInputs = [ beautifulsoup4 bottleneck @@ -55,58 +60,57 @@ buildPythonPackage rec { xlwt ]; - checkInputs = [ pytestCheckHook glibcLocales hypothesis ]; + checkInputs = [ + glibcLocales + hypothesis + jinja2 + pytest-asyncio + pytest-xdist + pytestCheckHook + XlsxWriter + ]; - # doesn't work with -Werror,-Wunused-command-line-argument + # Doesn't work with -Werror,-Wunused-command-line-argument # https://github.com/NixOS/nixpkgs/issues/39687 hardeningDisable = lib.optional stdenv.cc.isClang "strictoverflow"; - # Parallel Cythonization is broken in Python 3.8 on Darwin. Fixed in the next - # release. https://github.com/pandas-dev/pandas/pull/30862 - setupPyBuildFlags = lib.optionals (!(isPy38 && stdenv.isDarwin)) [ - # As suggested by - # https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#creating-a-python-environment - "--parallel=$NIX_BUILD_CORES" - ]; + # For OSX, we need to add a dependency on libcxx, which provides + # `complex.h` and other libraries that pandas depends on to build. + postPatch = lib.optionalString stdenv.isDarwin '' + cpp_sdk="${libcxx}/include/c++/v1"; + echo "Adding $cpp_sdk to the setup.py common_include variable" + substituteInPlace setup.py \ + --replace "['pandas/src/klib', 'pandas/src']" \ + "['pandas/src/klib', 'pandas/src', '$cpp_sdk']" + ''; doCheck = !stdenv.isAarch64; # upstream doesn't test this architecture pytestFlagsArray = [ "--skip-slow" "--skip-network" + "--numprocesses" "0" ]; + disabledTests = [ - # since dateutil 0.6.0 the following fails: test_fallback_plural, test_ambiguous_flags, test_ambiguous_compat - # was supposed to be solved by https://github.com/dateutil/dateutil/issues/321, but is not the case - "test_fallback_plural" - "test_ambiguous_flags" - "test_ambiguous_compat" # Locale-related "test_names" "test_dt_accessor_datetime_name_accessors" "test_datetime_name_accessors" - # Can't import from test folder - "test_oo_optimizable" # Disable IO related tests because IO data is no longer distributed "io" - # KeyError Timestamp - "test_to_excel" - # ordering logic has changed - "numpy_ufuncs_other" - "order_without_freq" - # tries to import from pandas.tests post install + # Tries to import from pandas.tests post install "util_in_top_level" - # Fails with 1.0.5 - "test_constructor_list_frames" - "test_constructor_with_embedded_frames" - # tries to import compiled C extension locally + # Tries to import compiled C extension locally "test_missing_required_dependency" + # AssertionError with 1.2.3 + "test_from_coo" ] ++ lib.optionals stdenv.isDarwin [ "test_locale" "test_clipboard" ]; - # tests have relative paths, and need to reference compiled C extensions + # Tests have relative paths, and need to reference compiled C extensions # so change directory where `import .test` is able to be resolved preCheck = '' cd $out/${python.sitePackages}/pandas @@ -123,6 +127,8 @@ buildPythonPackage rec { export PATH=$(pwd):$PATH ''; + pythonImportsCheck = [ "pandas" ]; + meta = with lib; { # https://github.com/pandas-dev/pandas/issues/14866 # pandas devs are no longer testing i686 so safer to assume it's broken diff --git a/pkgs/development/python-modules/pandas/fix-tests.patch b/pkgs/development/python-modules/pandas/fix-tests.patch deleted file mode 100644 index 8051cfec39a..00000000000 --- a/pkgs/development/python-modules/pandas/fix-tests.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --color -ur a/pandas/tests/arrays/sparse/test_array.py b/pandas/tests/arrays/sparse/test_array.py ---- a/pandas/tests/arrays/sparse/test_array.py 2020-12-07 12:42:08.000000000 +0100 -+++ b/pandas/tests/arrays/sparse/test_array.py 2021-02-27 21:48:16.483903149 +0100 -@@ -1188,7 +1188,7 @@ - row = [0, 3, 1, 0] - col = [0, 3, 1, 2] - data = [4, 5, 7, 9] -- sp_array = scipy.sparse.coo_matrix((data, (row, col))) -+ sp_array = scipy.sparse.coo_matrix((data, (row, col)), dtype="int") - result = pd.Series.sparse.from_coo(sp_array) - - index = pd.MultiIndex.from_arrays([[0, 0, 1, 3], [0, 2, 1, 3]]) diff --git a/pkgs/tools/misc/gtklp/default.nix b/pkgs/tools/misc/gtklp/default.nix new file mode 100644 index 00000000000..43f67b6b795 --- /dev/null +++ b/pkgs/tools/misc/gtklp/default.nix @@ -0,0 +1,52 @@ +{ stdenv, lib, fetchurl +, autoreconfHook, libtool, pkg-config +, gtk2, glib, cups, gettext, openssl +}: + +stdenv.mkDerivation rec { + pname = "gtklp"; + version = "1.3.4"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}-${version}.src.tar.gz"; + sha256 = "1arvnnvar22ipgnzqqq8xh0kkwyf71q2sfsf0crajpsr8a8601xy"; + }; + + nativeBuildInputs = [ + pkg-config + autoreconfHook + ]; + + buildInputs = [ + cups + gettext + glib + gtk2 + libtool + openssl + ]; + + patches = [ + ./patches/mdv-fix-str-fmt.patch + ./patches/autoconf.patch + ]; + + preConfigure = '' + substituteInPlace include/defaults.h --replace "netscape" "firefox" + substituteInPlace include/defaults.h --replace "http://localhost:631/sum.html#STANDARD_OPTIONS" \ + "http://localhost:631/help/" + ''; + + preInstall = '' + install -D -m0644 -t $out/share/doc AUTHORS BUGS ChangeLog README USAGE + ''; + + meta = with lib; { + description = "A graphical frontend for CUPS"; + homepage = "https://gtklp.sirtobi.com"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ caadar ]; + platforms = platforms.unix; + }; + +} diff --git a/pkgs/tools/misc/gtklp/patches/autoconf.patch b/pkgs/tools/misc/gtklp/patches/autoconf.patch new file mode 100644 index 00000000000..c1698bee1fd --- /dev/null +++ b/pkgs/tools/misc/gtklp/patches/autoconf.patch @@ -0,0 +1,23 @@ +Patch origin: http://sophie.zarb.org/rpms/68e90a72e0052022f558148d97c9ea2a/files/3 + +diff --git a/configure.ac b/configure.ac +index b7a30e9..3768ae9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -8,6 +8,7 @@ AC_CONFIG_HEADERS([config.h]) + + AC_CONFIG_MACRO_DIR([m4]) + AM_GNU_GETTEXT([external]) ++AM_GNU_GETTEXT_REQUIRE_VERSION([0.21]) + + dnl Extra params + CUPSCONFIGPATH="" +@@ -30,8 +31,6 @@ AC_SUBST(XLIBS) + + dnl Checks for header files + +-dnl internationalization macros +-AM_GNU_GETTEXT + + + # Forte Compiler ############################################################ diff --git a/pkgs/tools/misc/gtklp/patches/mdv-fix-str-fmt.patch b/pkgs/tools/misc/gtklp/patches/mdv-fix-str-fmt.patch new file mode 100644 index 00000000000..6cfc90beb02 --- /dev/null +++ b/pkgs/tools/misc/gtklp/patches/mdv-fix-str-fmt.patch @@ -0,0 +1,22 @@ +Patch source: http://sophie.zarb.org/rpms/68e90a72e0052022f558148d97c9ea2a/files/1 + +--- a/libgtklp/libgtklp.c 2020-08-25 17:31:52.427298559 +0100 ++++ b/libgtklp/libgtklp.c 2020-08-25 17:36:37.728154682 +0100 +@@ -939,7 +939,7 @@ + gtk_widget_show(pixmapwid); + + if (strlen(gerror2) == 0) +- snprintf(tmplabel, (size_t) MAXLINE, gerror1); ++ snprintf(tmplabel, (size_t) MAXLINE, "%s", gerror1); + else + snprintf(tmplabel, (size_t) MAXLINE, gerror1, gerror2); + label = gtk_label_new(tmplabel); +@@ -973,7 +973,7 @@ + #endif + } else { + if (strlen(gerror2) == 0) +- g_warning(gerror1); ++ g_warning("%s", gerror1); + else + g_warning(gerror1, gerror2); + } diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 50eb8d1a47e..9ab08007ec7 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -22,7 +22,7 @@ common = , stateDir , confDir , withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp - , withAWS ? !enableStatic && !stdenv.hostPlatform.isMusl && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp + , withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp , enableStatic ? stdenv.hostPlatform.isStatic , name, suffix ? "", src , patches ? [ ] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 305eca1d008..a822ccb99be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1362,6 +1362,8 @@ in glyr = callPackage ../tools/audio/glyr { }; + gtklp = callPackage ../tools/misc/gtklp { }; + google-amber = callPackage ../tools/graphics/amber { }; hakrawler = callPackage ../tools/security/hakrawler { };