diff options
16 files changed, 144 insertions, 85 deletions
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix index 88190e8200b1..8dd2ea20519a 100644 --- a/nixos/modules/system/boot/luksroot.nix +++ b/nixos/modules/system/boot/luksroot.nix @@ -404,7 +404,7 @@ let echo "Please move your mouse to create needed randomness." ''} echo "Waiting for your FIDO2 device..." - fido2luks -i open ${device} ${name} ${fido2.credential} --await-dev ${toString fido2.gracePeriod} --salt string:$passphrase + fido2luks open ${device} ${name} ${fido2.credential} --await-dev ${toString fido2.gracePeriod} --salt string:$passphrase if [ $? -ne 0 ]; then echo "No FIDO2 key found, falling back to normal open procedure" open_normally diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix index 49ff0d5d5a05..1bf7d16f2904 100644 --- a/pkgs/applications/science/math/maxima/default.nix +++ b/pkgs/applications/science/math/maxima/default.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, rlwrap ? null -, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false +{ stdenv, fetchurl, fetchpatch, sbcl, texinfo, perl, python, makeWrapper, autoreconfHook +, rlwrap ? null, tk ? null, gnuplot ? null, ecl ? null, ecl-fasl ? false }: let name = "maxima"; - version = "5.42.2"; + version = "5.44.0"; searchPath = stdenv.lib.makeBinPath @@ -16,14 +16,20 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz"; - sha256 = "0kdncy6137sg3rradirxzj10mkcvafxd892zlclwhr9sa7b12zhn"; + sha256 = "1v6jr5s6hhj6r18gfk6hgxk2qd6z1dxkrjq9ss2z1y6sqi45wgyr"; }; + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = stdenv.lib.filter (x: x != null) [ sbcl ecl texinfo perl python makeWrapper gnuplot # required in the test suite ]; + postPatch = '' + substituteInPlace doc/info/Makefile.am --replace "/usr/bin/env perl" "${perl}/bin/perl" + ''; + postInstall = '' # Make sure that maxima can find its runtime dependencies. for prog in "$out/bin/"*; do @@ -57,13 +63,6 @@ stdenv.mkDerivation ({ url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/undoing_true_false_printing_patch.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; sha256 = "0fvi3rcjv6743sqsbgdzazy9jb6r1p1yq63zyj9fx42wd1hgf7yx"; }) - - # upstream bug https://sourceforge.net/p/maxima/bugs/2520/ (not fixed) - # introduced in https://trac.sagemath.org/ticket/13364 - (fetchpatch { - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/maxima/patches/0001-taylor2-Avoid-blowing-the-stack-when-diff-expand-isn.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; - sha256 = "0xa0b6cr458zp7lc7qi0flv5ar0r3ivsqhjl0c3clv86di2y522d"; - }) ] ++ stdenv.lib.optionals ecl-fasl [ # build fasl, needed for ECL support (fetchpatch { @@ -74,11 +73,13 @@ stdenv.mkDerivation ({ # The test suite is disabled since 5.42.2 because of the following issues: # - # Errors found in /build/maxima-5.42.2/share/linearalgebra/rtest_matrixexp.mac, problems: + # Error(s) found: + # /build/maxima-5.44.0/share/linearalgebra/rtest_matrixexp.mac problems: # (20 21 22) - # Error found in rtest_arag, problem: - # (error break) - # 3 tests failed out of 3,881 total tests. + # Tests that were expected to fail but passed: + # /build/maxima-5.44.0/share/vector/rtest_vect.mac problem: + # (19) + # 3 tests failed out of 16,184 total tests. # # These failures don't look serious. It would be nice to fix them, but I # don't know how and probably won't have the time to find out. diff --git a/pkgs/applications/science/misc/convertall/default.nix b/pkgs/applications/science/misc/convertall/default.nix new file mode 100644 index 000000000000..63ed18c89b2f --- /dev/null +++ b/pkgs/applications/science/misc/convertall/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, python3, wrapQtAppsHook }: + +let + inherit (python3.pkgs) wrapPython pyqt5; +in stdenv.mkDerivation rec { + pname = "convertall"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "doug-101"; + repo = "ConvertAll"; + rev = "v${version}"; + sha256 = "02xxasgbjbivsbhyfpn3cpv52lscdx5kc95s6ns1dvnmdg0fpng0"; + }; + + nativeBuildInputs = [ python3 wrapPython wrapQtAppsHook ]; + + propagatedBuildInputs = [ pyqt5 ]; + + installPhase = '' + python3 install.py -p $out -x + ''; + + postFixup = '' + buildPythonPath $out + patchPythonScript $out/share/convertall/convertall.py + makeQtWrapper $out/share/convertall/convertall.py $out/bin/convertall + ''; + + meta = with stdenv.lib; { + homepage = "https://convertall.bellz.org/"; + description = "Graphical unit converter"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ orivej ]; + platforms = pyqt5.meta.platforms; + }; +} diff --git a/pkgs/development/libraries/SDL_image/default.nix b/pkgs/development/libraries/SDL_image/default.nix index 8e3078563e2b..968fc3d38af8 100644 --- a/pkgs/development/libraries/SDL_image/default.nix +++ b/pkgs/development/libraries/SDL_image/default.nix @@ -17,7 +17,12 @@ stdenv.mkDerivation rec { }) ]; - configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-sdltest"; + configureFlags = [ + # Disable its dynamic loading or dlopen will fail because of no proper rpath + "--disable-jpg-shared" + "--disable-png-shared" + "--disable-tif-shared" + ] ++ stdenv.lib.optional stdenv.isDarwin "--disable-sdltest"; buildInputs = [ SDL libpng libjpeg libtiff libungif libXpm ]; diff --git a/pkgs/development/libraries/science/math/libtorch/bin.nix b/pkgs/development/libraries/science/math/libtorch/bin.nix index 33229bbefc82..6180c14c4d72 100644 --- a/pkgs/development/libraries/science/math/libtorch/bin.nix +++ b/pkgs/development/libraries/science/math/libtorch/bin.nix @@ -100,7 +100,7 @@ in stdenv.mkDerivation { outputs = [ "out" "dev" ]; - passthru.tests = callPackage ./test { }; + passthru.tests.cmake = callPackage ./test { }; meta = with stdenv.lib; { description = "C++ API of the PyTorch machine learning framework"; diff --git a/pkgs/development/libraries/science/math/libtorch/test/default.nix b/pkgs/development/libraries/science/math/libtorch/test/default.nix index d661ec28db98..e69807871f46 100644 --- a/pkgs/development/libraries/science/math/libtorch/test/default.nix +++ b/pkgs/development/libraries/science/math/libtorch/test/default.nix @@ -6,16 +6,12 @@ stdenv.mkDerivation { src = ./.; - postPatch = '' - cat CMakeLists.txt - ''; - - makeFlags = [ "VERBOSE=1" ]; - nativeBuildInputs = [ cmake ]; buildInputs = [ libtorch-bin ]; + doCheck = true; + installPhase = '' touch $out ''; diff --git a/pkgs/development/libraries/science/math/libtorch/test/test.cpp b/pkgs/development/libraries/science/math/libtorch/test/test.cpp index 5537724ce5f6..ca238fba521d 100644 --- a/pkgs/development/libraries/science/math/libtorch/test/test.cpp +++ b/pkgs/development/libraries/science/math/libtorch/test/test.cpp @@ -1,7 +1,20 @@ -#include <torch/torch.h> +#undef NDEBUG +#include <cassert> + #include <iostream> +#include <torch/torch.h> + int main() { torch::Tensor tensor = torch::eye(3); - std::cout << tensor << std::endl; + + float checkData[] = { + 1, 0, 0, + 0, 1, 0, + 0, 0, 1 + }; + + torch::Tensor check = torch::from_blob(checkData, {3, 3}); + + assert(tensor.allclose(check)); } diff --git a/pkgs/development/tools/build-managers/bear/cmakepaths.patch b/pkgs/development/tools/build-managers/bear/cmakepaths.patch deleted file mode 100644 index d237267078e6..000000000000 --- a/pkgs/development/tools/build-managers/bear/cmakepaths.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 04c5c58..429ca47 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -24,7 +24,7 @@ set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING "Rogue") - - set(EAR_LIB_FILE ${CMAKE_SHARED_LIBRARY_PREFIX}ear${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(EAR_LIB_PATH "${CMAKE_INSTALL_LIBDIR}/bear") --set(DEFAULT_PRELOAD_FILE ${CMAKE_INSTALL_PREFIX}/${EAR_LIB_PATH}/${EAR_LIB_FILE} CACHE STRING "Default path to libear.") -+set(DEFAULT_PRELOAD_FILE ${EAR_LIB_PATH}/${EAR_LIB_FILE} CACHE STRING "Default path to libear.") - - add_subdirectory(libear) - add_subdirectory(bear) diff --git a/pkgs/development/tools/build-managers/bear/default.nix b/pkgs/development/tools/build-managers/bear/default.nix index bc7bb46cd5b9..cd5e508fbdd6 100644 --- a/pkgs/development/tools/build-managers/bear/default.nix +++ b/pkgs/development/tools/build-managers/bear/default.nix @@ -1,22 +1,49 @@ -{ stdenv, fetchFromGitHub, cmake, python3 }: +{ stdenv +, fetchFromGitHub +, cmake +, pkg-config +, grpc +, protobuf +, openssl +, nlohmann_json +, gtest +, fmt +, spdlog +, c-ares +, abseil-cpp +, zlib +}: stdenv.mkDerivation rec { pname = "bear"; - version = "2.4.2"; + version = "3.0.1"; src = fetchFromGitHub { owner = "rizsotto"; repo = pname; rev = version; - sha256 = "1w1kyjzvvy5lj16kn3yyf7iil2cqlfkszi8kvagql7f5h5l6w9b1"; + sha256 = "02vzlm48ywf6s3fly19j94k11dqx94x8pgmkq1ylx3z3d1y3b5zb"; }; - nativeBuildInputs = [ cmake ]; - buildInputs = [ python3 ]; # just for shebang of bin/bear + nativeBuildInputs = [ cmake pkg-config ]; - doCheck = false; # all fail + buildInputs = [ + grpc + protobuf + openssl + nlohmann_json + gtest + fmt + spdlog + c-ares + abseil-cpp + zlib + ]; - patches = [ ./ignore_wrapper.patch ./cmakepaths.patch ]; + patches = [ + # Default libexec would be set to /nix/store/*-bear//nix/store/*-bear/libexec/... + ./no-double-relative.patch + ]; meta = with stdenv.lib; { description = "Tool that generates a compilation database for clang tooling"; diff --git a/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch b/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch deleted file mode 100644 index 8effc723bbab..000000000000 --- a/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/bear/main.py.in -+++ b/bear/main.py.in -@@ -49,6 +49,7 @@ import tempfile - import shutil - import contextlib - import logging -+from distutils.spawn import find_executable - - # Map of ignored compiler option for the creation of a compilation database. - # This map is used in _split_command method, which classifies the parameters -@@ -569,7 +570,15 @@ class Compilation: - (compiler, language, rest of the command) otherwise """ - - if command: # not empty list will allow to index '0' and '1:' -- executable = os.path.basename(command[0]) # type: str -+ executable_file = find_executable(command[0]) -+ if executable_file: -+ absolute_executable = os.path.realpath(executable_file) -+ # Ignore Nix wrappers. -+ if 'wrapper' in absolute_executable: -+ return None -+ executable = os.path.basename(absolute_executable) -+ else: -+ executable = os.path.basename(command[0]) - parameters = command[1:] # type: List[str] - # 'wrapper' 'parameters' and - # 'wrapper' 'compiler' 'parameters' are valid.
\ No newline at end of file diff --git a/pkgs/development/tools/build-managers/bear/no-double-relative.patch b/pkgs/development/tools/build-managers/bear/no-double-relative.patch new file mode 100644 index 000000000000..0184bdfd6ba7 --- /dev/null +++ b/pkgs/development/tools/build-managers/bear/no-double-relative.patch @@ -0,0 +1,14 @@ +diff --git a/source/config.h.in b/source/config.h.in +index 2ca8853..2564c63 100644 +--- a/source/config.h.in ++++ b/source/config.h.in +@@ -65,6 +65,6 @@ constexpr char VERSION[] = "@CMAKE_PROJECT_VERSION@"; + + constexpr char CITNAMES_DEFAULT_PATH[] = "@ROOT_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/citnames"; + constexpr char INTERCEPT_DEFAULT_PATH[] = "@ROOT_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/intercept"; +-constexpr char LIBRARY_DEFAULT_PATH[] = "@ROOT_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@exec@CMAKE_SHARED_LIBRARY_SUFFIX@"; +-constexpr char EXECUTOR_DEFAULT_PATH[] = "@ROOT_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/er"; +-constexpr char WRAPPER_DEFAULT_PATH[] = "@ROOT_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBEXECDIR@/wrapper.d"; ++constexpr char LIBRARY_DEFAULT_PATH[] = "@CMAKE_INSTALL_LIBEXECDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@exec@CMAKE_SHARED_LIBRARY_SUFFIX@"; ++constexpr char EXECUTOR_DEFAULT_PATH[] = "@CMAKE_INSTALL_LIBEXECDIR@/er"; ++constexpr char WRAPPER_DEFAULT_PATH[] = "@CMAKE_INSTALL_LIBEXECDIR@/wrapper.d"; diff --git a/pkgs/servers/web-apps/wordpress/default.nix b/pkgs/servers/web-apps/wordpress/default.nix index 019988093471..af2a41202671 100644 --- a/pkgs/servers/web-apps/wordpress/default.nix +++ b/pkgs/servers/web-apps/wordpress/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "wordpress"; - version = "5.5.1"; + version = "5.5.3"; src = fetchurl { url = "https://wordpress.org/${pname}-${version}.tar.gz"; - sha256 = "15cjp48q23fw8ryy39mlxi4rd3rha2yqyrnk5mhx0h72ygawx8k6"; + sha256 = "sTkmdr9Mulw7XwNEMJBU81rwNV/agNpBjCznGuObrtQ="; }; installPhase = '' diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix index 7e04d05516a3..f4f0ac41563a 100644 --- a/pkgs/tools/compression/brotli/default.nix +++ b/pkgs/tools/compression/brotli/default.nix @@ -69,7 +69,7 @@ stdenv.mkDerivation rec { ''; license = licenses.mit; - maintainers = [ ]; + maintainers = with maintainers; [ freezeboy ]; platforms = platforms.all; }; } diff --git a/pkgs/tools/misc/miniserve/default.nix b/pkgs/tools/misc/miniserve/default.nix index a0fe350a2736..3e3c62fd0930 100644 --- a/pkgs/tools/misc/miniserve/default.nix +++ b/pkgs/tools/misc/miniserve/default.nix @@ -8,18 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "miniserve"; - version = "0.10.0"; + version = "0.10.3"; src = fetchFromGitHub { owner = "svenstaro"; repo = "miniserve"; rev = "v${version}"; - sha256 = "01nsviw5nc5lb6z3j2yiymiwhiq719nwqpvqbyb5p65s98sph7yh"; + sha256 = "17m0h0ib7fl0kijagcwdcnvrdcb6z3knix9dl17abg5ivbvkwz8q"; }; - cargoSha256 = "098p4645air5402shqignc57zdm6755shahhby17nqv1s27gfinc"; - - RUSTC_BOOTSTRAP = 1; + cargoSha256 = "0ddc8b9wph4r1qcy24p8yiaq9s2knii0d7dh0w0qnzrn6cmm17dg"; nativeBuildInputs = [ pkg-config zlib ]; buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ]; diff --git a/pkgs/tools/security/fido2luks/default.nix b/pkgs/tools/security/fido2luks/default.nix index 729a3f7297cb..d2a5d91467a8 100644 --- a/pkgs/tools/security/fido2luks/default.nix +++ b/pkgs/tools/security/fido2luks/default.nix @@ -3,23 +3,29 @@ , fetchFromGitHub , cryptsetup , pkg-config +, clang +, llvmPackages }: rustPlatform.buildRustPackage rec { pname = "fido2luks"; - version = "0.2.3"; + version = "0.2.15"; src = fetchFromGitHub { owner = "shimunn"; repo = pname; rev = version; - sha256 = "0340xp7q6f0clb7wmqpgllllwsixmsy37k1f5kj3hwvb730rz93x"; + sha256 = "1v5gxcz4zbc673i5kbsnjq8bikf7jdbn3wjfz1wppjrgwnkgvsh9"; }; buildInputs = [ cryptsetup ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config clang ]; - cargoSha256 = "0rp4f6xnwmvf3pv6h0qwsg01jrndf77yn67675ac39kxzmrzfy2f"; + configurePhase = '' + export LIBCLANG_PATH="${llvmPackages.libclang}/lib" + ''; + + cargoSha256 = "19drjql13z8bw257z10kjppxm25jlfgrpc9g1jf68ka5j2b3nx7k"; meta = with stdenv.lib; { description = "Decrypt your LUKS partition using a FIDO2 compatible authenticator"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index afa640a9f3fd..9f881a85ccac 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26892,6 +26892,8 @@ in inherit (pkgs.gnome2) gtkglext; }; + convertall = qt5.callPackage ../applications/science/misc/convertall { }; + cytoscape = callPackage ../applications/science/misc/cytoscape { jre = openjdk11; }; |