From 59990a614f9a641f52d196a71d8350c9d1c516ad Mon Sep 17 00:00:00 2001 From: Thane Gill Date: Fri, 24 Jun 2022 13:15:23 -0700 Subject: [PATCH 01/17] gam init at 6.22 Fixes #59781 --- pkgs/tools/admin/gam/default.nix | 73 +++++++++++++++++++ .../admin/gam/signal_files_as_env_vars.patch | 38 ++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 113 insertions(+) create mode 100644 pkgs/tools/admin/gam/default.nix create mode 100644 pkgs/tools/admin/gam/signal_files_as_env_vars.patch diff --git a/pkgs/tools/admin/gam/default.nix b/pkgs/tools/admin/gam/default.nix new file mode 100644 index 000000000000..191785dd0308 --- /dev/null +++ b/pkgs/tools/admin/gam/default.nix @@ -0,0 +1,73 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "gam"; + version = "6.22"; + format = "other"; + + src = fetchFromGitHub { + owner = "GAM-team"; + repo = "gam"; + rev = "v${version}"; + sha256 = "sha256-G/S1Rrm+suiy1CTTFLcBGt/QhARL7puHgR65nCxodH0="; + }; + + sourceRoot = "source/src"; + + patches = [ + # Also disables update check + ./signal_files_as_env_vars.patch + ]; + + propagatedBuildInputs = with python3.pkgs; [ + distro + filelock + google-api-python-client + google-auth + google-auth-oauthlib + passlib + pathvalidate + python-dateutil + setuptools + ]; + + # Use XDG-ish dirs for configuration. These would otherwise be in the gam + # package. + # + # Using --run as `makeWapper` evaluates variables for --set and --set-default + # at build time and then single quotes the vars in the wrapper, thus they + # wouldn't get expanded. But using --run allows setting default vars that are + # evaluated on run and not during build time. + makeWrapperArgs = [ + ''--run 'export GAMUSERCONFIGDIR="''${XDG_CONFIG_HOME:-$HOME/.config}/gam"' '' + ''--run 'export GAMSITECONFIGDIR="''${XDG_CONFIG_HOME:-$HOME/.config}/gam"' '' + ''--run 'export GAMCACHEDIR="''${XDG_CACHE_HOME:-$HOME/.cache}/gam"' '' + ''--run 'export GAMDRIVEDIR="$PWD"' '' + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp gam.py $out/bin/gam + mkdir -p $out/lib/${python3.libPrefix}/site-packages + cp -r gam $out/lib/${python3.libPrefix}/site-packages + runHook postInstall + ''; + + checkPhase = '' + runHook preCheck + ${python3.interpreter} -m unittest discover --pattern "*_test.py" --buffer + runHook postCheck + ''; + + meta = with lib; { + description = "Command line management for Google Workspace"; + homepage = "https://github.com/GAM-team/GAM/wiki"; + license = licenses.asl20; + maintainers = with maintainers; [ thanegill ]; + }; + +} diff --git a/pkgs/tools/admin/gam/signal_files_as_env_vars.patch b/pkgs/tools/admin/gam/signal_files_as_env_vars.patch new file mode 100644 index 000000000000..640a416d8a3a --- /dev/null +++ b/pkgs/tools/admin/gam/signal_files_as_env_vars.patch @@ -0,0 +1,38 @@ +diff --git a/gam/__init__.py b/gam/__init__.py +index 1c187ce..b2de793 100755 +--- a/gam/__init__.py ++++ b/gam/__init__.py +@@ -549,22 +549,16 @@ def SetGlobalVariables(): + _getOldEnvVar(GC_TLS_MIN_VERSION, 'GAM_TLS_MIN_VERSION') + _getOldEnvVar(GC_TLS_MAX_VERSION, 'GAM_TLS_MAX_VERSION') + _getOldEnvVar(GC_CA_FILE, 'GAM_CA_FILE') +- _getOldSignalFile(GC_DEBUG_LEVEL, +- 'debug.gam', +- filePresentValue=4, +- fileAbsentValue=0) +- _getOldSignalFile(GC_NO_BROWSER, 'nobrowser.txt') +- _getOldSignalFile(GC_NO_TDEMAIL, 'notdemail.txt') +- _getOldSignalFile(GC_OAUTH_BROWSER, 'oauthbrowser.txt') ++ _getOldEnvVar(GC_DEBUG_LEVEL, 'GAM_DEBUG') ++ _getOldEnvVar(GC_NO_BROWSER, 'GAM_NO_BROWSER') ++ _getOldEnvVar(GC_NO_TDEMAIL, 'GAM_NO_TDEMAIL') ++ _getOldEnvVar(GC_OAUTH_BROWSER, 'GAM_OAUTH_BROWSER') + # _getOldSignalFile(GC_NO_CACHE, u'nocache.txt') + # _getOldSignalFile(GC_CACHE_DISCOVERY_ONLY, u'allcache.txt', filePresentValue=False, fileAbsentValue=True) +- _getOldSignalFile(GC_NO_CACHE, +- 'allcache.txt', +- filePresentValue=False, +- fileAbsentValue=True) +- _getOldSignalFile(GC_NO_SHORT_URLS, 'noshorturls.txt') +- _getOldSignalFile(GC_NO_UPDATE_CHECK, 'noupdatecheck.txt') +- _getOldSignalFile(GC_ENABLE_DASA, FN_ENABLEDASA_TXT) ++ _getOldEnvVar(GC_NO_CACHE, 'GAM_NO_CACHE') ++ _getOldEnvVar(GC_NO_SHORT_URLS, 'GAM_NO_SHORT_URLS') ++ GC_Defaults[GC_NO_UPDATE_CHECK] = True ++ _getOldEnvVar(GC_ENABLE_DASA, FN_ENABLEDASA_TXT) + # Assign directories first + for itemName in GC_VAR_INFO: + if GC_VAR_INFO[itemName][GC_VAR_TYPE] == GC_TYPE_DIRECTORY: +-- +2.36.0 + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 90ab4630a31d..27616240b226 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1179,6 +1179,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa VideoToolbox; }; + gam = callPackage ../tools/admin/gam { }; + gfshare = callPackage ../tools/security/gfshare { }; gh-cal = callPackage ../tools/misc/gh-cal { From 4f64659d54ce6dd1002707cec1fad3fcc649fbd4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 8 Jul 2022 09:59:52 +0000 Subject: [PATCH 02/17] fast-downward: 21.12.0 -> 22.06.0 --- pkgs/applications/science/logic/fast-downward/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/fast-downward/default.nix b/pkgs/applications/science/logic/fast-downward/default.nix index 1fe770a599d0..4025fd4e6d65 100644 --- a/pkgs/applications/science/logic/fast-downward/default.nix +++ b/pkgs/applications/science/logic/fast-downward/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "fast-downward"; - version = "21.12.0"; + version = "22.06.0"; src = fetchFromGitHub { owner = "aibasel"; repo = "downward"; rev = "release-${version}"; - sha256 = "sha256-qc+SaUpIYm7bnOZlHH2mdvUaMBB+VRyOCQM/BOoOaPE="; + sha256 = "sha256-WzxLUuwZy+oNqmgj0n4Pe1QBYXXAaJqYhT+JSLbmyiM="; }; nativeBuildInputs = [ cmake python3.pkgs.wrapPython ]; From 633d5cb10fba4d1cddaa462f25c45a14e3726296 Mon Sep 17 00:00:00 2001 From: Uri Baghin Date: Mon, 1 Aug 2022 11:24:40 +1000 Subject: [PATCH 03/17] python3Packages.jaxlib: fix darwin build --- .../python-modules/jaxlib/default.nix | 54 ++++++++++++++----- pkgs/top-level/python-packages.nix | 7 ++- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/jaxlib/default.nix b/pkgs/development/python-modules/jaxlib/default.nix index 0fb0a183ebe4..54b4c36dc5a2 100644 --- a/pkgs/development/python-modules/jaxlib/default.nix +++ b/pkgs/development/python-modules/jaxlib/default.nix @@ -8,9 +8,11 @@ , binutils , buildBazelPackage , buildPythonPackage +, cctools , cython , fetchFromGitHub , git +, IOKit , jsoncpp , pybind11 , setuptools @@ -55,8 +57,11 @@ let homepage = "https://github.com/google/jax"; license = licenses.asl20; maintainers = with maintainers; [ ndl ]; - platforms = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin"]; - hydraPlatforms = ["x86_64-linux" ]; # Don't think anybody is checking the darwin builds + platforms = platforms.unix; + # aarch64-darwin is broken because of https://github.com/bazelbuild/rules_cc/pull/136 + # however even with that fix applied, it doesn't work for everyone: + # https://github.com/NixOS/nixpkgs/pull/184395#issuecomment-1207287129 + broken = stdenv.isAarch64; }; cudatoolkit_joined = symlinkJoin { @@ -117,6 +122,8 @@ let ] ++ lib.optionals cudaSupport [ cudatoolkit cudnn + ] ++ lib.optionals stdenv.isDarwin [ + IOKit ]; postPatch = '' @@ -201,9 +208,7 @@ let # Make sure Bazel knows about our configuration flags during fetching so that the # relevant dependencies can be downloaded. - bazelFetchFlags = bazel-build.bazelBuildFlags; - - bazelBuildFlags = [ + bazelFlags = [ "-c opt" ] ++ lib.optional (stdenv.targetPlatform.isx86_64 && stdenv.targetPlatform.isUnix) [ "--config=avx_posix" @@ -211,6 +216,11 @@ let "--config=cuda" ] ++ lib.optional mklSupport [ "--config=mkl_open_source_only" + ] ++ lib.optionals stdenv.cc.isClang [ + # bazel depends on the compiler frontend automatically selecting these flags based on file + # extension but our clang doesn't. + # https://github.com/NixOS/nixpkgs/issues/150655 + "--cxxopt=-x" "--cxxopt=c++" "--host_cxxopt=-x" "--host_cxxopt=c++" ]; fetchAttrs = { @@ -218,7 +228,7 @@ let if cudaSupport then "sha256-Ald+vplRx/DDG/7TfHAqD4Gktb1BGnf7FSCCJzSI0eo=" else - "sha256-6acSbBNcUBw177HMVOmpV7pUfP1aFSe5cP6/zWFdGFo="; + "sha256-eK5IjTAncDarkWYKnXrEo7kw7J7iOH7in2L2GabnFYo="; }; buildAttrs = { @@ -226,8 +236,8 @@ let # Note: we cannot do most of this patching at `patch` phase as the deps are not available yet. # 1) Fix pybind11 include paths. - # 2) Force static protobuf linkage to prevent crashes on loading multiple extensions - # in the same python program due to duplicate protobuf DBs. + # 2) Link protobuf from nixpkgs (through TF_SYSTEM_LIBS when using gcc) to prevent crashes on + # loading multiple extensions in the same python program due to duplicate protobuf DBs. # 3) Patch python path in the compiler driver. # 4) Patch tensorflow sources to work with later versions of protobuf. See # https://github.com/google/jax/issues/9534. Note that this should be @@ -236,13 +246,25 @@ let for src in ./jaxlib/*.{cc,h}; do sed -i 's@include/pybind11@pybind11@g' $src done - sed -i 's@-lprotobuf@-l:libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD - sed -i 's@-lprotoc@-l:libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD substituteInPlace ../output/external/org_tensorflow/tensorflow/compiler/xla/python/pprof_profile_builder.cc \ --replace "status.message()" "std::string{status.message()}" + substituteInPlace ../output/external/rules_cc/cc/private/toolchain/osx_cc_wrapper.sh.tpl \ + --replace "/usr/bin/install_name_tool" "${cctools}/bin/install_name_tool" + substituteInPlace ../output/external/rules_cc/cc/private/toolchain/unix_cc_configure.bzl \ + --replace "/usr/bin/libtool" "${cctools}/bin/libtool" '' + lib.optionalString cudaSupport '' patchShebangs ../output/external/org_tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl - ''; + '' + lib.optionalString stdenv.isDarwin '' + # Framework search paths aren't added by bintools hook + # https://github.com/NixOS/nixpkgs/pull/41914 + export NIX_LDFLAGS+=" -F${IOKit}/Library/Frameworks" + '' + (if stdenv.cc.isGNU then '' + sed -i 's@-lprotobuf@-l:libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD + sed -i 's@-lprotoc@-l:libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD + '' else if stdenv.cc.isClang then '' + sed -i 's@-lprotobuf@${pkgs.protobuf}/lib/libprotobuf.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD + sed -i 's@-lprotoc@${pkgs.protobuf}/lib/libprotoc.a@' ../output/external/org_tensorflow/third_party/systemlibs/protobuf.BUILD + '' else throw "Unsupported stdenv.cc: ${stdenv.cc}"); installPhase = '' ./bazel-bin/build/build_wheel --output_path=$out --cpu=${stdenv.targetPlatform.linuxArch} @@ -251,13 +273,21 @@ let inherit meta; }; + platformTag = + if stdenv.targetPlatform.isLinux then + "manylinux2010_${stdenv.targetPlatform.linuxArch}" + else if stdenv.system == "x86_64-darwin" then + "macosx_10_9_${stdenv.targetPlatform.linuxArch}" + else if stdenv.system == "aarch64-darwin" then + "macosx_11_0_${stdenv.targetPlatform.linuxArch}" + else throw "Unsupported target platform: ${stdenv.targetPlatform}"; in buildPythonPackage { inherit meta pname version; format = "wheel"; - src = "${bazel-build}/jaxlib-${version}-cp${builtins.replaceStrings ["."] [""] python.pythonVersion}-none-manylinux2010_${stdenv.targetPlatform.linuxArch}.whl"; + src = "${bazel-build}/jaxlib-${version}-cp${builtins.replaceStrings ["."] [""] python.pythonVersion}-none-${platformTag}.whl"; # Note that cudatoolkit is necessary since jaxlib looks for "ptxas" in $PATH. # See https://github.com/NixOS/nixpkgs/pull/164176#discussion_r828801621 for diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e104a8d57686..8c7c4935d264 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4558,12 +4558,17 @@ in { cudaPackages = pkgs.cudaPackages_11_6; }; - jaxlib-build = callPackage ../development/python-modules/jaxlib { + jaxlib-build = callPackage ../development/python-modules/jaxlib rec { + inherit (pkgs.darwin) cctools; + buildBazelPackage = pkgs.buildBazelPackage.override { + stdenv = if stdenv.isDarwin then pkgs.darwin.apple_sdk_11_0.stdenv else stdenv; + }; # Some platforms don't have `cudaSupport` defined, hence the need for 'or false'. cudaSupport = pkgs.config.cudaSupport or false; # At the time of writing (2022-04-18), `cudaPackages.nccl` is broken, so we # pin to `cudaPackages_11_6` instead. cudaPackages = pkgs.cudaPackages_11_6; + IOKit = pkgs.darwin.apple_sdk_11_0.IOKit; }; jaxlib = self.jaxlib-build; From 5b5e7723ee450b32b14ae1394a12ad5ea974e395 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 13 Aug 2022 17:12:47 +0000 Subject: [PATCH 04/17] entt: 3.10.0 -> 3.10.3 --- pkgs/development/libraries/entt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/entt/default.nix b/pkgs/development/libraries/entt/default.nix index 67886920cd37..7c87580aea11 100644 --- a/pkgs/development/libraries/entt/default.nix +++ b/pkgs/development/libraries/entt/default.nix @@ -1,13 +1,13 @@ { lib, stdenv, fetchFromGitHub, cmake }: stdenv.mkDerivation rec { pname = "entt"; - version = "3.10.0"; + version = "3.10.3"; src = fetchFromGitHub { owner = "skypjack"; repo = "entt"; rev = "v${version}"; - sha256 = "sha256-/4lc+/YiLPxrn+7Z67sEapYY0ocLWHPC8yeYD2VI+64="; + sha256 = "sha256-pewAwvNRCBS6rm3AmHthiayGfP71lqkAO+x6rT957Xg="; }; nativeBuildInputs = [ cmake ]; From 56a79b5653f6dfc14bb14dd8e65c06da9061ff46 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Tue, 16 Aug 2022 21:20:46 +0200 Subject: [PATCH 05/17] php81.packages.composer: 2.3.10 -> 2.4.0 --- pkgs/development/php-packages/composer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/php-packages/composer/default.nix b/pkgs/development/php-packages/composer/default.nix index 6d4d5ddd127b..c1fb77a20598 100644 --- a/pkgs/development/php-packages/composer/default.nix +++ b/pkgs/development/php-packages/composer/default.nix @@ -1,14 +1,14 @@ { mkDerivation, fetchurl, makeWrapper, unzip, lib, php }: let pname = "composer"; - version = "2.3.10"; + version = "2.4.0"; in mkDerivation { inherit pname version; src = fetchurl { url = "https://getcomposer.org/download/${version}/composer.phar"; - sha256 = "2AgnLyhPqOD4tHBwPhQ4rI82IDC7ydEuKVMCd9dnr/A="; + sha256 = "HNx090llkI0OmNAP7so3wjuG2lEXCjoRoVONif9E1N0="; }; dontUnpack = true; From bab6fd31cddf59760c86a620124fe064ef43fea3 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 17 Aug 2022 19:53:24 +0100 Subject: [PATCH 06/17] cvise: drop tests broken by pytest-flake8 update Commit https://github.com/NixOS/nixpkgs/pull/186102/commits/219b7104a3b49b4a9375ff791c7fbce3e8f504f2 marked pytest-flake8 as broken. Let's demove cvise tests to restore cvise package until upstream sorts it out. --- pkgs/development/tools/misc/cvise/default.nix | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/misc/cvise/default.nix b/pkgs/development/tools/misc/cvise/default.nix index d6ad65164b74..6db4a89becbd 100644 --- a/pkgs/development/tools/misc/cvise/default.nix +++ b/pkgs/development/tools/misc/cvise/default.nix @@ -1,6 +1,6 @@ { lib, buildPythonApplication, fetchFromGitHub, bash, cmake, flex , libclang, llvm, unifdef -, chardet, pebble, psutil, pytestCheckHook, pytest-flake8 +, chardet, pebble, psutil }: buildPythonApplication rec { @@ -22,7 +22,6 @@ buildPythonApplication rec { nativeBuildInputs = [ cmake flex llvm.dev ]; buildInputs = [ bash libclang llvm llvm.dev unifdef ]; propagatedBuildInputs = [ chardet pebble psutil ]; - checkInputs = [ pytestCheckHook pytest-flake8 unifdef ]; # 'cvise --command=...' generates a script with hardcoded shebang. postPatch = '' @@ -30,14 +29,8 @@ buildPythonApplication rec { --replace "#!/bin/bash" "#!${bash}/bin/bash" ''; - preCheck = '' - patchShebangs cvise.py - ''; - disabledTests = [ - # Needs gcc, fails when run noninteractively (without tty). - "test_simple_reduction" - ]; - + # pytest-flake8 is broken in nixpkgs: https://github.com/tholo/pytest-flake8/issues/87 + doCheck = false; dontUsePipInstall = true; dontUseSetuptoolsBuild = true; dontUseSetuptoolsCheck = true; From 12e34e003f6bf50868740113b40806659a7b0dbe Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 31 Jul 2022 21:46:52 +0000 Subject: [PATCH 07/17] libzip: 1.8.0 -> 1.9.2 --- pkgs/development/libraries/libzip/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libzip/default.nix b/pkgs/development/libraries/libzip/default.nix index f794868baf0d..d3b7e5642546 100644 --- a/pkgs/development/libraries/libzip/default.nix +++ b/pkgs/development/libraries/libzip/default.nix @@ -16,11 +16,11 @@ stdenv.mkDerivation rec { pname = "libzip"; - version = "1.8.0"; + version = "1.9.2"; src = fetchurl { url = "https://libzip.org/download/${pname}-${version}.tar.gz"; - sha256 = "17l3ygrnbszm3b99dxmw94wcaqpbljzg54h4c0y8ss8aij35bvih"; + sha256 = "sha256-/Wp/dF3j1pz1YD7cnLM9KJDwGY5BUlXQmHoM8Q2CTG8="; }; outputs = [ "out" "dev" "man" ]; From a1d817e29f2dce01ac68c1ccc7b53510a852ff7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Heredia=20Montiel?= Date: Wed, 17 Aug 2022 20:07:59 -0500 Subject: [PATCH 08/17] babl: fix compilation with meson 0.63 Upstream: https://gitlab.gnome.org/GNOME/babl/-/merge_requests/45/ Hydra: https://hydra.nixos.org/build/187630400 --- pkgs/development/libraries/babl/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/libraries/babl/default.nix b/pkgs/development/libraries/babl/default.nix index 3d396a0b2855..9a0aadbf2c42 100644 --- a/pkgs/development/libraries/babl/default.nix +++ b/pkgs/development/libraries/babl/default.nix @@ -1,5 +1,6 @@ { stdenv , lib +, fetchpatch , fetchurl , meson , ninja @@ -20,6 +21,13 @@ stdenv.mkDerivation rec { sha256 = "sha256-9mdzUCiUS2N1rRjxYKZM65P1x9zKqdh1HeNZd3SIosE="; }; + patches = [ + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/babl/-/commit/b05b2826365a7dbc6ca1bf0977b848055cd0cbb6.patch"; + hash = "sha256-zyDOc6FcVyZeMij1XjJ46XXWLO5MMz9ZqLKjjT6VSCI="; + }) + ]; + nativeBuildInputs = [ meson ninja From 802ea456991723a936e302b91d004345482b569a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 16 Aug 2022 13:28:54 +0000 Subject: [PATCH 09/17] janet: 1.23.0 -> 1.24.0 --- pkgs/development/interpreters/janet/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/janet/default.nix b/pkgs/development/interpreters/janet/default.nix index 2e502f35b301..718f13ad2e7d 100644 --- a/pkgs/development/interpreters/janet/default.nix +++ b/pkgs/development/interpreters/janet/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "janet"; - version = "1.23.0"; + version = "1.24.0"; src = fetchFromGitHub { owner = "janet-lang"; repo = pname; rev = "v${version}"; - sha256 = "sha256-FQZ9I9ROC1gWGfMCxsNMN3g/arenRtC6LHsOIAKGyuE="; + sha256 = "sha256-scc29tS3jiGacHp90tGmn/qnbLscJ4sAOCm8IteXfh4="; }; # This release fails the test suite on darwin, remove when debugged. From a1c20c103503389bc1cc3c8e2c1ff6feb84080ab Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 18 Aug 2022 00:23:08 +0000 Subject: [PATCH 10/17] python310Packages.peaqevcore: 5.2.0 -> 5.4.3 --- pkgs/development/python-modules/peaqevcore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/peaqevcore/default.nix b/pkgs/development/python-modules/peaqevcore/default.nix index 96d33c64f661..1662366eb188 100644 --- a/pkgs/development/python-modules/peaqevcore/default.nix +++ b/pkgs/development/python-modules/peaqevcore/default.nix @@ -6,14 +6,14 @@ buildPythonPackage rec { pname = "peaqevcore"; - version = "5.2.0"; + version = "5.4.3"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-8zllJh34tAymjW3OaFNiDuChdk/og09l51OFlt0jNqs="; + hash = "sha256-WeAYa1Iggog5VX1oiANZCeVpuEF5JdabdUjQ+fkAwxE="; }; postPatch = '' From 44b1a399b1180327e7a8035c1d2051ad32eaead2 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 18 Aug 2022 01:31:20 +0000 Subject: [PATCH 11/17] python310Packages.pypoolstation: 0.4.8 -> 0.4.9 --- pkgs/development/python-modules/pypoolstation/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pypoolstation/default.nix b/pkgs/development/python-modules/pypoolstation/default.nix index 5607bc0926a9..5c4703193af1 100644 --- a/pkgs/development/python-modules/pypoolstation/default.nix +++ b/pkgs/development/python-modules/pypoolstation/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "pypoolstation"; - version = "0.4.8"; + version = "0.4.9"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "PyPoolstation"; inherit version; - sha256 = "sha256-6Fdam/LS3Nicrhe5jHHvaKCpE0HigfOVszjb5c1VM3Y="; + sha256 = "sha256-2smgsR5f2fzmutr4EjhyrFWrO9odTba0ux+0B6k3+9Y="; }; nativeBuildInputs = [ From bcd52ecae0bdffba406ef9d18ec0451c1a687492 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 18 Aug 2022 01:19:36 +0000 Subject: [PATCH 12/17] python310Packages.pymavlink: 2.4.31 -> 2.4.34 --- pkgs/development/python-modules/pymavlink/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pymavlink/default.nix b/pkgs/development/python-modules/pymavlink/default.nix index 44abf56e7e47..2e71e58e7c30 100644 --- a/pkgs/development/python-modules/pymavlink/default.nix +++ b/pkgs/development/python-modules/pymavlink/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "pymavlink"; - version = "2.4.31"; + version = "2.4.34"; src = fetchPypi { inherit pname version; - sha256 = "sha256-p7cvwMpW1fS9Ml72vsD9L35wqPjtsQHW5lclw5SJ4P0="; + sha256 = "sha256-2JPBjEXiJWDJJPwS7SjNr3L4Ct+U44QaJiiv8MtSnEk="; }; propagatedBuildInputs = [ future lxml ]; From 7ce46dd74dc7bd2b6ba6619eaa8bdc5e1da9e79c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 18 Aug 2022 01:41:34 +0000 Subject: [PATCH 13/17] python310Packages.pysma: 0.6.11 -> 0.6.12 --- pkgs/development/python-modules/pysma/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysma/default.nix b/pkgs/development/python-modules/pysma/default.nix index efad8aaca948..5ec0aa44995e 100644 --- a/pkgs/development/python-modules/pysma/default.nix +++ b/pkgs/development/python-modules/pysma/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "pysma"; - version = "0.6.11"; + version = "0.6.12"; format = "setuptools"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - sha256 = "sha256-x0sFJAdueSny0XoaOYbYLN8ZRS5B/iEVT62mqd4Voe4="; + sha256 = "sha256-uxMxqx5qbahMvTm3akiOTODhKLNVhHzBAUsOcZo/35I="; }; propagatedBuildInputs = [ From a6d96a709a1d0c64e361ae6a824ec4f62c426ad5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 18 Aug 2022 02:21:02 +0000 Subject: [PATCH 14/17] python310Packages.qcengine: 0.24.0 -> 0.24.1 --- pkgs/development/python-modules/qcengine/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/qcengine/default.nix b/pkgs/development/python-modules/qcengine/default.nix index 2290bfbc3247..af842c6c9559 100644 --- a/pkgs/development/python-modules/qcengine/default.nix +++ b/pkgs/development/python-modules/qcengine/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "qcengine"; - version = "0.24.0"; + version = "0.24.1"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-T6/gC3HHCnI3O1Gkj/MdistL93bwymtEfNF6PmA7TN0="; + hash = "sha256-KUOGbGQd1ffXNkQiW8yeUxValCOAfd8nBv9nnk9giVU="; }; propagatedBuildInputs = [ From da87f771027c5fe2db7d93d4e56197849236dc5a Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Fri, 15 Jul 2022 16:47:19 +0800 Subject: [PATCH 15/17] cbmc: init at 5.63.0 Cadical is used as sat solver backend. https://github.com/diffblue/cbmc/releases/tag/cbmc-5.63.0 --- ...001-Do-not-download-sources-in-cmake.patch | 49 +++++++++++ .../science/logic/cbmc/default.nix | 82 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 133 insertions(+) create mode 100644 pkgs/applications/science/logic/cbmc/0001-Do-not-download-sources-in-cmake.patch create mode 100644 pkgs/applications/science/logic/cbmc/default.nix diff --git a/pkgs/applications/science/logic/cbmc/0001-Do-not-download-sources-in-cmake.patch b/pkgs/applications/science/logic/cbmc/0001-Do-not-download-sources-in-cmake.patch new file mode 100644 index 000000000000..78b2c9d3bb22 --- /dev/null +++ b/pkgs/applications/science/logic/cbmc/0001-Do-not-download-sources-in-cmake.patch @@ -0,0 +1,49 @@ +From fbc1488e8da0175e9c9bdf5892f8a65c71f2a266 Mon Sep 17 00:00:00 2001 +From: Jiajie Chen +Date: Fri, 15 Jul 2022 18:33:15 +0800 +Subject: [PATCH] Do not download sources in cmake + +--- + src/solvers/CMakeLists.txt | 20 +------------------- + 1 file changed, 1 insertion(+), 19 deletions(-) + +diff --git a/src/solvers/CMakeLists.txt b/src/solvers/CMakeLists.txt +index 744def486..5b719a78a 100644 +--- a/src/solvers/CMakeLists.txt ++++ b/src/solvers/CMakeLists.txt +@@ -106,31 +106,13 @@ elseif("${sat_impl}" STREQUAL "glucose") + elseif("${sat_impl}" STREQUAL "cadical") + message(STATUS "Building solvers with cadical") + +- download_project(PROJ cadical +- URL https://github.com/arminbiere/cadical/archive/rel-1.4.1.tar.gz +- PATCH_COMMAND true +- COMMAND CXX=${CMAKE_CXX_COMPILER} ./configure -O3 -s CXXFLAGS=-std=c++14 +- URL_MD5 b44874501a175106424f4bd5de29aa59 +- ) +- + message(STATUS "Building CaDiCaL") +- execute_process(COMMAND make -j WORKING_DIRECTORY ${cadical_SOURCE_DIR}) + + target_compile_definitions(solvers PUBLIC + SATCHECK_CADICAL HAVE_CADICAL + ) + +- add_library(cadical STATIC IMPORTED) +- +- set_target_properties( +- cadical +- PROPERTIES IMPORTED_LOCATION ${cadical_SOURCE_DIR}/build/libcadical.a +- ) +- +- target_include_directories(solvers +- PUBLIC +- ${cadical_SOURCE_DIR}/src +- ) ++ target_include_directories(solvers PUBLIC ${cadical_INCLUDE_DIR}) + + target_link_libraries(solvers cadical) + elseif("${sat_impl}" STREQUAL "ipasir-cadical") +-- +2.35.1 + diff --git a/pkgs/applications/science/logic/cbmc/default.nix b/pkgs/applications/science/logic/cbmc/default.nix new file mode 100644 index 000000000000..ba06a3e4b7a2 --- /dev/null +++ b/pkgs/applications/science/logic/cbmc/default.nix @@ -0,0 +1,82 @@ +{ lib +, stdenv +, fetchFromGitHub +, testers +, bison +, cadical +, cbmc +, cmake +, flex +, makeWrapper +, perl +}: + +stdenv.mkDerivation rec { + pname = "cbmc"; + version = "5.63.0"; + + src = fetchFromGitHub { + owner = "diffblue"; + repo = pname; + rev = "${pname}-${version}"; + sha256 = "sha256-4tn3wsmaYdo5/QaZc3MLxVGF0x8dmRKeygF/8A+Ww1o="; + }; + + nativeBuildInputs = [ + bison + cmake + flex + perl + makeWrapper + ]; + + buildInputs = [ cadical ]; + + # do not download sources + # link existing cadical instead + patches = [ + ./0001-Do-not-download-sources-in-cmake.patch + ]; + + postPatch = '' + # do not hardcode gcc + substituteInPlace "scripts/bash-autocomplete/extract_switches.sh" \ + --replace "gcc" "$CC" \ + --replace "g++" "$CXX" + # fix library_check.sh interpreter error + patchShebangs . + '' + lib.optionalString (!stdenv.cc.isGNU) '' + # goto-gcc rely on gcc + substituteInPlace "regression/CMakeLists.txt" \ + --replace "add_subdirectory(goto-gcc)" "" + ''; + + postInstall = '' + # goto-cc expects ls_parse.py in PATH + mkdir -p $out/share/cbmc + mv $out/bin/ls_parse.py $out/share/cbmc/ls_parse.py + chmod +x $out/share/cbmc/ls_parse.py + wrapProgram $out/bin/goto-cc \ + --prefix PATH : "$out/share/cbmc" \ + ''; + + # fix "argument unused during compilation" + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang + "-Wno-unused-command-line-argument"; + + # TODO: add jbmc support + cmakeFlags = [ "-DWITH_JBMC=OFF" "-Dsat_impl=cadical" "-Dcadical_INCLUDE_DIR=${cadical.dev}/include" ]; + + passthru.tests.version = testers.testVersion { + package = cbmc; + command = "cbmc --version"; + }; + + meta = with lib; { + description = "CBMC is a Bounded Model Checker for C and C++ programs"; + homepage = "http://www.cprover.org/cbmc/"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ jiegec ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f896a18703d5..29b8db413d7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -34247,6 +34247,8 @@ with pkgs; boogie = dotnetPackages.Boogie; + cbmc = callPackage ../applications/science/logic/cbmc { }; + cadical = callPackage ../applications/science/logic/cadical {}; inherit (callPackage ./coq-packages.nix { From 1c66729c007789e54478322e0c98f0361b93281b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 18 Aug 2022 06:30:45 +0100 Subject: [PATCH 16/17] pax-utils: fix cross-compilation (missing native C compiler) Without the change cross-compilation fails as: $ nix build -f. pkgsCross.ppc64.pax-utils -L ... meson.build:149:2: ERROR: Tried to access compiler for language "c", not specified for build machine. --- pkgs/os-specific/linux/pax-utils/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/os-specific/linux/pax-utils/default.nix b/pkgs/os-specific/linux/pax-utils/default.nix index f074ab344ab2..844dc61dac37 100644 --- a/pkgs/os-specific/linux/pax-utils/default.nix +++ b/pkgs/os-specific/linux/pax-utils/default.nix @@ -1,6 +1,7 @@ { stdenv , lib , fetchurl +, buildPackages , docbook_xml_dtd_44 , docbook_xsl , libcap @@ -23,6 +24,7 @@ stdenv.mkDerivation rec { strictDeps = true; + depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ docbook_xml_dtd_44 docbook_xsl meson ninja pkg-config xmlto ]; buildInputs = [ libcap ]; From 198a940c6190da94acdbe5c7f4ba2b8c6ee98748 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 18 Aug 2022 06:36:13 +0100 Subject: [PATCH 17/17] glibc: add a few TODOs aroung libgcc_s.so hack Make it clearer why the hack is still there. --- pkgs/development/libraries/glibc/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index ba782321559d..f941f7be769d 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -64,8 +64,12 @@ callPackage ./common.nix { inherit stdenv; } { # store path than that determined when built (as a source for the # bootstrap-tools tarball) # Building from a proper gcc staying in the path where it was installed, - # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without + # libgcc_s will now be at {gcc}/lib, and gcc's libgcc will be found without # any special hack. + # TODO: remove this hack. Things that rely on this hack today: + # - dejagnu: during linux bootstrap tcl SIGSEGVs + # - clang-wrapper in cross-compilation + # Last attempt: https://github.com/NixOS/nixpkgs/pull/36948 preInstall = '' if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then mkdir -p $out/lib