From d5dabf12baf21fc037c6a465bfd810ced66b6741 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sun, 13 Aug 2023 20:47:40 +0100 Subject: [PATCH 01/45] python3.pkgs.influxdb: fix after Pandas bump Pandas has removed the deprecated pandas.util.testing package, and there are also some other behaviour changes with parsing date times. Patch the former, and skip the tests affected by the latter. Note that upstream is no longer supporting this package and it has been archived on GitHub. --- pkgs/development/python-modules/influxdb/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/influxdb/default.nix b/pkgs/development/python-modules/influxdb/default.nix index e2bacd522922..ce6bccdd409f 100644 --- a/pkgs/development/python-modules/influxdb/default.nix +++ b/pkgs/development/python-modules/influxdb/default.nix @@ -23,6 +23,13 @@ buildPythonPackage rec { sha256 = "0ymjv322mv6y424fmpd70f87152w55mbwwj6i7p3sjzf0ixmxy26"; }; + postPatch = '' + for f in influxdb/tests/dataframe_client_test.py influxdb/tests/influxdb08/dataframe_client_test.py; do + substituteInPlace "$f" \ + --replace "pandas.util.testing" "pandas.testing" + done + ''; + propagatedBuildInputs = [ requests python-dateutil @@ -51,6 +58,9 @@ buildPythonPackage rec { "test_write_points_from_dataframe_with_tags_and_nan_json" # Reponse is not empty but `s = '孝'` and the JSON decoder chokes on that "test_query_with_empty_result" + # Pandas API changes cause it to no longer infer datetimes in the expected manner + "test_multiquery_into_dataframe" + "test_multiquery_into_dataframe_dropna" ]; pythonImportsCheck = [ "influxdb" ]; From 73743d45e07eb00a57c0024725b4a919e6c4a16f Mon Sep 17 00:00:00 2001 From: kashw2 Date: Mon, 14 Aug 2023 12:50:34 +1000 Subject: [PATCH 02/45] leetcode-cli: 0.4.1 -> 0.4.2 --- pkgs/applications/misc/leetcode-cli/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/leetcode-cli/default.nix b/pkgs/applications/misc/leetcode-cli/default.nix index 4683a8052fbc..cc59d6b18c28 100644 --- a/pkgs/applications/misc/leetcode-cli/default.nix +++ b/pkgs/applications/misc/leetcode-cli/default.nix @@ -7,18 +7,20 @@ , sqlite , stdenv , darwin +, testers +, leetcode-cli }: rustPlatform.buildRustPackage rec { pname = "leetcode-cli"; - version = "0.4.1"; + version = "0.4.2"; src = fetchCrate { inherit pname version; - sha256 = "sha256-8v10Oe3J0S9xp4b2UDOnv+W0UDgveK+mAyV3I/zZUGw="; + sha256 = "sha256-Yr8Jsy8863O6saaFRAxssni+PtK7XYe+Iifgxu8Rx6Q="; }; - cargoHash = "sha256-MdHk8i/murKcWi9gydyPyq/6r1SovKP04PMJyXXrCiQ="; + cargoHash = "sha256-rab/oLr27UOlnwUUB1RXC/egLoYyzmVtzN1L+AGed8o="; nativeBuildInputs = [ pkg-config From e2f4aedc423400c73064666ad44218b261a3f8b2 Mon Sep 17 00:00:00 2001 From: kashw2 Date: Mon, 14 Aug 2023 12:50:54 +1000 Subject: [PATCH 03/45] added passthru version test --- pkgs/applications/misc/leetcode-cli/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/misc/leetcode-cli/default.nix b/pkgs/applications/misc/leetcode-cli/default.nix index cc59d6b18c28..be9102b6120b 100644 --- a/pkgs/applications/misc/leetcode-cli/default.nix +++ b/pkgs/applications/misc/leetcode-cli/default.nix @@ -32,6 +32,12 @@ rustPlatform.buildRustPackage rec { sqlite ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; + passthru.tests = testers.testVersion { + package = leetcode-cli; + command = "leetcode -V"; + version = "leetcode ${version}"; + }; + meta = with lib; { description = "May the code be with you 👻"; longDescription = "Use leetcode.com in command line"; From 9fcc64eb9baefc8f2b2969ad1b374c3dd33c434e Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 14 Aug 2023 04:20:00 +0000 Subject: [PATCH 04/45] twilio-cli: 5.11.0 -> 5.12.0 Changelog: https://github.com/twilio/twilio-cli/blob/5.12.0/CHANGES.md --- pkgs/development/tools/twilio-cli/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/twilio-cli/default.nix b/pkgs/development/tools/twilio-cli/default.nix index f30a0737dd4b..d64da750c407 100644 --- a/pkgs/development/tools/twilio-cli/default.nix +++ b/pkgs/development/tools/twilio-cli/default.nix @@ -2,11 +2,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "twilio-cli"; - version = "5.11.0"; + version = "5.12.0"; src = fetchzip { url = "https://twilio-cli-prod.s3.amazonaws.com/twilio-v${finalAttrs.version}/twilio-v${finalAttrs.version}.tar.gz"; - sha256 = "sha256-h8Y8AgXOfl7GWlyRYRAw+SlD3ZX9U0NMyvBQiI/vGgY="; + sha256 = "sha256-K8SMUT2f8pgxCP5JGFyo/gLm60t0OeCt/1fYAw2HQX0="; }; buildInputs = [ nodejs ]; From 57909125148692d055362e8340b05f4ab6df372e Mon Sep 17 00:00:00 2001 From: Dmitry Ivankov Date: Fri, 28 Jul 2023 13:43:29 +0200 Subject: [PATCH 05/45] bazel_6: installCheckPhase .bazelversion override In case bazel dist archive includes .bazelversion (like in 5.4.1 https://github.com/bazelbuild/bazel/issues/18189 or 6.3.1rc1) running bazel commands in dist worktree will require using version specified in .bazelversion. If .bazelversion is absent there any available version will be used. Let's make sure we don't fail installCheckPhase for dist archives that do include .bazelversion (note: bazel bootstrapping from sources not via bazel works regardless of that file, so that's only about test/check phases) --- .../tools/build-managers/bazel/bazel_6/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix index 1424817edc90..91f0a71c3603 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_6/default.nix @@ -625,6 +625,12 @@ stdenv.mkDerivation rec { cd ./bazel_src + # If .bazelversion file is present in dist files and doesn't match `bazel` version + # running `bazel` command within bazel_src will fail. + # Let's remove .bazelversion within the test, if present it is meant to indicate bazel version + # to compile bazel with, not version of bazel to be built and tested. + rm -f .bazelversion + # test whether $WORKSPACE_ROOT/tools/bazel works mkdir -p tools From 30cfb7d36737d766dad1e0d6dc551cfeedf7433f Mon Sep 17 00:00:00 2001 From: kilianar Date: Mon, 14 Aug 2023 13:23:38 +0200 Subject: [PATCH 06/45] portfolio: 0.64.5 -> 0.65.0 https://github.com/portfolio-performance/portfolio/releases/tag/0.65.0 --- pkgs/applications/office/portfolio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/portfolio/default.nix b/pkgs/applications/office/portfolio/default.nix index 88fcdfd50c29..b6b8166d2678 100644 --- a/pkgs/applications/office/portfolio/default.nix +++ b/pkgs/applications/office/portfolio/default.nix @@ -27,11 +27,11 @@ let in stdenv.mkDerivation rec { pname = "PortfolioPerformance"; - version = "0.64.5"; + version = "0.65.0"; src = fetchurl { url = "https://github.com/buchen/portfolio/releases/download/${version}/PortfolioPerformance-${version}-linux.gtk.x86_64.tar.gz"; - hash = "sha256-dF8w5JyUNypLyPqFC6dWLArPjykvy9BPZnHYs6lyYQM="; + hash = "sha256-a1LL8RCxItrtsyQrJSbMEBPUwxKK6t8FXdFEhxGdvxw="; }; nativeBuildInputs = [ From bf378019c92de33e701d58aedd5cba47c509044b Mon Sep 17 00:00:00 2001 From: Elliot Date: Mon, 14 Aug 2023 10:24:34 +0800 Subject: [PATCH 07/45] keepmenu: 1.3.1 -> 1.4.0 --- pkgs/applications/misc/keepmenu/default.nix | 39 ++++++++++++++------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/misc/keepmenu/default.nix b/pkgs/applications/misc/keepmenu/default.nix index 6af41c7209e6..1e6735d65616 100644 --- a/pkgs/applications/misc/keepmenu/default.nix +++ b/pkgs/applications/misc/keepmenu/default.nix @@ -1,28 +1,42 @@ -{ lib, python3Packages, fetchPypi, xvfb-run }: +{ lib, python3Packages, fetchFromGitHub, xvfb-run, xdotool, dmenu }: python3Packages.buildPythonApplication rec { pname = "keepmenu"; - version = "1.3.1"; + version = "1.4.0"; + format = "pyproject"; - src = fetchPypi { - inherit pname version; - hash = "sha256-AGuJY7IirzIjcu/nY9CzeOqU1liwcRijYLi8hGN/pRg="; + src = fetchFromGitHub { + owner = "firecat53"; + repo = "keepmenu"; + rev = version; + hash = "sha256-3vFg+9Nw+NhuPJbrmBahXwa13wXlBg5IMYwJ+unn88k="; }; - preConfigure = '' - export HOME=$TMPDIR - mkdir -p $HOME/.config/keepmenu - cp config.ini.example $HOME/.config/keepmenu/config.ini - ''; + nativeBuildInputs = with python3Packages; [ + hatchling + hatch-vcs + ]; + + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; propagatedBuildInputs = with python3Packages; [ pykeepass pynput ]; - nativeCheckInputs = [ xvfb-run ]; + nativeCheckInputs = [ xvfb-run xdotool dmenu ]; + + postPatch = '' + substituteInPlace tests/keepmenu-config.ini tests/tests.py \ + --replace "/usr/bin/dmenu" "dmenu" + ''; + checkPhase = '' - xvfb-run python setup.py test + runHook preCheck + + xvfb-run python tests/tests.py + + runHook postCheck ''; pythonImportsCheck = [ "keepmenu" ]; @@ -32,5 +46,6 @@ python3Packages.buildPythonApplication rec { description = "Dmenu/Rofi frontend for Keepass databases"; license = licenses.gpl3Only; maintainers = with maintainers; [ elliot ]; + platforms = platforms.linux; }; } From d2ebdcb1bd10deb5949bc5e0a4f26e4d70d4f339 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 14 Aug 2023 09:23:34 -0400 Subject: [PATCH 08/45] typst-lsp: 0.9.0 -> 0.9.1 Diff: https://github.com/nvarner/typst-lsp/compare/v0.9.0...v0.9.1 Changelog: https://github.com/nvarner/typst-lsp/releases/tag/v0.9.1 --- .../language-servers/typst-lsp/Cargo.lock | 18 ++++++++++-------- .../language-servers/typst-lsp/default.nix | 16 ++++------------ 2 files changed, 14 insertions(+), 20 deletions(-) diff --git a/pkgs/development/tools/language-servers/typst-lsp/Cargo.lock b/pkgs/development/tools/language-servers/typst-lsp/Cargo.lock index c7073c422c48..f09600ebe5be 100644 --- a/pkgs/development/tools/language-servers/typst-lsp/Cargo.lock +++ b/pkgs/development/tools/language-servers/typst-lsp/Cargo.lock @@ -96,9 +96,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", @@ -3045,9 +3045,9 @@ checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" [[package]] name = "tower-lsp" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b38fb0e6ce037835174256518aace3ca621c4f96383c56bb846cfc11b341910" +checksum = "d4ba052b54a6627628d9b3c34c176e7eda8359b7da9acd497b9f20998d118508" dependencies = [ "async-trait", "auto_impl", @@ -3068,13 +3068,13 @@ dependencies = [ [[package]] name = "tower-lsp-macros" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34723c06344244474fdde365b76aebef8050bf6be61a935b91ee9ff7c4e91157" +checksum = "84fd902d4e0b9a4b27f2f440108dc034e1758628a9b702f8ec61ad66355422fa" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.28", ] [[package]] @@ -3267,10 +3267,11 @@ dependencies = [ [[package]] name = "typst-lsp" -version = "0.9.0" +version = "0.9.1" dependencies = [ "anyhow", "async-compression", + "async-trait", "bpaf", "chrono", "comemo", @@ -3287,6 +3288,7 @@ dependencies = [ "opentelemetry", "opentelemetry-jaeger", "parking_lot", + "percent-encoding", "regex", "reqwest", "same-file", diff --git a/pkgs/development/tools/language-servers/typst-lsp/default.nix b/pkgs/development/tools/language-servers/typst-lsp/default.nix index e730ab24ce8b..20cbb146bcf1 100644 --- a/pkgs/development/tools/language-servers/typst-lsp/default.nix +++ b/pkgs/development/tools/language-servers/typst-lsp/default.nix @@ -1,21 +1,19 @@ { lib , rustPlatform , fetchFromGitHub -, pkg-config -, openssl , stdenv , darwin }: rustPlatform.buildRustPackage rec { pname = "typst-lsp"; - version = "0.9.0"; + version = "0.9.1"; src = fetchFromGitHub { owner = "nvarner"; repo = "typst-lsp"; rev = "v${version}"; - hash = "sha256-XV/LlibO+2ORle0lVcqqHrDdH75kodk9yOU3OsHFA+A="; + hash = "sha256-vzywUbfLyogJhjybiUEGJ2XESjDWE2fMfHM0uJxZC38="; }; cargoLock = { @@ -25,19 +23,13 @@ rustPlatform.buildRustPackage rec { }; }; - nativeBuildInputs = [ - pkg-config - ]; - - buildInputs = [ - openssl - ] ++ lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; checkFlags = [ # requires internet access - "--skip=workspace::package::external::repo::test::full_download" + "--skip=workspace::package::external::remote_repo::test::full_download" ]; meta = with lib; { From 0e5416a459907e48abc49050335b271f3e93bd90 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 14 Aug 2023 16:12:31 +0200 Subject: [PATCH 09/45] prometheus-postgres-exporter: 0.13.1 -> 0.13.2 ChangeLog: https://github.com/prometheus-community/postgres_exporter/releases/tag/v0.13.2 --- pkgs/servers/monitoring/prometheus/postgres-exporter.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/postgres-exporter.nix b/pkgs/servers/monitoring/prometheus/postgres-exporter.nix index a2c542b1e871..52589af2da7e 100644 --- a/pkgs/servers/monitoring/prometheus/postgres-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/postgres-exporter.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "postgres_exporter"; - version = "0.13.1"; + version = "0.13.2"; src = fetchFromGitHub { owner = "prometheus-community"; repo = "postgres_exporter"; rev = "v${version}"; - sha256 = "sha256-DBb15rtwrR+jixbnZEfhQUkCo+N+kPiZ60VxtNoL90c="; + sha256 = "sha256-K0B6EsRCWznYf4xS+9T4HafOSUPHCNsu2ZSIVXneGyk="; }; vendorHash = "sha256-0MQS42/4iImtq3yBGVCe0BwV0HiJCo7LVEAbsKltE4g="; From ce0123ad6c2ab2e1510e234e16f491eae1eb9536 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 14 Aug 2023 11:13:23 -0400 Subject: [PATCH 10/45] typos: 1.16.4 -> 1.16.5 Diff: https://github.com/crate-ci/typos/compare/v1.16.4...v1.16.5 Changelog: https://github.com/crate-ci/typos/blob/v1.16.5/CHANGELOG.md --- pkgs/development/tools/typos/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/typos/default.nix b/pkgs/development/tools/typos/default.nix index 57b23899155e..3904d45a7191 100644 --- a/pkgs/development/tools/typos/default.nix +++ b/pkgs/development/tools/typos/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "typos"; - version = "1.16.4"; + version = "1.16.5"; src = fetchFromGitHub { owner = "crate-ci"; repo = pname; rev = "v${version}"; - hash = "sha256-/LEE+54ppv/jkUgpuMReorQA9D4KAuPG04E8lIk7upA="; + hash = "sha256-KRu9hbMwfLug827r0OnrRQIiF0y6Qq6Llb5F1rwQdt4="; }; - cargoHash = "sha256-hvFDmtNweTXQEgu5ng/lBVu7OPnA8hA8h6HFvGxCJIE="; + cargoHash = "sha256-oBl8FTgxTK8czIExMsAHgJyHsfEzyoDRiAhH9R5tHKw="; meta = with lib; { description = "Source code spell checker"; From 877980c41089488cc5eb9684e127c998dcbfd932 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Mon, 14 Aug 2023 18:40:50 +0200 Subject: [PATCH 11/45] linuxPackage.nvidia_x11*: Remove another nvidia-settings library --- pkgs/os-specific/linux/nvidia-x11/builder.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/os-specific/linux/nvidia-x11/builder.sh b/pkgs/os-specific/linux/nvidia-x11/builder.sh index 07a9961a1bab..b7824f209776 100755 --- a/pkgs/os-specific/linux/nvidia-x11/builder.sh +++ b/pkgs/os-specific/linux/nvidia-x11/builder.sh @@ -64,6 +64,7 @@ installPhase() { for i in $lib32 $out; do rm -f $i/lib/lib{glx,nvidia-wfb}.so.* # handled separately rm -f $i/lib/libnvidia-gtk* # built from source + rm -f $i/lib/libnvidia-wayland-client* # built from source if [ "$useGLVND" = "1" ]; then # Pre-built libglvnd rm $i/lib/lib{GL,GLX,EGL,GLESv1_CM,GLESv2,OpenGL,GLdispatch}.so.* From 2249c1e5dc72467dda4339a5d92759b6e94eba22 Mon Sep 17 00:00:00 2001 From: Kiskae Date: Mon, 14 Aug 2023 19:00:07 +0200 Subject: [PATCH 12/45] linuxPackage.nvidia_x11.settings: nixpkgs-fmt and add opengl runpath --- .../os-specific/linux/nvidia-x11/settings.nix | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/settings.nix b/pkgs/os-specific/linux/nvidia-x11/settings.nix index 5570228d78bf..a052cf0e48f3 100644 --- a/pkgs/os-specific/linux/nvidia-x11/settings.nix +++ b/pkgs/os-specific/linux/nvidia-x11/settings.nix @@ -1,9 +1,25 @@ nvidia_x11: sha256: -{ stdenv, lib, fetchFromGitHub, fetchpatch, pkg-config, m4, jansson, gtk2, dbus, gtk3 -, libXv, libXrandr, libXext, libXxf86vm, libvdpau -, librsvg, wrapGAppsHook -, withGtk2 ? false, withGtk3 ? true +{ stdenv +, lib +, fetchFromGitHub +, fetchpatch +, pkg-config +, m4 +, jansson +, gtk2 +, dbus +, gtk3 +, libXv +, libXrandr +, libXext +, libXxf86vm +, libvdpau +, librsvg +, wrapGAppsHook +, addOpenGLRunpath +, withGtk2 ? false +, withGtk3 ? true }: let @@ -69,10 +85,10 @@ stdenv.mkDerivation { fi ''; - nativeBuildInputs = [ pkg-config m4 ]; + nativeBuildInputs = [ pkg-config m4 addOpenGLRunpath ]; buildInputs = [ jansson libXv libXrandr libXext libXxf86vm libvdpau nvidia_x11 gtk2 dbus ] - ++ lib.optionals withGtk3 [ gtk3 librsvg wrapGAppsHook ]; + ++ lib.optionals withGtk3 [ gtk3 librsvg wrapGAppsHook ]; installFlags = [ "PREFIX=$(out)" ]; @@ -100,6 +116,8 @@ stdenv.mkDerivation { postFixup = '' patchelf --set-rpath "$(patchelf --print-rpath $out/bin/$binaryName):$out/lib:${libXv}/lib" \ $out/bin/$binaryName + + addOpenGLRunpath $out/bin/$binaryName ''; passthru = { From 1302818fee73d235624135f55da320b2aeb8981c Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 14 Aug 2023 13:27:06 -0400 Subject: [PATCH 13/45] ripdrag: 0.4.0 -> 0.4.1 Diff: https://github.com/nik012003/ripdrag/compare/v0.4.0...v0.4.1 Changelog: https://github.com/nik012003/ripdrag/releases/tag/v0.4.1 --- pkgs/tools/misc/ripdrag/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/misc/ripdrag/default.nix b/pkgs/tools/misc/ripdrag/default.nix index b80e9f974d48..1901f47e5505 100644 --- a/pkgs/tools/misc/ripdrag/default.nix +++ b/pkgs/tools/misc/ripdrag/default.nix @@ -1,15 +1,17 @@ -{ lib, rustPlatform, fetchCrate, pkg-config, wrapGAppsHook4, gtk4 }: +{ lib, rustPlatform, fetchFromGitHub, pkg-config, wrapGAppsHook4, gtk4 }: rustPlatform.buildRustPackage rec { pname = "ripdrag"; - version = "0.4.0"; + version = "0.4.1"; - src = fetchCrate { - inherit pname version; - hash = "sha256-9VGvwMovJb1IIpwf+1FxcxnPcmPl+59jfQC6365E95s="; + src = fetchFromGitHub { + owner = "nik012003"; + repo = "ripdrag"; + rev = "v${version}"; + hash = "sha256-Omq5y6ECo+3thhz88IMZJGkRNlAEuMAMbljVKXzxSQc="; }; - cargoHash = "sha256-kxT0wJodPiHXX/bsvrlPbyfUbxPBgmv68a8I5pKOwEg="; + cargoHash = "sha256-NQHFnA/9K8V8sxX9Lzoh6tuKvMmx7FMd8lTTPiQ+xnU="; nativeBuildInputs = [ pkg-config wrapGAppsHook4 ]; @@ -18,6 +20,7 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "An application that lets you drag and drop files from and to the terminal"; homepage = "https://github.com/nik012003/ripdrag"; + changelog = "https://github.com/nik012003/ripdrag/releases/tag/${src.rev}"; license = licenses.gpl3Only; maintainers = with maintainers; [ figsoda ]; }; From 6729fcf0b457bed77bdae316392eff7f1a03218e Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 14 Aug 2023 22:23:34 +0200 Subject: [PATCH 14/45] maintainers/team-list: add GaetanLepage to jupyter team --- maintainers/team-list.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/maintainers/team-list.nix b/maintainers/team-list.nix index 7d6df479d6ed..859eaf9e60a7 100644 --- a/maintainers/team-list.nix +++ b/maintainers/team-list.nix @@ -413,6 +413,7 @@ with lib.maintainers; { jupyter = { members = [ + GaetanLepage natsukium ]; scope = "Maintain Jupyter and related packages."; From 125aaaa2519bb0e25338e4dd4017cd4e844da9a9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 14 Aug 2023 22:33:07 +0200 Subject: [PATCH 15/45] python311Packages.bthome-ble: 3.0.0 -> 3.1.0 Diff: https://github.com/Bluetooth-Devices/bthome-ble/compare/refs/tags/v3.0.0...v3.1.0 Changelog: https://github.com/bluetooth-devices/bthome-ble/blob/v3.1.0/CHANGELOG.md --- pkgs/development/python-modules/bthome-ble/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/bthome-ble/default.nix b/pkgs/development/python-modules/bthome-ble/default.nix index 31774f941983..282f0dc09100 100644 --- a/pkgs/development/python-modules/bthome-ble/default.nix +++ b/pkgs/development/python-modules/bthome-ble/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "bthome-ble"; - version = "3.0.0"; + version = "3.1.0"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -22,7 +22,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = "bthome-ble"; rev = "refs/tags/v${version}"; - hash = "sha256-dLXeJojGeiwPPxXES1qzay1kC/YiI6pKyxKD2z32Av8="; + hash = "sha256-CcLb+2UOLKwfBw3E51LJUZmLqpBw85nLXl1J/oFfEVs="; }; nativeBuildInputs = [ From e48398dfb99cac1bbf7ad4664a39084b771ff3de Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 14 Aug 2023 22:33:52 +0200 Subject: [PATCH 16/45] python311Packages.mypy-boto3-ebs: 1.28.13 -> 1.28.16 --- pkgs/development/python-modules/mypy-boto3-ebs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mypy-boto3-ebs/default.nix b/pkgs/development/python-modules/mypy-boto3-ebs/default.nix index 62b26ff2d21b..56734b6a9d52 100644 --- a/pkgs/development/python-modules/mypy-boto3-ebs/default.nix +++ b/pkgs/development/python-modules/mypy-boto3-ebs/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "mypy-boto3-ebs"; - version = "1.28.13"; + version = "1.28.16"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-GhOEPhx4zD5jXyTMH75DOq0UL4LgOMkJn0U5nKciNMI="; + hash = "sha256-PJkVweQPGGR3NwCpg/O+Cs822XU6awMfUL6wWwT6e0w="; }; propagatedBuildInputs = [ From 144482aebd86aa64335772b2976d5fec29512a82 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 14 Aug 2023 22:38:09 +0200 Subject: [PATCH 17/45] python311Packages.pylitterbot: 2023.4.3 -> 2023.4.4 Diff: https://github.com/natekspencer/pylitterbot/compare/refs/tags/v2023.4.3...v2023.4.4 Changelog: https://github.com/natekspencer/pylitterbot/releases/tag/v2023.4.4 --- pkgs/development/python-modules/pylitterbot/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pylitterbot/default.nix b/pkgs/development/python-modules/pylitterbot/default.nix index 4f70a25afabf..0a8b27e5cbbb 100644 --- a/pkgs/development/python-modules/pylitterbot/default.nix +++ b/pkgs/development/python-modules/pylitterbot/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "pylitterbot"; - version = "2023.4.3"; + version = "2023.4.4"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "natekspencer"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-pUtOLQ4ftG0tYPued12CqKGt3LKyfmLPxIYKvkYg1nI="; + hash = "sha256-Vsnxb597HOu1zHXqZjC3rsjyEQYoSNQcXiArzqOWBUQ="; }; nativeBuildInputs = [ From 89ca95f00b482970ee8bc5f5f9c7febd746bdc31 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 14 Aug 2023 22:39:13 +0200 Subject: [PATCH 18/45] python311Packages.pyschlage: 2023.7.0 -> 2023.8.1 Diff: https://github.com/dknowles2/pyschlage/compare/refs/tags/2023.7.0...2023.8.1 Changelog: https://github.com/dknowles2/pyschlage/releases/tag/2023.8.1 --- pkgs/development/python-modules/pyschlage/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyschlage/default.nix b/pkgs/development/python-modules/pyschlage/default.nix index abc30c72ce84..ff0d39fa7e32 100644 --- a/pkgs/development/python-modules/pyschlage/default.nix +++ b/pkgs/development/python-modules/pyschlage/default.nix @@ -11,7 +11,7 @@ buildPythonPackage rec { pname = "pyschlage"; - version = "2023.7.0"; + version = "2023.8.1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -20,7 +20,7 @@ buildPythonPackage rec { owner = "dknowles2"; repo = "pyschlage"; rev = "refs/tags/${version}"; - hash = "sha256-PH8ClpuYwTu+34hSPPwI1KMFut6UaxWVrbf38LYb9EQ="; + hash = "sha256-PTkuVGUdqRcvgcIL7yoVWNLQcWyDpXXHLxb7CoD8J1s="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; From 64e8ab0cb598bd58163340b932b5ed52303cced4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 14 Aug 2023 22:47:15 +0200 Subject: [PATCH 19/45] python311Packages.twilio: 8.5.0 -> 8.6.0 Diff: https://github.com/twilio/twilio-python/compare/refs/tags/8.5.0...8.6.0 Changelog: https://github.com/twilio/twilio-python/blob/8.6.0/CHANGES.md --- pkgs/development/python-modules/twilio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/twilio/default.nix b/pkgs/development/python-modules/twilio/default.nix index 81b2f1afd141..fadf2ef3818c 100644 --- a/pkgs/development/python-modules/twilio/default.nix +++ b/pkgs/development/python-modules/twilio/default.nix @@ -18,7 +18,7 @@ buildPythonPackage rec { pname = "twilio"; - version = "8.5.0"; + version = "8.6.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -27,7 +27,7 @@ buildPythonPackage rec { owner = "twilio"; repo = "twilio-python"; rev = "refs/tags/${version}"; - hash = "sha256-tU4nyjo1DC7F2UvaV6Hn/Nqxbm8OR1E1qtUGMVgZ8U8="; + hash = "sha256-ATspn/cY9DJahcsesnzwDOCEKYoUbqSoeOR3+kLou0s="; }; propagatedBuildInputs = [ From f445f64207c41c8cb0f6bae31296ac10a561928f Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 7 Aug 2023 21:51:23 -0700 Subject: [PATCH 20/45] libgcc: (re)init at 12.3.0 This commit restores the pkgs/development/libraries/gcc/libgcc package, which was deleted by commit 9818d120be614c478f569c21d4b9d358632e651e. We need to be able to build libgcc separately from gcc in order to avoid a circular dependency. Nixpkgs is unusual -- unlike any other distribution, it cannot tolerate circular dependencies between dynamically linked libraries. Because of this, upstream is extremely unsympathetic to the trouble that the glibc<->gcc circular dependency causes for us; if we don't solve it ourselves it will not be solved. --- .../libraries/gcc/libgcc/default.nix | 156 ++++++++++++++++++ pkgs/top-level/aliases.nix | 1 - pkgs/top-level/all-packages.nix | 4 + 3 files changed, 160 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/gcc/libgcc/default.nix diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix new file mode 100644 index 000000000000..835956055448 --- /dev/null +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -0,0 +1,156 @@ +{ lib, stdenvNoLibs, buildPackages +, gcc, glibc +, libiberty +}: + +stdenvNoLibs.mkDerivation rec { + pname = "libgcc"; + inherit (gcc.cc) src version; + + outputs = [ "out" "dev" ]; + + strictDeps = true; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ libiberty ]; + + postUnpack = '' + mkdir -p ./build + buildRoot=$(readlink -e "./build") + ''; + + postPatch = '' + sourceRoot=$(readlink -e "./libgcc") + ''; + + hardeningDisable = [ "pie" ]; + + preConfigure = '' + cd "$buildRoot" + '' + + # Drop in libiberty, as external builds are not expected + + '' + ( + mkdir -p build-${stdenvNoLibs.buildPlatform.config}/libiberty/ + cd build-${stdenvNoLibs.buildPlatform.config}/libiberty/ + ln -s ${buildPackages.libiberty}/lib/libiberty.a ./ + ) + '' + # A few misc bits of gcc need to be built. + # + # - We "shift" the tools over to fake platforms perspective from the previous + # stage. + # + # - We define GENERATOR_FILE so nothing bothers looking for GNU GMP. + # + # - We remove the `libgcc.mvar` deps so that the bootstrap xgcc isn't built. + + '' + mkdir -p "$buildRoot/gcc" + cd "$buildRoot/gcc" + ( + export AS_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$AS_FOR_BUILD + export CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CC_FOR_BUILD + export CPP_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CPP_FOR_BUILD + export CXX_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CXX_FOR_BUILD + export LD_FOR_BUILD=${buildPackages.stdenv.cc.bintools}/bin/$LD_FOR_BUILD + + export AS=$AS_FOR_BUILD + export CC=$CC_FOR_BUILD + export CPP=$CPP_FOR_BUILD + export CXX=$CXX_FOR_BUILD + export LD=$LD_FOR_BUILD + + export AS_FOR_TARGET=${stdenvNoLibs.cc}/bin/$AS + export CC_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CC + export CPP_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CPP + export LD_FOR_TARGET=${stdenvNoLibs.cc.bintools}/bin/$LD + + export NIX_CFLAGS_COMPILE_FOR_BUILD+=' -DGENERATOR_FILE=1' + + "$sourceRoot/../gcc/configure" $gccConfigureFlags + + sed -e 's,libgcc.mvars:.*$,libgcc.mvars:,' -i Makefile + + make \ + config.h \ + libgcc.mvars \ + tconfig.h \ + tm.h \ + options.h \ + insn-constants.h \ + insn-modes.h + ) + mkdir -p "$buildRoot/gcc/include" + '' + # Preparing to configure + build libgcc itself + + '' + mkdir -p "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" + cd "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" + configureScript=$sourceRoot/configure + chmod +x "$configureScript" + + export AS_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$AS_FOR_BUILD + export CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CC_FOR_BUILD + export CPP_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CPP_FOR_BUILD + export CXX_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CXX_FOR_BUILD + export LD_FOR_BUILD=${buildPackages.stdenv.cc.bintools}/bin/$LD_FOR_BUILD + + export AS=${stdenvNoLibs.cc}/bin/$AS + export CC=${stdenvNoLibs.cc}/bin/$CC + export CPP=${stdenvNoLibs.cc}/bin/$CPP + export CXX=${stdenvNoLibs.cc}/bin/$CXX + export LD=${stdenvNoLibs.cc.bintools}/bin/$LD + + export AS_FOR_TARGET=${stdenvNoLibs.cc}/bin/$AS_FOR_TARGET + export CC_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CC_FOR_TARGET + export CPP_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CPP_FOR_TARGET + export LD_FOR_TARGET=${stdenvNoLibs.cc.bintools}/bin/$LD_FOR_TARGET + ''; + + gccConfigureFlags = [ + "--build=${stdenvNoLibs.buildPlatform.config}" + "--host=${stdenvNoLibs.buildPlatform.config}" + "--target=${stdenvNoLibs.hostPlatform.config}" + + "--disable-bootstrap" + "--disable-multilib" "--with-multilib-list=" + "--enable-languages=c" + + "--disable-fixincludes" + "--disable-intl" + "--disable-lto" + "--disable-libatomic" + "--disable-libbacktrace" + "--disable-libcpp" + "--disable-libssp" + "--disable-libquadmath" + "--disable-libgomp" + "--disable-libvtv" + "--disable-vtable-verify" + + "--with-system-zlib" + ] ++ lib.optional (stdenvNoLibs.hostPlatform.libc == "glibc") + "--with-glibc-version=${glibc.version}"; + + configurePlatforms = [ "build" "host" ]; + configureFlags = [ + "--disable-dependency-tracking" + # $CC cannot link binaries, let alone run then + "cross_compiling=true" + # Do not have dynamic linker without libc + "--enable-static" + "--disable-shared" + + # Avoid dependency on gcc. + "--disable-gcov" + ]; + + makeFlags = [ "MULTIBUILDTOP:=../" ]; + + postInstall = '' + moveToOutput "lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include" "$dev" + mkdir -p "$out/lib" "$dev/include" + ln -s "$out/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}"/* "$out/lib" + ln -s "$dev/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include"/* "$dev/include/" + ''; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 04273984e81d..1dc91abc1938 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -879,7 +879,6 @@ mapAliases ({ liberation_ttf_v1_from_source = throw "'liberation_ttf_v1_from_source' has been renamed to/replaced by 'liberation_ttf_v1'"; # Converted to throw 2022-02-22 liberation_ttf_v2_from_source = throw "'liberation_ttf_v2_from_source' has been renamed to/replaced by 'liberation_ttf_v2'"; # Converted to throw 2022-02-22 liberationsansnarrow = throw "'liberationsansnarrow' has been renamed to/replaced by 'liberation-sans-narrow'"; # Converted to throw 2022-02-22 - libgcc = throw "libgcc was removed, use gcc.cc.libgcc if needed"; # added 2023-05-13 libgksu = throw "libgksu has been removed"; # Added 2022-01-16 libgme = game-music-emu; # Added 2022-07-20 libgnome_keyring = throw "'libgnome_keyring' has been renamed to/replaced by 'libgnome-keyring'"; # Converted to throw 2022-02-22 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1613c7a2f075..1b6f36b8d2af 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18911,6 +18911,10 @@ with pkgs; librarian-puppet-go = callPackage ../development/tools/librarian-puppet-go { }; + libgcc = callPackage ../development/libraries/gcc/libgcc { + stdenvNoLibs = gccStdenvNoLibs; # cannot be built with clang it seems + }; + # This is for e.g. LLVM libraries on linux. gccForLibs = if stdenv.targetPlatform == stdenv.hostPlatform && targetPackages.stdenv.cc.isGNU From fcaa5a7556760d520dc78d99ada5a58fc13c7894 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 01:40:31 -0700 Subject: [PATCH 21/45] libgcc: take from gcc unless explicitly overridden --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b6f36b8d2af..7314a8c9f89a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18911,9 +18911,7 @@ with pkgs; librarian-puppet-go = callPackage ../development/tools/librarian-puppet-go { }; - libgcc = callPackage ../development/libraries/gcc/libgcc { - stdenvNoLibs = gccStdenvNoLibs; # cannot be built with clang it seems - }; + libgcc = stdenv.cc.cc.libgcc or null; # This is for e.g. LLVM libraries on linux. gccForLibs = From 72fa5978fd45925df9e09b829e23bb429250b898 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 01:59:55 -0700 Subject: [PATCH 22/45] libgcc: minor formatting adjustments --- .../libraries/gcc/libgcc/default.nix | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index 835956055448..c505d69d573d 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -24,30 +24,19 @@ stdenvNoLibs.mkDerivation rec { hardeningDisable = [ "pie" ]; - preConfigure = '' - cd "$buildRoot" + preConfigure = '' - - # Drop in libiberty, as external builds are not expected - + '' + # Drop in libiberty, as external builds are not expected + cd "$buildRoot" ( mkdir -p build-${stdenvNoLibs.buildPlatform.config}/libiberty/ cd build-${stdenvNoLibs.buildPlatform.config}/libiberty/ ln -s ${buildPackages.libiberty}/lib/libiberty.a ./ ) - '' - # A few misc bits of gcc need to be built. - # - # - We "shift" the tools over to fake platforms perspective from the previous - # stage. - # - # - We define GENERATOR_FILE so nothing bothers looking for GNU GMP. - # - # - We remove the `libgcc.mvar` deps so that the bootstrap xgcc isn't built. - + '' mkdir -p "$buildRoot/gcc" cd "$buildRoot/gcc" ( + # We "shift" the tools over to fake platforms perspective from the previous stage. export AS_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$AS_FOR_BUILD export CC_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CC_FOR_BUILD export CPP_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CPP_FOR_BUILD @@ -65,10 +54,12 @@ stdenvNoLibs.mkDerivation rec { export CPP_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CPP export LD_FOR_TARGET=${stdenvNoLibs.cc.bintools}/bin/$LD + # We define GENERATOR_FILE so nothing bothers looking for GNU GMP. export NIX_CFLAGS_COMPILE_FOR_BUILD+=' -DGENERATOR_FILE=1' "$sourceRoot/../gcc/configure" $gccConfigureFlags + # We remove the `libgcc.mvar` deps so that the bootstrap xgcc isn't built. sed -e 's,libgcc.mvars:.*$,libgcc.mvars:,' -i Makefile make \ @@ -81,9 +72,8 @@ stdenvNoLibs.mkDerivation rec { insn-modes.h ) mkdir -p "$buildRoot/gcc/include" - '' - # Preparing to configure + build libgcc itself - + '' + + # Preparing to configure + build libgcc itself mkdir -p "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" cd "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" configureScript=$sourceRoot/configure From 2ecf2d954becdd97d78d41d663d0007d72714a5e Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 02:00:33 -0700 Subject: [PATCH 23/45] libgcc: use finalAttrs instead of rec --- pkgs/development/libraries/gcc/libgcc/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index c505d69d573d..be1e3a682579 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -3,7 +3,7 @@ , libiberty }: -stdenvNoLibs.mkDerivation rec { +stdenvNoLibs.mkDerivation (finalAttrs: { pname = "libgcc"; inherit (gcc.cc) src version; @@ -138,9 +138,9 @@ stdenvNoLibs.mkDerivation rec { makeFlags = [ "MULTIBUILDTOP:=../" ]; postInstall = '' - moveToOutput "lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include" "$dev" + moveToOutput "lib/gcc/${stdenvNoLibs.hostPlatform.config}/${finalAttrs.version}/include" "$dev" mkdir -p "$out/lib" "$dev/include" - ln -s "$out/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}"/* "$out/lib" - ln -s "$dev/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${version}/include"/* "$dev/include/" + ln -s "$out/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${finalAttrs.version}"/* "$out/lib" + ln -s "$dev/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${finalAttrs.version}/include"/* "$dev/include/" ''; -} +}) From b5893e70468246bcd0062631c0cde3fc5687b362 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 02:01:43 -0700 Subject: [PATCH 24/45] libgcc: let-float gccConfigureFlags out of the derivation attrs --- .../libraries/gcc/libgcc/default.nix | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index be1e3a682579..382140fd80c5 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -3,7 +3,33 @@ , libiberty }: -stdenvNoLibs.mkDerivation (finalAttrs: { +let + gccConfigureFlags = gcc.cc.configureFlags ++ [ + "--build=${stdenvNoLibs.buildPlatform.config}" + "--host=${stdenvNoLibs.buildPlatform.config}" + "--target=${stdenvNoLibs.hostPlatform.config}" + + "--disable-bootstrap" + "--disable-multilib" "--with-multilib-list=" + "--enable-languages=c" + + "--disable-fixincludes" + "--disable-intl" + "--disable-lto" + "--disable-libatomic" + "--disable-libbacktrace" + "--disable-libcpp" + "--disable-libssp" + "--disable-libquadmath" + "--disable-libgomp" + "--disable-libvtv" + "--disable-vtable-verify" + + "--with-system-zlib" + ] ++ lib.optional (stdenvNoLibs.hostPlatform.libc == "glibc") + "--with-glibc-version=${glibc.version}"; + +in stdenvNoLibs.mkDerivation (finalAttrs: { pname = "libgcc"; inherit (gcc.cc) src version; @@ -57,7 +83,7 @@ stdenvNoLibs.mkDerivation (finalAttrs: { # We define GENERATOR_FILE so nothing bothers looking for GNU GMP. export NIX_CFLAGS_COMPILE_FOR_BUILD+=' -DGENERATOR_FILE=1' - "$sourceRoot/../gcc/configure" $gccConfigureFlags + "$sourceRoot/../gcc/configure" ${lib.concatStringsSep " " gccConfigureFlags} # We remove the `libgcc.mvar` deps so that the bootstrap xgcc isn't built. sed -e 's,libgcc.mvars:.*$,libgcc.mvars:,' -i Makefile @@ -97,31 +123,6 @@ stdenvNoLibs.mkDerivation (finalAttrs: { export LD_FOR_TARGET=${stdenvNoLibs.cc.bintools}/bin/$LD_FOR_TARGET ''; - gccConfigureFlags = [ - "--build=${stdenvNoLibs.buildPlatform.config}" - "--host=${stdenvNoLibs.buildPlatform.config}" - "--target=${stdenvNoLibs.hostPlatform.config}" - - "--disable-bootstrap" - "--disable-multilib" "--with-multilib-list=" - "--enable-languages=c" - - "--disable-fixincludes" - "--disable-intl" - "--disable-lto" - "--disable-libatomic" - "--disable-libbacktrace" - "--disable-libcpp" - "--disable-libssp" - "--disable-libquadmath" - "--disable-libgomp" - "--disable-libvtv" - "--disable-vtable-verify" - - "--with-system-zlib" - ] ++ lib.optional (stdenvNoLibs.hostPlatform.libc == "glibc") - "--with-glibc-version=${glibc.version}"; - configurePlatforms = [ "build" "host" ]; configureFlags = [ "--disable-dependency-tracking" From 383d62d94c31a8094154a4b5346679d204a2f0f8 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 02:02:04 -0700 Subject: [PATCH 25/45] libgcc: add glibc as a buildInput This is necessary in order to prevent gcc from switching on `inhibit_libc`, which cripples the `libgcc_s.so` unwinder. --- pkgs/development/libraries/gcc/libgcc/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index 382140fd80c5..d3f1ce2a27d6 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -38,6 +38,7 @@ in stdenvNoLibs.mkDerivation (finalAttrs: { strictDeps = true; depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ libiberty ]; + buildInputs = [ glibc ]; postUnpack = '' mkdir -p ./build From 92186a49bf72a74e507549669cde90977c977efe Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 14 Aug 2023 02:02:31 -0700 Subject: [PATCH 26/45] gcc: factor out forceLibgccToBuildCrtStuff --- .../compilers/gcc/common/builder.nix | 6 +++ .../gcc/common/libgcc-buildstuff.nix | 37 +++++++++++++++++++ .../compilers/gcc/common/libgcc.nix | 14 +++---- .../compilers/gcc/common/pre-configure.nix | 36 +----------------- 4 files changed, 51 insertions(+), 42 deletions(-) create mode 100644 pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix diff --git a/pkgs/development/compilers/gcc/common/builder.nix b/pkgs/development/compilers/gcc/common/builder.nix index cd8d4572a158..6df4e32ddb76 100644 --- a/pkgs/development/compilers/gcc/common/builder.nix +++ b/pkgs/development/compilers/gcc/common/builder.nix @@ -3,7 +3,13 @@ , enableMultilib }: +let + forceLibgccToBuildCrtStuff = + import ./libgcc-buildstuff.nix { inherit lib stdenv; }; +in + originalAttrs: (stdenv.mkDerivation (finalAttrs: originalAttrs // { + passthru = (originalAttrs.passthru or {}) // { inherit forceLibgccToBuildCrtStuff; }; preUnpack = '' oldOpts="$(shopt -po nounset)" || true set -euo pipefail diff --git a/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix b/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix new file mode 100644 index 000000000000..e7dc570a560c --- /dev/null +++ b/pkgs/development/compilers/gcc/common/libgcc-buildstuff.nix @@ -0,0 +1,37 @@ +{ lib +, stdenv +}: + +# Trick to build a gcc that is capable of emitting shared libraries *without* having the +# targetPlatform libc available beforehand. Taken from: +# https://web.archive.org/web/20170222224855/http://frank.harvard.edu/~coldwell/toolchain/ +# https://web.archive.org/web/20170224235700/http://frank.harvard.edu/~coldwell/toolchain/t-linux.diff +let + # crt{i,n}.o are the first and last (respectively) object file + # linked when producing an executable. Traditionally these + # files are delivered as part of the C library, but on GNU + # systems they are in fact built by GCC. Since libgcc needs to + # build before glibc, we can't wait for them to be copied by + # glibc. At this early pre-glibc stage these files sometimes + # have different names. + crtstuff-ofiles = + if stdenv.targetPlatform.isPower + then "ecrti.o ecrtn.o ncrti.o ncrtn.o" + else "crti.o crtn.o"; + + # Normally, `SHLIB_LC` is set to `-lc`, which means that + # `libgcc_s.so` cannot be built until `libc.so` is available. + # The assignment below clobbers this variable, removing the + # `-lc`. + # + # On PowerPC we add `-mnewlib`, which means "libc has not been + # built yet". This causes libgcc's Makefile to use the + # gcc-built `{e,n}crt{n,i}.o` instead of failing to find the + # versions which have been repackaged in libc as `crt{n,i}.o` + # + SHLIB_LC = lib.optionalString stdenv.targetPlatform.isPower "-mnewlib"; + +in '' + echo 'libgcc.a: ${crtstuff-ofiles}' >> libgcc/Makefile.in + echo 'SHLIB_LC=${SHLIB_LC}' >> libgcc/Makefile.in + '' diff --git a/pkgs/development/compilers/gcc/common/libgcc.nix b/pkgs/development/compilers/gcc/common/libgcc.nix index b14d111e361f..4ab6eb2b3b44 100644 --- a/pkgs/development/compilers/gcc/common/libgcc.nix +++ b/pkgs/development/compilers/gcc/common/libgcc.nix @@ -44,14 +44,14 @@ lib.optional (lib.versionAtLeast version "11.0") !langJit && !stdenv.hostPlatform.isDarwin && enableShared - ; + ; - # For some reason libgcc_s.so has major-version "2" on m68k but - # "1" everywhere else. Might be worth changing this to "*". - libgcc_s-version-major = - if targetPlatform.isM68k - then "2" - else "1"; + # For some reason libgcc_s.so has major-version "2" on m68k but + # "1" everywhere else. Might be worth changing this to "*". + libgcc_s-version-major = + if targetPlatform.isM68k + then "2" + else "1"; in (pkg: pkg.overrideAttrs (previousAttrs: lib.optionalAttrs ((!langC) || langJit || enableLibGccOutput) { diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index 933a132ce4d1..5cb2f186fd1d 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -112,39 +112,5 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' export inhibit_libc=true '' -# Trick to build a gcc that is capable of emitting shared libraries *without* having the -# targetPlatform libc available beforehand. Taken from: -# https://web.archive.org/web/20170222224855/http://frank.harvard.edu/~coldwell/toolchain/ -# https://web.archive.org/web/20170224235700/http://frank.harvard.edu/~coldwell/toolchain/t-linux.diff + lib.optionalString (targetPlatform != hostPlatform && withoutTargetLibc && enableShared) - (let - - # crt{i,n}.o are the first and last (respectively) object file - # linked when producing an executable. Traditionally these - # files are delivered as part of the C library, but on GNU - # systems they are in fact built by GCC. Since libgcc needs to - # build before glibc, we can't wait for them to be copied by - # glibc. At this early pre-glibc stage these files sometimes - # have different names. - crtstuff-ofiles = - if targetPlatform.isPower - then "ecrti.o ecrtn.o ncrti.o ncrtn.o" - else "crti.o crtn.o"; - - # Normally, `SHLIB_LC` is set to `-lc`, which means that - # `libgcc_s.so` cannot be built until `libc.so` is available. - # The assignment below clobbers this variable, removing the - # `-lc`. - # - # On PowerPC we add `-mnewlib`, which means "libc has not been - # built yet". This causes libgcc's Makefile to use the - # gcc-built `{e,n}crt{n,i}.o` instead of failing to find the - # versions which have been repackaged in libc as `crt{n,i}.o` - # - SHLIB_LC = lib.optionalString targetPlatform.isPower "-mnewlib"; - - in '' - echo 'libgcc.a: ${crtstuff-ofiles}' >> libgcc/Makefile.in - echo 'SHLIB_LC=${SHLIB_LC}' >> libgcc/Makefile.in - '') - + (import ./libgcc-buildstuff.nix { inherit lib stdenv; }) From da371c7c5a57a8a34c8bb3ec5336ff97977360de Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 02:02:46 -0700 Subject: [PATCH 27/45] libgcc: use forceLibgccToBuildCrtStuff This duplicates (by reference) the two-line adjustment to libgcc's Makefile needed in order to get crtstuff to build without a full build of gcc. --- pkgs/development/libraries/gcc/libgcc/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index d3f1ce2a27d6..929e7e47f17f 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -45,9 +45,11 @@ in stdenvNoLibs.mkDerivation (finalAttrs: { buildRoot=$(readlink -e "./build") ''; - postPatch = '' - sourceRoot=$(readlink -e "./libgcc") - ''; + postPatch = + gcc.cc.passthru.forceLibgccToBuildCrtStuff + + '' + sourceRoot=$(readlink -e "./libgcc") + ''; hardeningDisable = [ "pie" ]; From fa0ebe80f1e7b3d872b3814bfcb25f991217a5ef Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 02:03:40 -0700 Subject: [PATCH 28/45] libgcc: configureFlags: minimize A lot of these flags were unnecessary. --- pkgs/development/libraries/gcc/libgcc/default.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index 929e7e47f17f..d3d91616f6b6 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -128,15 +128,9 @@ in stdenvNoLibs.mkDerivation (finalAttrs: { configurePlatforms = [ "build" "host" ]; configureFlags = [ - "--disable-dependency-tracking" - # $CC cannot link binaries, let alone run then "cross_compiling=true" - # Do not have dynamic linker without libc - "--enable-static" - "--disable-shared" - - # Avoid dependency on gcc. "--disable-gcov" + "--with-glibc-version=${glibc.version}" ]; makeFlags = [ "MULTIBUILDTOP:=../" ]; From 8c37dae9adf2c73cbd750566fef244398d5f87e9 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 02:04:08 -0700 Subject: [PATCH 29/45] libgcc: gccConfigureFlags: minimize, fix This commit minimizes libgcc's gccConfigureFlags, and -- importantly -- includes the three flags needed in order to prevent `inhibit_libc` from becoming active. --- .../libraries/gcc/libgcc/default.nix | 29 ++++++------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index d3d91616f6b6..dd67c2c28da5 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -5,29 +5,18 @@ let gccConfigureFlags = gcc.cc.configureFlags ++ [ - "--build=${stdenvNoLibs.buildPlatform.config}" - "--host=${stdenvNoLibs.buildPlatform.config}" - "--target=${stdenvNoLibs.hostPlatform.config}" - - "--disable-bootstrap" - "--disable-multilib" "--with-multilib-list=" - "--enable-languages=c" - "--disable-fixincludes" "--disable-intl" - "--disable-lto" - "--disable-libatomic" - "--disable-libbacktrace" - "--disable-libcpp" - "--disable-libssp" - "--disable-libquadmath" - "--disable-libgomp" - "--disable-libvtv" - "--disable-vtable-verify" + "--enable-threads=posix" + "--with-glibc-version=${glibc.version}" - "--with-system-zlib" - ] ++ lib.optional (stdenvNoLibs.hostPlatform.libc == "glibc") - "--with-glibc-version=${glibc.version}"; + # these are required in order to prevent inhibit_libc=true, + # which will cripple libgcc's unwinder; see: + # https://github.com/NixOS/nixpkgs/issues/213453#issuecomment-1616346163 + "--with-headers=${lib.getDev glibc}/include" + "--with-native-system-header-dir=${lib.getDev glibc}${glibc.incdir or "/include"}" + "--with-build-sysroot=/" + ]; in stdenvNoLibs.mkDerivation (finalAttrs: { pname = "libgcc"; From 17ce8682d67de1977c0a9bc1ef9258a905aa5a1c Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 14 Aug 2023 02:05:16 -0700 Subject: [PATCH 30/45] libgcc: let-rename stdenvNoLibs to stdenv --- .../libraries/gcc/libgcc/default.nix | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index dd67c2c28da5..e3ae86d21eef 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -4,6 +4,7 @@ }: let + stdenv = stdenvNoLibs; gccConfigureFlags = gcc.cc.configureFlags ++ [ "--disable-fixincludes" "--disable-intl" @@ -18,7 +19,7 @@ let "--with-build-sysroot=/" ]; -in stdenvNoLibs.mkDerivation (finalAttrs: { +in stdenv.mkDerivation (finalAttrs: { pname = "libgcc"; inherit (gcc.cc) src version; @@ -47,8 +48,8 @@ in stdenvNoLibs.mkDerivation (finalAttrs: { # Drop in libiberty, as external builds are not expected cd "$buildRoot" ( - mkdir -p build-${stdenvNoLibs.buildPlatform.config}/libiberty/ - cd build-${stdenvNoLibs.buildPlatform.config}/libiberty/ + mkdir -p build-${stdenv.buildPlatform.config}/libiberty/ + cd build-${stdenv.buildPlatform.config}/libiberty/ ln -s ${buildPackages.libiberty}/lib/libiberty.a ./ ) mkdir -p "$buildRoot/gcc" @@ -67,10 +68,10 @@ in stdenvNoLibs.mkDerivation (finalAttrs: { export CXX=$CXX_FOR_BUILD export LD=$LD_FOR_BUILD - export AS_FOR_TARGET=${stdenvNoLibs.cc}/bin/$AS - export CC_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CC - export CPP_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CPP - export LD_FOR_TARGET=${stdenvNoLibs.cc.bintools}/bin/$LD + export AS_FOR_TARGET=${stdenv.cc}/bin/$AS + export CC_FOR_TARGET=${stdenv.cc}/bin/$CC + export CPP_FOR_TARGET=${stdenv.cc}/bin/$CPP + export LD_FOR_TARGET=${stdenv.cc.bintools}/bin/$LD # We define GENERATOR_FILE so nothing bothers looking for GNU GMP. export NIX_CFLAGS_COMPILE_FOR_BUILD+=' -DGENERATOR_FILE=1' @@ -92,8 +93,8 @@ in stdenvNoLibs.mkDerivation (finalAttrs: { mkdir -p "$buildRoot/gcc/include" # Preparing to configure + build libgcc itself - mkdir -p "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" - cd "$buildRoot/gcc/${stdenvNoLibs.hostPlatform.config}/libgcc" + mkdir -p "$buildRoot/gcc/${stdenv.hostPlatform.config}/libgcc" + cd "$buildRoot/gcc/${stdenv.hostPlatform.config}/libgcc" configureScript=$sourceRoot/configure chmod +x "$configureScript" @@ -103,16 +104,16 @@ in stdenvNoLibs.mkDerivation (finalAttrs: { export CXX_FOR_BUILD=${buildPackages.stdenv.cc}/bin/$CXX_FOR_BUILD export LD_FOR_BUILD=${buildPackages.stdenv.cc.bintools}/bin/$LD_FOR_BUILD - export AS=${stdenvNoLibs.cc}/bin/$AS - export CC=${stdenvNoLibs.cc}/bin/$CC - export CPP=${stdenvNoLibs.cc}/bin/$CPP - export CXX=${stdenvNoLibs.cc}/bin/$CXX - export LD=${stdenvNoLibs.cc.bintools}/bin/$LD + export AS=${stdenv.cc}/bin/$AS + export CC=${stdenv.cc}/bin/$CC + export CPP=${stdenv.cc}/bin/$CPP + export CXX=${stdenv.cc}/bin/$CXX + export LD=${stdenv.cc.bintools}/bin/$LD - export AS_FOR_TARGET=${stdenvNoLibs.cc}/bin/$AS_FOR_TARGET - export CC_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CC_FOR_TARGET - export CPP_FOR_TARGET=${stdenvNoLibs.cc}/bin/$CPP_FOR_TARGET - export LD_FOR_TARGET=${stdenvNoLibs.cc.bintools}/bin/$LD_FOR_TARGET + export AS_FOR_TARGET=${stdenv.cc}/bin/$AS_FOR_TARGET + export CC_FOR_TARGET=${stdenv.cc}/bin/$CC_FOR_TARGET + export CPP_FOR_TARGET=${stdenv.cc}/bin/$CPP_FOR_TARGET + export LD_FOR_TARGET=${stdenv.cc.bintools}/bin/$LD_FOR_TARGET ''; configurePlatforms = [ "build" "host" ]; @@ -125,9 +126,9 @@ in stdenvNoLibs.mkDerivation (finalAttrs: { makeFlags = [ "MULTIBUILDTOP:=../" ]; postInstall = '' - moveToOutput "lib/gcc/${stdenvNoLibs.hostPlatform.config}/${finalAttrs.version}/include" "$dev" + moveToOutput "lib/gcc/${stdenv.hostPlatform.config}/${finalAttrs.version}/include" "$dev" mkdir -p "$out/lib" "$dev/include" - ln -s "$out/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${finalAttrs.version}"/* "$out/lib" - ln -s "$dev/lib/gcc/${stdenvNoLibs.hostPlatform.config}/${finalAttrs.version}/include"/* "$dev/include/" + ln -s "$out/lib/gcc/${stdenv.hostPlatform.config}/${finalAttrs.version}"/* "$out/lib" + ln -s "$dev/lib/gcc/${stdenv.hostPlatform.config}/${finalAttrs.version}/include"/* "$dev/include/" ''; }) From c0e4121ba537c10ef0a5132777bb35ae94735658 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 14 Aug 2023 02:04:39 -0700 Subject: [PATCH 31/45] libgcc: make needed architecture-specific targets if isM68k --- pkgs/development/libraries/gcc/libgcc/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index e3ae86d21eef..afc42bccfb53 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -88,6 +88,9 @@ in stdenv.mkDerivation (finalAttrs: { tm.h \ options.h \ insn-constants.h \ + '' + lib.optionalString stdenv.targetPlatform.isM68k '' + sysroot-suffix.h \ + '' + '' insn-modes.h ) mkdir -p "$buildRoot/gcc/include" From 18c52d09bcd6c60bc60db81fe1a37d7663acaf27 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 14 Aug 2023 13:34:42 -0700 Subject: [PATCH 32/45] libgcc: make needed architecture-specific targets if isArmv7 --- pkgs/development/libraries/gcc/libgcc/default.nix | 3 +++ pkgs/test/cross/default.nix | 1 + 2 files changed, 4 insertions(+) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix index afc42bccfb53..e2fbf55876fa 100644 --- a/pkgs/development/libraries/gcc/libgcc/default.nix +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -90,6 +90,9 @@ in stdenv.mkDerivation (finalAttrs: { insn-constants.h \ '' + lib.optionalString stdenv.targetPlatform.isM68k '' sysroot-suffix.h \ + '' + lib.optionalString stdenv.targetPlatform.isArmv7 '' + arm-isa.h \ + arm-cpu.h \ '' + '' insn-modes.h ) diff --git a/pkgs/test/cross/default.nix b/pkgs/test/cross/default.nix index 46bb3c8d522d..0b037b6057ec 100644 --- a/pkgs/test/cross/default.nix +++ b/pkgs/test/cross/default.nix @@ -134,6 +134,7 @@ let pkgs.pkgsLLVM.stdenv pkgs.pkgsStatic.bash pkgs.pkgsCross.arm-embedded.stdenv + pkgs.pkgsCross.armv7l-hf-multiplatform.stdenv pkgs.pkgsCross.m68k.stdenv pkgs.pkgsCross.aarch64-multiplatform.pkgsBuildTarget.gcc pkgs.pkgsCross.powernv.pkgsBuildTarget.gcc From 64046f019103677f9539b303bf7be0f9be12d29f Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Mon, 7 Aug 2023 21:50:24 -0700 Subject: [PATCH 33/45] glibcCross: use a libgcc built separately from gcc ### Summary This PR completely and finally solves the gcc<->glibc circular `buildInputs` problem, for cross compilation. The same technique can be applied to native builds in the future. Closes #213453 ### Motivation Prior to this PR, we had the following circular `buildInputs` problem: 1. gcc has glibc in its `buildInputs` - a compiled copy of glibc must be present before building gcc; if it isn't, gcc cripples itself (`inhibit_libc`) and refuses to build libgcc_s.so 2. glibc has libgcc_s.so in its `buildInputs` - glibc `dlopen()`s libgcc_s.so in order to implement POSIX thread cancellation. For security reasons `glibc` requires that the path to `libgcc_s.so` is [hardwired] into `glibc` at compile time, so it's technically not a true dynamic link -- it just pretends to be one. 3. libgcc_s.so is built in the same derivation as gcc - libgcc_s.so is built as part of the gcc build process We must cut one of these three links in the loop. ### Previous Attempts Previously https://github.com/NixOS/nixpkgs/pull/238154 had attempted to cut link (1) by building `gcc` without `glibc`, and using the `libgcc_s` which emerges from that build. Unfortunately this just doesn't work. GCC's configure script extracts quite a lot of information from the glibc headers (which are a build artifact -- you can't just copy them out of the source tarball) and various `./configure`-driven linking attempts. If `glibc` isn't around at build time you wind up with a `libgcc_s.so` that is missing various unwinder features (see https://github.com/NixOS/nixpkgs/issues/213453 for the most problematic one). Musl "cuts" link (2), or rather never creates it in the first place. ["Cancellation cleanup handling in musl has no relationship to C++ exceptions and unwinding... glibc implements cancellation as an exception"](https://wiki.musl-libc.org/functional-differences-from-glibc.html#Thread-cancellation). IMHO Musl made the smarter decision here. It is incredibly rare to find a codebase that uses both POSIX thread cancellation *and* C++ exceptions. I have never seen a codebase that uses both *and* expects them to be aware of each other, and I would be astonished if one existed. Glibc paid an immense cost in complexity for something nobody has ever used. ### Changes Made This PR cuts link (3): instead of building libgcc_s.so as part of gcc, we build it separately from gcc. Now there is a strict acyclic graph of `buildInputs`: ``` gccWithoutTargetLibc | +--->glibc-nolibgcc | | | v +--->libgcc | | | v +--->glibc | | | v +--->gcc ``` In other words, there's a simple linear `buildInputs` chain `glibc-nolibgcc` `->` `libgcc` `->` `glibc` `->` `gcc` where all four packages are compiled by (and therefore have as a `(native)BuildInput`) `gccWithoutTargetLibc`. `gccWithoutTargetLibc` and `glibc-nolibgcc` are strictly bootstrapping artifacts; nothing else has them as a `buildInput` and they shouldn't appear in the closure of any final deployment packages. `glibc-nolibgcc` lacks `libgcc_s.so`, so it will segfault if you try to use it with POSIX thread cancellation. Fortunately all we need from it is (a) its headers (`lib.getDev`) and (b) to use it in the `./configure` script for `libgcc`. When translated over to the native bootstrap, `xgcc` takes the place of `gccWithoutTargetLibc`, and the "first `glibc`" (we build two of them) takes the place of `glibc-nolibgcc`. At that point our native and cross bootstrap have the same overall architecture, and it becomes possible to merge them (at last!) [213453]: https://github.com/NixOS/nixpkgs/issues/213453 [238154]: https://github.com/NixOS/nixpkgs/pull/238154 [hardwired]: https://github.com/NixOS/nixpkgs/blob/7553d0fe29801938bcb280bb324b579ef9016aea/pkgs/development/libraries/glibc/default.nix#L69-L88 --- pkgs/development/libraries/glibc/default.nix | 11 ++++++----- pkgs/top-level/all-packages.nix | 5 +++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 0f6cad157bb7..1c822bf1ed01 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -4,6 +4,7 @@ , withGd ? false , withLibcrypt? false , buildPackages +, libgcc }: let @@ -16,7 +17,7 @@ in (callPackage ./common.nix { inherit stdenv; } { inherit withLinuxHeaders withGd profilingLibraries withLibcrypt; - pname = "glibc" + lib.optionalString withGd "-gd"; + pname = "glibc" + lib.optionalString withGd "-gd" + lib.optionalString (stdenv.cc.isGNU && libgcc==null) "-nolibgcc"; }).overrideAttrs(previousAttrs: { # Note: @@ -90,8 +91,8 @@ in # makeFlags = (previousAttrs.makeFlags or []) - ++ lib.optionals (stdenv.cc.cc?libgcc) [ - "user-defined-trusted-dirs=${stdenv.cc.cc.libgcc}/lib" + ++ lib.optionals (libgcc != null) [ + "user-defined-trusted-dirs=${libgcc}/lib" ]; postInstall = previousAttrs.postInstall + (if stdenv.hostPlatform == stdenv.buildPlatform then '' @@ -166,8 +167,8 @@ in passthru = (previousAttrs.passthru or {}) - // lib.optionalAttrs (stdenv.cc.cc?libgcc) { - inherit (stdenv.cc.cc) libgcc; + // lib.optionalAttrs (libgcc != null) { + inherit libgcc; }; meta = (previousAttrs.meta or {}) // { description = "The GNU C Library"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7314a8c9f89a..44d90dd9c575 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21439,6 +21439,11 @@ with pkgs; # Being redundant to avoid cycles on boot. TODO: find a better way glibcCross = callPackage ../development/libraries/glibc { stdenv = gccCrossLibcStdenv; # doesn't compile without gcc + libgcc = callPackage ../development/libraries/gcc/libgcc { + gcc = gccCrossLibcStdenv.cc; + glibc = glibcCross.override { libgcc = null; }; + stdenvNoLibs = gccCrossLibcStdenv; + }; }; muslCross = musl.override { From 1912681314d415cc28e25b7932d9e88dfec75cd3 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 8 Aug 2023 02:06:04 -0700 Subject: [PATCH 34/45] tests.cross.sanity: enable mbuffer test This test passes now. Also fixes a minor oversight in the bug -- the test case needs to `touch $out` on success. --- pkgs/test/cross/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/test/cross/default.nix b/pkgs/test/cross/default.nix index 0b037b6057ec..d6fd8d3b1f80 100644 --- a/pkgs/test/cross/default.nix +++ b/pkgs/test/cross/default.nix @@ -115,6 +115,7 @@ let in pkgs.runCommand "test-mbuffer" {} '' echo hello | ${emulator} ${mbuffer}/bin/mbuffer + touch $out ''; # This is meant to be a carefully curated list of builds/packages @@ -127,7 +128,7 @@ let # of things that often break. So, no buckshot `mapTestOnCross` # calls here. sanity = [ - #pkgs.mbuffer # https://github.com/NixOS/nixpkgs/issues/213453 + mbuffer #pkgs.pkgsCross.gnu64.bash # https://github.com/NixOS/nixpkgs/issues/243164 pkgs.gcc_multi.cc pkgs.pkgsMusl.stdenv From 1fbf8cf3ba911af53495f098ccb54ebc581a9cff Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 14 Aug 2023 22:40:22 +0000 Subject: [PATCH 35/45] checkov: 2.3.364 -> 2.3.365 Diff: https://github.com/bridgecrewio/checkov/compare/refs/tags/2.3.364...2.3.365 Changelog: https://github.com/bridgecrewio/checkov/releases/tag/2.3.365 --- pkgs/development/tools/analysis/checkov/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index e55c4d66e6ef..a9b99927693a 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -22,14 +22,14 @@ with py.pkgs; buildPythonApplication rec { pname = "checkov"; - version = "2.3.364"; + version = "2.3.365"; format = "setuptools"; src = fetchFromGitHub { owner = "bridgecrewio"; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-pec8JLFLqhe75G2Tk/3EwGYr9Dg2xgT8MlVS471QH60="; + hash = "sha256-shJfqslstZIQ7W0GBV75M2ekxpb1/sIqbFDrL74Zpp4="; }; patches = [ From bdc5b90b324688f21c99ac6853d97f4dcc7be10e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 14 Aug 2023 22:45:41 +0000 Subject: [PATCH 36/45] python311Packages.reolink-aio: 0.7.6 -> 0.7.7 Diff: https://github.com/starkillerOG/reolink_aio/compare/refs/tags/0.7.6...0.7.7 Changelog: https://github.com/starkillerOG/reolink_aio/releases/tag/0.7.7 --- pkgs/development/python-modules/reolink-aio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/reolink-aio/default.nix b/pkgs/development/python-modules/reolink-aio/default.nix index ee631bf221c1..8fd5cb699021 100644 --- a/pkgs/development/python-modules/reolink-aio/default.nix +++ b/pkgs/development/python-modules/reolink-aio/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "reolink-aio"; - version = "0.7.6"; + version = "0.7.7"; format = "setuptools"; disabled = pythonOlder "3.9"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "starkillerOG"; repo = "reolink_aio"; rev = "refs/tags/${version}"; - hash = "sha256-muxM9+3D8WL2muw5yxbYKmbkVc5lTcj9XQOr67hb/pU="; + hash = "sha256-RlnUROCCYBIgxwnORaG5pxo9Npq80LvVGhmj29tPXN8="; }; postPatch = '' From e543e81fae539c68e89431d82d2ff6ef26210dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Federico=20Dami=C3=A1n=20Schonborn?= Date: Mon, 14 Aug 2023 20:51:37 -0300 Subject: [PATCH 37/45] budgie.budgie-backgrounds: 1.0 -> 2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Federico Damián Schonborn --- pkgs/desktops/budgie/budgie-backgrounds/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkgs/desktops/budgie/budgie-backgrounds/default.nix b/pkgs/desktops/budgie/budgie-backgrounds/default.nix index 37e3b231aa2c..989908916689 100644 --- a/pkgs/desktops/budgie/budgie-backgrounds/default.nix +++ b/pkgs/desktops/budgie/budgie-backgrounds/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "budgie-backgrounds"; - version = "1.0"; + version = "2.0"; src = fetchFromGitHub { owner = "BuddiesOfBudgie"; repo = "budgie-backgrounds"; rev = "v${version}"; - hash = "sha256-TdtgOYHO2QH4W2jWBuAzYQwxwAPya2lC3VrIi7kvi+M="; + hash = "sha256-L6y9YVS0NFsycS90AmUJJd9HFMJ/Ge99pI426tC05jA="; }; nativeBuildInputs = [ @@ -25,11 +25,6 @@ stdenv.mkDerivation rec { ninja ]; - preConfigure = '' - chmod +x ./scripts/optimizeImage.sh - patchShebangs ./scripts/optimizeImage.sh - ''; - meta = with lib; { description = "The default background set for the Budgie Desktop"; homepage = "https://github.com/BuddiesOfBudgie/budgie-backgrounds"; From 79118350b0eb4943c1a97cdb38efc6bad930cffb Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Aug 2023 00:09:47 +0000 Subject: [PATCH 38/45] python311Packages.types-ujson: 5.8.0.0 -> 5.8.0.1 --- pkgs/development/python-modules/types-ujson/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/types-ujson/default.nix b/pkgs/development/python-modules/types-ujson/default.nix index 45737880fe24..8819dec4220e 100644 --- a/pkgs/development/python-modules/types-ujson/default.nix +++ b/pkgs/development/python-modules/types-ujson/default.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "types-ujson"; - version = "5.8.0.0"; + version = "5.8.0.1"; format = "setuptools"; src = fetchPypi { inherit pname version; - hash = "sha256-KFao0Ig0db7IDBrHcsAG6mkSFcxV3tIWR7XIfIYknLs="; + hash = "sha256-KxQ4gkirTNH176jEZHYREll8zVfA2EI49zYxq+DiDP0="; }; doCheck = false; From 2af24d44177b851b92f12697455071ee74ff4cc6 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 15 Aug 2023 08:14:08 +0800 Subject: [PATCH 39/45] nixos/fcitx5: fix evaluation --- nixos/modules/i18n/input-method/fcitx5.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/i18n/input-method/fcitx5.nix b/nixos/modules/i18n/input-method/fcitx5.nix index 36022b2af824..3d52c08888ea 100644 --- a/nixos/modules/i18n/input-method/fcitx5.nix +++ b/nixos/modules/i18n/input-method/fcitx5.nix @@ -107,14 +107,14 @@ in }; in lib.attrsets.mergeAttrsList [ - (optionalFile "config" (lib.generators.toINI { }) sts.globalOptions) - (optionalFile "profile" (lib.generators.toINI { }) sts.inputMethod) + (optionalFile "config" (lib.generators.toINI { }) cfg.settings.globalOptions) + (optionalFile "profile" (lib.generators.toINI { }) cfg.settings.inputMethod) (lib.concatMapAttrs (name: value: optionalFile "conf/${name}.conf" (lib.generators.toINIWithGlobalSection { }) value) - sts.addons) + cfg.settings.addons) ]; environment.variables = { From fecb8c7752d3f88eb5d83a0b0f24dccb09c8d897 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 15 Aug 2023 08:36:07 +0800 Subject: [PATCH 40/45] nixosTests.fcitx5: make use of the newly added settings option --- nixos/tests/fcitx5/config | 11 -------- nixos/tests/fcitx5/default.nix | 47 ++++++++++++++++++++++++++-------- nixos/tests/fcitx5/profile | 27 ------------------- 3 files changed, 37 insertions(+), 48 deletions(-) delete mode 100644 nixos/tests/fcitx5/config delete mode 100644 nixos/tests/fcitx5/profile diff --git a/nixos/tests/fcitx5/config b/nixos/tests/fcitx5/config deleted file mode 100644 index cf4334639f1c..000000000000 --- a/nixos/tests/fcitx5/config +++ /dev/null @@ -1,11 +0,0 @@ -[Hotkey] -EnumerateSkipFirst=False - -[Hotkey/TriggerKeys] -0=Control+space - -[Hotkey/EnumerateForwardKeys] -0=Alt+Shift_L - -[Hotkey/EnumerateBackwardKeys] -0=Alt+Shift_R diff --git a/nixos/tests/fcitx5/default.nix b/nixos/tests/fcitx5/default.nix index 9b000da48eaf..c113f2e2c052 100644 --- a/nixos/tests/fcitx5/default.nix +++ b/nixos/tests/fcitx5/default.nix @@ -36,6 +36,43 @@ rec { pkgs.fcitx5-m17n pkgs.fcitx5-mozc ]; + fcitx5.settings = { + globalOptions = { + "Hotkey"."EnumerateSkipFirst" = "False"; + "Hotkey/TriggerKeys"."0" = "Control+space"; + "Hotkey/EnumerateForwardKeys"."0" = "Alt+Shift_L"; + "Hotkey/EnumerateBackwardKeys"."0" = "Alt+Shift_R"; + }; + inputMethod = { + "GroupOrder" = { + "0" = "NixOS_test"; + }; + "Groups/0" = { + "Default Layout" = "us"; + "DefaultIM" = "wbx"; + "Name" = "NixOS_test"; + }; + "Groups/0/Items/0" = { + "Name" = "keyboard-us"; + }; + "Groups/0/Items/1" = { + "Layout" = "us"; + "Name" = "wbx"; + }; + "Groups/0/Items/2" = { + "Layout" = "us"; + "Name" = "hangul"; + }; + "Groups/0/Items/3" = { + "Layout" = "us"; + "Name" = "m17n_sa_harvard-kyoto"; + }; + "Groups/0/Items/4" = { + "Layout" = "us"; + "Name" = "mozc"; + }; + }; + }; }; }; @@ -43,7 +80,6 @@ rec { let user = nodes.machine.users.users.alice; xauth = "${user.home}/.Xauthority"; - fcitx_confdir = "${user.home}/.config/fcitx5"; in '' start_all() @@ -56,15 +92,6 @@ rec { machine.succeed("su - ${user.name} -c 'kill $(pgrep fcitx5)'") machine.sleep(1) - machine.copy_from_host( - "${./profile}", - "${fcitx_confdir}/profile", - ) - machine.copy_from_host( - "${./config}", - "${fcitx_confdir}/config", - ) - machine.succeed("su - ${user.name} -c 'alacritty >&2 &'") machine.succeed("su - ${user.name} -c 'fcitx5 >&2 &'") machine.sleep(10) diff --git a/nixos/tests/fcitx5/profile b/nixos/tests/fcitx5/profile deleted file mode 100644 index 1b48c634e0eb..000000000000 --- a/nixos/tests/fcitx5/profile +++ /dev/null @@ -1,27 +0,0 @@ -[Groups/0] -Name=NixOS_test -Default Layout=us -DefaultIM=wbx - -[Groups/0/Items/0] -Name=keyboard-us -Layout= - -[Groups/0/Items/1] -Name=wbx -Layout=us - -[Groups/0/Items/2] -Name=hangul -Layout=us - -[Groups/0/Items/3] -Name=m17n_sa_harvard-kyoto -Layout=us - -[Groups/0/Items/4] -Name=mozc -Layout=us - -[GroupOrder] -0=NixOS_test From 790f188d604144270b42e96d700e24066cc461a1 Mon Sep 17 00:00:00 2001 From: ayes-web Date: Sat, 22 Jul 2023 19:54:47 +0300 Subject: [PATCH 41/45] duperemove: 0.11.3 -> 0.12 --- pkgs/tools/filesystems/duperemove/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/duperemove/default.nix b/pkgs/tools/filesystems/duperemove/default.nix index 2bdcc811db0f..0bf0f77880fe 100644 --- a/pkgs/tools/filesystems/duperemove/default.nix +++ b/pkgs/tools/filesystems/duperemove/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "duperemove"; - version = "0.11.3"; + version = "0.12"; src = fetchFromGitHub { owner = "markfasheh"; repo = "duperemove"; rev = "v${version}"; - sha256 = "sha256-WjUM52IqMDvBzeGHo7p4JcvMO5iPWPVOr8GJ3RSsnUs="; + hash = "sha256-VPwcWAENCRnU51F78FhMPjQZaCTewQRUdeFwK1blJbs="; }; postPatch = '' From 810ec794359b1aa7439b337796a8d364b92b9b4e Mon Sep 17 00:00:00 2001 From: Ludovico Piero Date: Mon, 14 Aug 2023 20:37:26 +1000 Subject: [PATCH 42/45] armcord: 3.2.1 -> 3.2.3 --- .../networking/instant-messengers/armcord/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/armcord/default.nix b/pkgs/applications/networking/instant-messengers/armcord/default.nix index 82da4dedc943..d5f8b3aa9da2 100644 --- a/pkgs/applications/networking/instant-messengers/armcord/default.nix +++ b/pkgs/applications/networking/instant-messengers/armcord/default.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { pname = "armcord"; - version = "3.2.1"; + version = "3.2.3"; src = let @@ -48,11 +48,11 @@ stdenv.mkDerivation rec { { x86_64-linux = fetchurl { url = "${base}/v${version}/ArmCord_${version}_amd64.deb"; - sha256 = "1cfbypn9kh566s09c1bvxswpc0r11pmsvxlh4dixd5s622ia3h7r"; + hash = "sha256-d8Xv9ecXxkUAIqCS82VKlLNne56hESYvYtSDvNvGul0="; }; aarch64-linux = fetchurl { url = "${base}/v${version}/ArmCord_${version}_arm64.deb"; - sha256 = "0mb6az0mzjz2zal7igigjcigg3phn2ijfw04igpl7q2rg6ha3z00"; + hash = "sha256-yqZ4hl+E4IEEEuKhfyDYY1Lyz5/Nekrf8uxoJr1B8w8="; }; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); @@ -131,7 +131,8 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Lightweight, alternative desktop client for Discord"; - homepage = "https://github.com/ArmCord/ArmCord"; + homepage = "https://armcord.app"; + downloadPage = "https://github.com/ArmCord/ArmCord"; sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.osl3; maintainers = with maintainers; [ wrmilling ]; From ea95c0917609e5c48023cc7c6141bea2fdf13970 Mon Sep 17 00:00:00 2001 From: happysalada Date: Tue, 15 Aug 2023 00:07:16 +0800 Subject: [PATCH 43/45] nltk-data: init at unstable-2023-02-02 --- pkgs/tools/text/nltk_data/default.nix | 50 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 52 insertions(+) create mode 100644 pkgs/tools/text/nltk_data/default.nix diff --git a/pkgs/tools/text/nltk_data/default.nix b/pkgs/tools/text/nltk_data/default.nix new file mode 100644 index 000000000000..1e2d803a21ce --- /dev/null +++ b/pkgs/tools/text/nltk_data/default.nix @@ -0,0 +1,50 @@ +{ lib, newScope, fetchFromGitHub, unzip, stdenvNoCC }: +let + base = { + version = "unstable-2023-02-02"; + nativeBuildInputs = [ unzip ]; + dontBuild = true; + meta = with lib; { + description = "NLTK Data"; + homepage = "https://github.com/nltk/nltk_data"; + license = licenses.asl20; + platforms = platforms.all; + maintainers = with maintainers; [ happysalada ]; + }; + }; + makeNltkDataPackage = {pname, location, hash}: + let + src = fetchFromGitHub { + owner = "nltk"; + repo = "nltk_data"; + rev = "5db857e6f7df11eabb5e5665836db9ec8df07e28"; + inherit hash; + sparseCheckout = [ "${location}/${pname}.zip" ]; + }; + in + stdenvNoCC.mkDerivation (base // { + inherit pname src; + version = base.version; + installPhase = '' + runHook preInstall + + mkdir -p $out + unzip ${src}/${location}/${pname}.zip + cp -R ${pname}/ $out/ + + runHook postInstall + ''; + }); +in +lib.makeScope newScope (self: { + punkt = makeNltkDataPackage ({ + pname = "punkt"; + location = "packages/tokenizers"; + hash = "sha256-rMkgn3xzmSJNv8//kqbPF2Xq3Gf16lgA1Wx8FPYbaQo="; + }); + averaged_perceptron_tagger = makeNltkDataPackage ({ + pname = "averaged_perceptron_tagger"; + location = "packages/taggers"; + hash = "sha256-ilTs4HWPUoHxQb4kWEy3wJ6QsE/98+EQya44gtV2inw="; + }); +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0ce71f677689..93af8d9b6834 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5971,6 +5971,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + nltk-data = callPackage ../tools/text/nltk_data { }; + nodepy-runtime = with python3.pkgs; toPythonApplication nodepy-runtime; nixpkgs-pytools = with python3.pkgs; toPythonApplication nixpkgs-pytools; From d2a462ababf64b2f4f36267eb1ed1e3749fb2fde Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 15 Aug 2023 03:32:56 +0000 Subject: [PATCH 44/45] python310Packages.mashumaro: 3.8.1 -> 3.9 --- pkgs/development/python-modules/mashumaro/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/mashumaro/default.nix b/pkgs/development/python-modules/mashumaro/default.nix index f7c47b25401e..13bee5c38958 100644 --- a/pkgs/development/python-modules/mashumaro/default.nix +++ b/pkgs/development/python-modules/mashumaro/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "mashumaro"; - version = "3.8.1"; + version = "3.9"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "Fatal1ty"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-WDKohmcdVlQR/6AMSISN0y6UQx4tmOf1fANCPLRYiqI="; + hash = "sha256-oH44poFVnoM831dJuA9KcHCsuW6gh5B2EHrnKwza6A4="; }; nativeBuildInputs = [ From 2501addf2d61a3052128659883fee33435edd669 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Sun, 13 Aug 2023 16:49:04 -0700 Subject: [PATCH 45/45] nix-doc: 0.5.9 -> 0.5.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes https://github.com/NixOS/nixpkgs/issues/237637 and its entire class of problems by making nix-doc save the version it was built for in the library and then bail harmlessly if it is mismatched. ``` dev/nixpkgs2 » nix-build -A nix-doc /nix/store/wv9nm47lplyz4b0pa4549zwrnsp3zvaf-nix-doc-0.5.10 dev/nixpkgs2 » nix-build -A nixVersions.nix_2_14 -o result2 /nix/store/ka0ygdzl9jd0j77y7ls6shngdz9vvqpn-nix-2.14.1 dev/nixpkgs2 » ./result2/bin/nix --plugin-files ./result/lib/libnix_doc_plugin.so repl nix-doc warning: mismatched nix version, not loading Welcome to Nix 2.14.1. Type :? for help. nix-repl> ``` --- .../package-management/nix-doc/default.nix | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/package-management/nix-doc/default.nix b/pkgs/tools/package-management/nix-doc/default.nix index ba5da3595657..f3983b0cd760 100644 --- a/pkgs/tools/package-management/nix-doc/default.nix +++ b/pkgs/tools/package-management/nix-doc/default.nix @@ -1,14 +1,14 @@ -{ lib, rustPlatform, fetchFromGitHub, boost, nix, pkg-config }: +{ lib, stdenv, rustPlatform, fetchFromGitHub, boost, nix, pkg-config }: rustPlatform.buildRustPackage rec { pname = "nix-doc"; - version = "0.5.9"; + version = "0.5.10"; src = fetchFromGitHub { rev = "v${version}"; owner = "lf-"; repo = "nix-doc"; - sha256 = "sha256-uilVJz1MnMF3i/ZXY0bIoSK3uAzfxWuHfhoOSmQgY/I="; + sha256 = "sha256-+T4Bz26roTFiXTM8P8FnJLSdFY2hP26X4nChWWUACN8="; }; doCheck = true; @@ -16,7 +16,20 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config nix ]; - cargoSha256 = "sha256-02noJcbtml4MxRCjaWtjOWLTUNOQnKy3GCsil31J6F8="; + # Packaging support for making the nix-doc plugin load cleanly as a no-op on + # the wrong Nix version (disabling bindnow permits loading libraries + # requiring unavailable symbols if they are unreached) + hardeningDisable = [ "bindnow" ]; + # Due to a Rust bug, setting -Z relro-level to anything including "off" on + # macOS will cause link errors + env = lib.optionalAttrs stdenv.isLinux { + # nix-doc does not use nightly features, however, there is no other way to + # set relro-level + RUSTC_BOOTSTRAP = 1; + RUSTFLAGS = "-Z relro-level=partial"; + }; + + cargoSha256 = "sha256-GylSWo4LIsjKnJE9H6iJHZ99UI6UPhAOnAGXk+v8bko="; meta = with lib; { description = "An interactive Nix documentation tool";