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."; 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 = { 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 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; }; } diff --git a/pkgs/applications/misc/leetcode-cli/default.nix b/pkgs/applications/misc/leetcode-cli/default.nix index 4683a8052fbc..be9102b6120b 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 @@ -30,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"; 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 ]; 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 = [ 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"; 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; }) diff --git a/pkgs/development/libraries/gcc/libgcc/default.nix b/pkgs/development/libraries/gcc/libgcc/default.nix new file mode 100644 index 000000000000..e2fbf55876fa --- /dev/null +++ b/pkgs/development/libraries/gcc/libgcc/default.nix @@ -0,0 +1,140 @@ +{ lib, stdenvNoLibs, buildPackages +, gcc, glibc +, libiberty +}: + +let + stdenv = stdenvNoLibs; + gccConfigureFlags = gcc.cc.configureFlags ++ [ + "--disable-fixincludes" + "--disable-intl" + "--enable-threads=posix" + "--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 stdenv.mkDerivation (finalAttrs: { + pname = "libgcc"; + inherit (gcc.cc) src version; + + outputs = [ "out" "dev" ]; + + strictDeps = true; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ libiberty ]; + buildInputs = [ glibc ]; + + postUnpack = '' + mkdir -p ./build + buildRoot=$(readlink -e "./build") + ''; + + postPatch = + gcc.cc.passthru.forceLibgccToBuildCrtStuff + + '' + sourceRoot=$(readlink -e "./libgcc") + ''; + + hardeningDisable = [ "pie" ]; + + preConfigure = + '' + # Drop in libiberty, as external builds are not expected + cd "$buildRoot" + ( + mkdir -p build-${stdenv.buildPlatform.config}/libiberty/ + cd build-${stdenv.buildPlatform.config}/libiberty/ + ln -s ${buildPackages.libiberty}/lib/libiberty.a ./ + ) + 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 + 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=${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' + + "$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 + + make \ + config.h \ + libgcc.mvars \ + tconfig.h \ + tm.h \ + options.h \ + 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 + ) + mkdir -p "$buildRoot/gcc/include" + + # Preparing to configure + build libgcc itself + mkdir -p "$buildRoot/gcc/${stdenv.hostPlatform.config}/libgcc" + cd "$buildRoot/gcc/${stdenv.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=${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=${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" ]; + configureFlags = [ + "cross_compiling=true" + "--disable-gcov" + "--with-glibc-version=${glibc.version}" + ]; + + makeFlags = [ "MULTIBUILDTOP:=../" ]; + + postInstall = '' + moveToOutput "lib/gcc/${stdenv.hostPlatform.config}/${finalAttrs.version}/include" "$dev" + mkdir -p "$out/lib" "$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/" + ''; +}) 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/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 = [ 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" ]; 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 = [ 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 = [ 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 = [ 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; 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 = '' 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 = [ 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; 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 = [ 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 175a642f2c23..d09b0dad82f3 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 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; { 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 ]; 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"; 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.* diff --git a/pkgs/os-specific/linux/nvidia-x11/settings.nix b/pkgs/os-specific/linux/nvidia-x11/settings.nix index 6112b65eabd9..0b801d4b2724 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 @@ -75,10 +91,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)" ]; @@ -106,6 +122,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 = { 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="; diff --git a/pkgs/test/cross/default.nix b/pkgs/test/cross/default.nix index 46bb3c8d522d..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,13 +128,14 @@ 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 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 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 = '' 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 ]; }; 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"; 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/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 04e9b9defb45..9157df3f1527 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; @@ -18916,6 +18918,8 @@ with pkgs; librarian-puppet-go = callPackage ../development/tools/librarian-puppet-go { }; + libgcc = stdenv.cc.cc.libgcc or null; + # This is for e.g. LLVM libraries on linux. gccForLibs = if stdenv.targetPlatform == stdenv.hostPlatform && targetPackages.stdenv.cc.isGNU @@ -21444,6 +21448,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 {