Merge branch 'staging' into staging-next

Changed files
+2094 -1191
nixos
doc
manual
release-notes
pkgs
applications
editors
misc
version-management
mercurial
build-support
development
compilers
interpreters
libraries
abseil-cpp
audio
roc-toolkit
fortify-headers
gdk-pixbuf
glibc
gmp
gnu-config
gnutls
libavif
libhwy
librsvg
openexr
openldap
openssl
protobuf
protobufc
tix
umockdev
webp-pixbuf-loader
python-modules
adguardhome
aio-geojson-client
aio-geojson-generic-client
aio-geojson-geonetnz-quakes
aio-geojson-geonetnz-volcano
aio-geojson-nsw-rfs-incidents
aio-geojson-usgs-earthquakes
aio-georss-client
aio-georss-gdacs
aiohttp
aiohttp-retry
aiojobs
amqp
ansi2html
asyncssh
bluetooth-data-tools
curio
datadog
dbus-fast
devolo-plc-api
django-cachalot
django-cacheops
django-compat
django-haystack
django-hijack
django-mailman3
django-modelcluster
django-pattern-library
django-scim2
django-sites
djangorestframework-guardian
drf-nested-routers
falcon
feedparser
ffmpy
flit-core
google-auth-httplib2
gradio
graphene-django
gunicorn
httplib2
httpx-socks
josepy
markdown-it-py
meson-python
mezzanine
mock
moto
ninja
nose2
nplusone
nvchecker
orjson
oscrypto
prometheus-client
pycurl
pyquery
pyro5
pytest-recording
pytest-remotedata
pytest-tornasync
pywemo
pyzipper
qcodes
rangehttpserver
responses
rope
snakeviz
sockio
sshfs
terminado
umodbus
unearth
wandb
wsgidav
ruby-modules
bundler
tools
build-managers
misc
autogen
gdb
os-specific
darwin
apple-source-releases
adv_cmds
signing-utils
linux
servers
baserow
mail
mailman
sql
postgresql
shells
stdenv
darwin
generic
linux
test
tools
archivers
compression
graphics
graphviz
misc
nanoemoji
top-level
+12
nixos/doc/manual/release-notes/rl-2311.section.md
···
- The use of `sourceRoot = "source";`, `sourceRoot = "source/subdir";`, and similar lines in package derivations using the default `unpackPhase` is deprecated as it requires `unpackPhase` to always produce a directory named "source". Use `sourceRoot = src.name`, `sourceRoot = "${src.name}/subdir";`, or `setSourceRoot = "sourceRoot=$(echo */subdir)";` or similar instead.
+
- The `django` alias in the python package set was upgraded to Django 4.x.
+
Applications that consume Django should always pin their python environment
+
to a compatible major version, so they can move at their own pace.
+
+
```nix
+
python = python3.override {
+
packageOverrides = self: super: {
+
django = super.django_3;
+
};
+
};
+
```
+
- The `qemu-vm.nix` module by default now identifies block devices via
persistent names available in `/dev/disk/by-*`. Because the rootDevice is
identfied by its filesystem label, it needs to be formatted before the VM is
+12 -40
pkgs/applications/editors/ed/default.nix
···
-
{ lib, stdenv, fetchurl, lzip }:
-
-
# Note: this package is used for bootstrapping fetchurl, and thus
-
# cannot use fetchpatch! All mutable patches (generated by GitHub or
-
# cgit) that are needed here should be included directly in Nixpkgs as
-
# files.
-
-
stdenv.mkDerivation rec {
-
pname = "ed";
-
version = "1.19";
-
-
src = fetchurl {
-
url = "mirror://gnu/ed/${pname}-${version}.tar.lz";
-
hash = "sha256-zi8uXEJHkKqW0J2suT2bv9wLfrYknJy3U4RS6Ox3zUg=";
-
};
+
{ lib, pkgs }:
-
nativeBuildInputs = [ lzip ];
-
-
configureFlags = [
-
"CC=${stdenv.cc.targetPrefix}cc"
-
];
-
-
doCheck = true;
+
lib.makeScope pkgs.newScope (self:
+
let
+
inherit (self) callPackage;
+
in {
+
sources = import ./sources.nix {
+
inherit lib;
+
inherit (pkgs) fetchurl;
+
};
-
meta = {
-
description = "An implementation of the standard Unix editor";
-
longDescription = ''
-
GNU ed is a line-oriented text editor. It is used to create,
-
display, modify and otherwise manipulate text files, both
-
interactively and via shell scripts. A restricted version of ed,
-
red, can only edit files in the current directory and cannot
-
execute shell commands. Ed is the "standard" text editor in the
-
sense that it is the original editor for Unix, and thus widely
-
available. For most purposes, however, it is superseded by
-
full-screen editors such as GNU Emacs or GNU Moe.
-
'';
-
license = lib.licenses.gpl3Plus;
-
homepage = "https://www.gnu.org/software/ed/";
-
maintainers = [ ];
-
platforms = lib.platforms.unix;
-
};
-
}
+
ed = callPackage (self.sources.ed) { };
+
edUnstable = callPackage (self.sources.edUnstable) { };
+
})
+30
pkgs/applications/editors/ed/generic.nix
···
+
{ pname
+
, version
+
, src
+
, patches ? [ ]
+
, meta
+
}:
+
+
# Note: this package is used for bootstrapping fetchurl, and thus cannot use
+
# fetchpatch! All mutable patches (generated by GitHub or cgit) that are needed
+
# here should be included directly in Nixpkgs as files.
+
+
{ lib
+
, stdenv
+
, fetchurl
+
, lzip
+
}:
+
+
stdenv.mkDerivation {
+
inherit pname version src patches;
+
+
nativeBuildInputs = [ lzip ];
+
+
configureFlags = [
+
"CC=${stdenv.cc.targetPrefix}cc"
+
];
+
+
doCheck = true;
+
+
inherit meta;
+
}
+45
pkgs/applications/editors/ed/sources.nix
···
+
{ lib
+
, fetchurl
+
}:
+
+
let
+
meta = {
+
description = "The GNU implementation of the standard Unix editor";
+
longDescription = ''
+
GNU ed is a line-oriented text editor. It is used to create, display,
+
modify and otherwise manipulate text files, both interactively and via
+
shell scripts. A restricted version of ed, red, can only edit files in the
+
current directory and cannot execute shell commands. Ed is the 'standard'
+
text editor in the sense that it is the original editor for Unix, and thus
+
widely available. For most purposes, however, it is superseded by
+
full-screen editors such as GNU Emacs or GNU Moe.
+
'';
+
license = lib.licenses.gpl3Plus;
+
homepage = "https://www.gnu.org/software/ed/";
+
maintainers = with lib.maintainers; [ AndersonTorres ];
+
platforms = lib.platforms.unix;
+
};
+
in
+
{
+
ed = let
+
pname = "ed";
+
version = "1.19";
+
src = fetchurl {
+
url = "mirror://gnu/ed/ed-${version}.tar.lz";
+
hash = "sha256-zi8uXEJHkKqW0J2suT2bv9wLfrYknJy3U4RS6Ox3zUg=";
+
};
+
in import ./generic.nix {
+
inherit pname version src meta;
+
};
+
+
edUnstable = let
+
pname = "ed";
+
version = "1.20-pre2";
+
src = fetchurl {
+
url = "http://download.savannah.gnu.org/releases/ed/ed-${version}.tar.lz";
+
hash = "sha256-bHTDeMhVNNo3qqDNoBNaBA+DHDa4WJpfQNcTvAUPgsY=";
+
};
+
in import ./generic.nix {
+
inherit pname version src meta;
+
};
+
}
+21
pkgs/applications/misc/djvulibre/c++17-register-class.patch
···
+
diff -ur a/libdjvu/GBitmap.h b/libdjvu/GBitmap.h
+
--- a/libdjvu/GBitmap.h 2020-11-20 09:57:32.000000000 -0700
+
+++ b/libdjvu/GBitmap.h 2023-07-07 07:07:45.519912414 -0600
+
@@ -620,7 +620,7 @@
+
inline int
+
GBitmap::read_run(unsigned char *&data)
+
{
+
- register int z=*data++;
+
+ int z=*data++;
+
return (z>=RUNOVERFLOWVALUE)?
+
((z&~RUNOVERFLOWVALUE)<<8)|(*data++):z;
+
}
+
@@ -628,7 +628,7 @@
+
inline int
+
GBitmap::read_run(const unsigned char *&data)
+
{
+
- register int z=*data++;
+
+ int z=*data++;
+
return (z>=RUNOVERFLOWVALUE)?
+
((z&~RUNOVERFLOWVALUE)<<8)|(*data++):z;
+
}
+4
pkgs/applications/misc/djvulibre/default.nix
···
bash
];
+
# Remove uses of the `register` storage class specifier, which was removed in C++17.
+
# Fixes compilation with clang 16, which defaults to C++17.
+
patches = [ ./c++17-register-class.patch ];
+
enableParallelBuilding = true;
meta = with lib; {
+2
pkgs/applications/misc/privacyidea/default.nix
···
python3' = python310.override {
packageOverrides = self: super: {
+
django = super.django_3;
+
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.3.24";
src = fetchPypi {
+3 -3
pkgs/applications/version-management/mercurial/default.nix
···
self = python3Packages.buildPythonApplication rec {
pname = "mercurial${lib.optionalString fullBuild "-full"}";
-
version = "6.5";
+
version = "6.5.1";
src = fetchurl {
url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz";
-
sha256 = "sha256-pWA9DTlev2f+XSeruzvTf8wBhx7POUx5NnLSweaL5+c=";
+
sha256 = "sha256-M/fejYs2B/orQIzeS4cl4RfrCtQZJqeH6qtAnKik/C8=";
};
format = "other";
···
cargoDeps = if rustSupport then rustPlatform.fetchCargoTarball {
inherit src;
name = "mercurial-${version}";
-
sha256 = "sha256-umjOU3OmTdPmLS4IWncqmKxSa6J4KXwTlGhylFt6TQo=";
+
sha256 = "sha256-tPv0UeZOsHDGKzXWeA/fFio7d3EN+KGioDu/1WH1drc=";
sourceRoot = "mercurial-${version}/rust";
} else null;
cargoRoot = if rustSupport then "rust" else null;
+5 -2
pkgs/build-support/cc-wrapper/cc-wrapper.sh
···
fi
if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then
-
exec @prog@ @<(printf "%q\n" \
+
responseFile=$(mktemp --tmpdir cc-params.XXXXXX)
+
trap 'rm -f -- "$responseFile"' EXIT
+
printf "%q\n" \
${extraBefore+"${extraBefore[@]}"} \
${params+"${params[@]}"} \
-
${extraAfter+"${extraAfter[@]}"})
+
${extraAfter+"${extraAfter[@]}"} > "$responseFile"
+
@prog@ "@$responseFile"
else
exec @prog@ \
${extraBefore+"${extraBefore[@]}"} \
+18
pkgs/build-support/cc-wrapper/default.nix
···
# the derivation at which the `-B` and `-L` flags added by `useCcForLibs` will point
, gccForLibs ? if useCcForLibs then cc else null
+
, fortify-headers ? null
+
, includeFortifyHeaders ? null
}:
with lib;
···
let
stdenv = stdenvNoCC;
inherit (stdenv) hostPlatform targetPlatform;
+
+
includeFortifyHeaders' = if includeFortifyHeaders != null
+
then includeFortifyHeaders
+
else targetPlatform.libc == "musl";
# Prefix for binaries. Customarily ends with a dash separator.
#
···
darwinMinVersionVariable = optionalString stdenv.targetPlatform.isDarwin
stdenv.targetPlatform.darwinMinVersionVariable;
in
+
+
assert includeFortifyHeaders' -> fortify-headers != null;
# Ensure bintools matches
assert libc_bin == bintools.libc_bin;
···
echo "${libc_lib}" > $out/nix-support/orig-libc
echo "${libc_dev}" > $out/nix-support/orig-libc-dev
+
''
+
# fortify-headers is a set of wrapper headers that augment libc
+
# and use #include_next to pass through to libc's true
+
# implementations, so must appear before them in search order.
+
# in theory a correctly placed -idirafter could be used, but in
+
# practice the compiler may have been built with a --with-headers
+
# like option that forces the libc headers before all -idirafter,
+
# hence -isystem here.
+
+ optionalString includeFortifyHeaders' ''
+
echo "-isystem ${fortify-headers}/include" >> $out/nix-support/libc-cflags
'')
##
+8 -4
pkgs/build-support/go/module.nix
···
let
args = removeAttrs args' [ "overrideModAttrs" "vendorSha256" "vendorHash" ];
+
GO111MODULE = "on";
+
GOTOOLCHAIN = "local";
+
goModules = if (vendorHash == null) then "" else
(stdenv.mkDerivation {
name = "${name}-go-modules";
···
inherit (args) src;
inherit (go) GOOS GOARCH;
+
inherit GO111MODULE GOTOOLCHAIN;
# The following inheritence behavior is not trivial to expect, and some may
# argue it's not ideal. Changing it may break vendor hashes in Nixpkgs and
···
postBuild = args.modPostBuild or "";
sourceRoot = args.sourceRoot or "";
-
GO111MODULE = "on";
-
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
"GIT_PROXY_COMMAND"
"SOCKS_SERVER"
···
runHook preConfigure
export GOCACHE=$TMPDIR/go-cache
export GOPATH="$TMPDIR/go"
+
# fixes 'GOPROXY list is not the empty string, but contains no entries'
+
# "https://proxy.golang.org,direct" is the go default
+
export GOPROXY="''${GOPROXY:-"https://proxy.golang.org,direct"}" # respect impureEnvVars
cd "${modRoot}"
runHook postConfigure
'';
···
inherit (go) GOOS GOARCH;
-
GO111MODULE = "on";
GOFLAGS = lib.optionals (!proxyVendor) [ "-mod=vendor" ] ++ lib.optionals (!allowGoReference) [ "-trimpath" ];
-
inherit CGO_ENABLED enableParallelBuilding;
+
inherit CGO_ENABLED enableParallelBuilding GO111MODULE GOTOOLCHAIN;
configurePhase = args.configurePhase or (''
runHook preConfigure
+1
pkgs/build-support/go/package.nix
···
inherit CGO_ENABLED enableParallelBuilding;
GO111MODULE = "off";
+
GOTOOLCHAIN = "local";
GOFLAGS = lib.optionals (!allowGoReference) [ "-trimpath" ];
GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
+2 -5
pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix
···
-
{ stdenv
-
, targetPackages
+
{ targetPackages
, lib
, makeSetupHook
, dieHook
···
makeSetupHook {
name = "make-binary-wrapper-hook";
-
propagatedBuildInputs = [ dieHook ]
-
# https://github.com/NixOS/nixpkgs/issues/148189
-
++ lib.optional (stdenv.isDarwin && stdenv.isAarch64) cc;
+
propagatedBuildInputs = [ dieHook ];
substitutions = {
cc = "${cc}/bin/${cc.targetPrefix}cc ${lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers)}";
+31 -9
pkgs/build-support/setup-hooks/patch-shebangs.sh
···
# Run patch shebangs on a directory or file.
# Can take multiple paths as arguments.
-
# patchShebangs [--build | --host] PATH...
+
# patchShebangs [--build | --host | --update] [--] PATH...
# Flags:
# --build : Lookup commands available at build-time
# --host : Lookup commands available at runtime
+
# --update : Update shebang paths that are in Nix store
# Example use cases,
# $ patchShebangs --host /nix/store/...-hello-1.0/bin
···
patchShebangs() {
local pathName
+
local update
-
if [[ "$1" == "--host" ]]; then
-
pathName=HOST_PATH
-
shift
-
elif [[ "$1" == "--build" ]]; then
-
pathName=PATH
-
shift
-
fi
+
while [[ $# -gt 0 ]]; do
+
case "$1" in
+
--host)
+
pathName=HOST_PATH
+
shift
+
;;
+
--build)
+
pathName=PATH
+
shift
+
;;
+
--update)
+
update=true
+
shift
+
;;
+
--)
+
shift
+
break
+
;;
+
-*|--*)
+
echo "Unknown option $1 supplied to patchShebangs" >&2
+
return 1
+
;;
+
*)
+
break
+
;;
+
esac
+
done
echo "patching script interpreter paths in $@"
local f
···
newInterpreterLine="$newPath $args"
newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}
-
if [[ -n "$oldPath" && "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ]]; then
+
if [[ -n "$oldPath" && ( "$update" == true || "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ) ]]; then
if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then
echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""
# escape the escape chars so that sed doesn't interpret them
-90
pkgs/build-support/setup-hooks/strip-tmp-aarch64.sh
···
-
# This setup hook strips libraries and executables in the fixup phase.
-
-
fixupOutputHooks+=(_doStrip)
-
-
_doStrip() {
-
# We don't bother to strip build platform code because it shouldn't make it
-
# to $out anyways---if it does, that's a bigger problem that a lack of
-
# stripping will help catch.
-
local -ra flags=(dontStripHost dontStripTarget)
-
local -ra debugDirs=(stripDebugList stripDebugListTarget)
-
local -ra allDirs=(stripAllList stripAllListTarget)
-
local -ra stripCmds=(STRIP STRIP_FOR_TARGET)
-
local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET)
-
-
# TODO(structured-attrs): This doesn't work correctly if one of
-
# the items in strip*List or strip*Flags contains a space,
-
# even with structured attrs enabled. This is OK for now
-
# because very few packages set any of these, and it doesn't
-
# affect any of them.
-
#
-
# After __structuredAttrs = true is universal, come back and
-
# push arrays all the way through this logic.
-
-
# Strip only host paths by default. Leave targets as is.
-
stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin}
-
stripDebugListTarget=${stripDebugListTarget[*]:-}
-
stripAllList=${stripAllList[*]:-}
-
stripAllListTarget=${stripAllListTarget[*]:-}
-
-
local i
-
for i in ${!stripCmds[@]}; do
-
local -n flag="${flags[$i]}"
-
local -n debugDirList="${debugDirs[$i]}"
-
local -n allDirList="${allDirs[$i]}"
-
local -n stripCmd="${stripCmds[$i]}"
-
local -n ranlibCmd="${ranlibCmds[$i]}"
-
-
# `dontStrip` disables them all
-
if [[ "${dontStrip-}" || "${flag-}" ]] || ! type -f "${stripCmd-}" 2>/dev/null 1>&2
-
then continue; fi
-
-
stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"
-
stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"
-
done
-
}
-
-
stripDirs() {
-
local cmd="$1"
-
local ranlibCmd="$2"
-
local paths="$3"
-
local stripFlags="$4"
-
local pathsNew=
-
-
[ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1
-
[ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1
-
-
local p
-
for p in ${paths}; do
-
if [ -e "$prefix/$p" ]; then
-
pathsNew="${pathsNew} $prefix/$p"
-
fi
-
done
-
paths=${pathsNew}
-
-
if [ -n "${paths}" ]; then
-
echo "stripping (with command $cmd and flags $stripFlags) in $paths"
-
local striperr
-
striperr="$(mktemp 'striperr.XXXXXX')"
-
# Do not strip lib/debug. This is a directory used by setup-hooks/separate-debug-info.sh.
-
find $paths -type f -a '!' -path "$prefix/lib/debug/*" -print0 |
-
# Make sure we process files under symlinks only once. Otherwise
-
# 'strip` can corrupt files when writes to them in parallel:
-
# https://github.com/NixOS/nixpkgs/issues/246147#issuecomment-1657072039
-
xargs -r -0 -n1 -- realpath -z | sort -u -z |
-
-
xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2>"$striperr" || exit_code=$?
-
# xargs exits with status code 123 if some but not all of the
-
# processes fail. We don't care if some of the files couldn't
-
# be stripped, so ignore specifically this code.
-
[[ "$exit_code" = 123 || -z "$exit_code" ]] || (cat "$striperr" 1>&2 && exit 1)
-
-
rm "$striperr"
-
# 'strip' does not normally preserve archive index in .a files.
-
# This usually causes linking failures against static libs like:
-
# ld: ...-i686-w64-mingw32-stage-final-gcc-13.0.0-lib/i686-w64-mingw32/lib/libstdc++.dll.a:
-
# error adding symbols: archive has no index; run ranlib to add one
-
# Restore the index by running 'ranlib'.
-
find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2>/dev/null
-
fi
-
}
+6 -1
pkgs/build-support/setup-hooks/strip.sh
···
if [ -n "${paths}" ]; then
echo "stripping (with command $cmd and flags $stripFlags) in $paths"
local striperr
-
striperr="$(mktemp 'striperr.XXXXXX')"
+
striperr="$(mktemp --tmpdir="$TMPDIR" 'striperr.XXXXXX')"
# Do not strip lib/debug. This is a directory used by setup-hooks/separate-debug-info.sh.
find $paths -type f -a '!' -path "$prefix/lib/debug/*" -print0 |
+
# Make sure we process files under symlinks only once. Otherwise
+
# 'strip` can corrupt files when writes to them in parallel:
+
# https://github.com/NixOS/nixpkgs/issues/246147#issuecomment-1657072039
+
xargs -r -0 -n1 -- realpath -z | sort -u -z |
+
xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2>"$striperr" || exit_code=$?
# xargs exits with status code 123 if some but not all of the
# processes fail. We don't care if some of the files couldn't
+1 -6
pkgs/build-support/writers/scripts.nix
···
passAsFile = [ "content" ];
} else {
contentPath = content;
-
}) // lib.optionalAttrs (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) {
-
# post-link-hook expects codesign_allocate to be in PATH
-
# https://github.com/NixOS/nixpkgs/issues/154203
-
# https://github.com/NixOS/nixpkgs/issues/148189
-
nativeBuildInputs = [ stdenv.cc.bintools ];
-
} // lib.optionalAttrs (nameOrPath == "/bin/${name}") {
+
}) // lib.optionalAttrs (nameOrPath == "/bin/${name}") {
meta.mainProgram = name;
}) ''
${compileScript}
+2 -1
pkgs/development/compilers/go/1.18.nix
···
runHook preInstall
mkdir -p $GOROOT_FINAL
cp -a bin pkg src lib misc api doc $GOROOT_FINAL
-
ln -s $GOROOT_FINAL/bin $out/bin
+
mkdir -p $out/bin
+
ln -s $GOROOT_FINAL/bin/* $out/bin
runHook postInstall
'';
+2 -1
pkgs/development/compilers/go/1.19.nix
···
runHook preInstall
mkdir -p $GOROOT_FINAL
cp -a bin pkg src lib misc api doc $GOROOT_FINAL
-
ln -s $GOROOT_FINAL/bin $out/bin
+
mkdir -p $out/bin
+
ln -s $GOROOT_FINAL/bin/* $out/bin
runHook postInstall
'';
+4 -3
pkgs/development/compilers/go/1.20.nix
···
in
stdenv.mkDerivation rec {
pname = "go";
-
version = "1.20.6";
+
version = "1.20.7";
src = fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
-
hash = "sha256-Yu5bxvtVuLro9wXgy434bWRTYmtOz5MnnihnCS4Lf3A=";
+
hash = "sha256-LF7pyeweczsNu8K9/tP2IwblHYFyvzj09OVCsnUg9Zc=";
};
strictDeps = true;
···
runHook preInstall
mkdir -p $GOROOT_FINAL
cp -a bin pkg src lib misc api doc $GOROOT_FINAL
-
ln -s $GOROOT_FINAL/bin $out/bin
+
mkdir -p $out/bin
+
ln -s $GOROOT_FINAL/bin/* $out/bin
runHook postInstall
'';
+183
pkgs/development/compilers/go/1.21.nix
···
+
{ lib
+
, stdenv
+
, fetchurl
+
, tzdata
+
, substituteAll
+
, iana-etc
+
, Security
+
, Foundation
+
, xcbuild
+
, mailcap
+
, buildPackages
+
, pkgsBuildTarget
+
, threadsCross
+
, testers
+
, skopeo
+
, buildGo121Module
+
}:
+
+
let
+
useGccGoBootstrap = stdenv.buildPlatform.isMusl || stdenv.buildPlatform.isRiscV;
+
goBootstrap = if useGccGoBootstrap then buildPackages.gccgo12 else buildPackages.callPackage ./bootstrap117.nix { };
+
+
skopeoTest = skopeo.override { buildGoModule = buildGo121Module; };
+
+
goarch = platform: {
+
"aarch64" = "arm64";
+
"arm" = "arm";
+
"armv5tel" = "arm";
+
"armv6l" = "arm";
+
"armv7l" = "arm";
+
"i686" = "386";
+
"mips" = "mips";
+
"mips64el" = "mips64le";
+
"mipsel" = "mipsle";
+
"powerpc64le" = "ppc64le";
+
"riscv64" = "riscv64";
+
"s390x" = "s390x";
+
"x86_64" = "amd64";
+
}.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}");
+
+
# We need a target compiler which is still runnable at build time,
+
# to handle the cross-building case where build != host == target
+
targetCC = pkgsBuildTarget.targetPackages.stdenv.cc;
+
+
isCross = stdenv.buildPlatform != stdenv.targetPlatform;
+
in
+
stdenv.mkDerivation rec {
+
pname = "go";
+
version = "1.21rc4";
+
+
src = fetchurl {
+
url = "https://go.dev/dl/go${version}.src.tar.gz";
+
hash = "sha256-IyTyDxERKuw+XV5CjQRoYaNOT5neCrgqjZFNJrj7Af0=";
+
};
+
+
strictDeps = true;
+
buildInputs = [ ]
+
++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
+
++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
+
+
depsTargetTargetPropagated = lib.optionals stdenv.targetPlatform.isDarwin [ Foundation Security xcbuild ];
+
+
depsBuildTarget = lib.optional isCross targetCC;
+
+
depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross.package;
+
+
postPatch = ''
+
patchShebangs .
+
'';
+
+
patches = [
+
(substituteAll {
+
src = ./iana-etc-1.17.patch;
+
iana = iana-etc;
+
})
+
# Patch the mimetype database location which is missing on NixOS.
+
# but also allow static binaries built with NixOS to run outside nix
+
(substituteAll {
+
src = ./mailcap-1.17.patch;
+
inherit mailcap;
+
})
+
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
+
# that run outside a nix server
+
(substituteAll {
+
src = ./tzdata-1.19.patch;
+
inherit tzdata;
+
})
+
./remove-tools-1.11.patch
+
./go_no_vendor_checks-1.21.patch
+
];
+
+
GOOS = stdenv.targetPlatform.parsed.kernel.name;
+
GOARCH = goarch stdenv.targetPlatform;
+
# GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
+
# Go will nevertheless build a for host system that we will copy over in
+
# the install phase.
+
GOHOSTOS = stdenv.buildPlatform.parsed.kernel.name;
+
GOHOSTARCH = goarch stdenv.buildPlatform;
+
+
# {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those
+
# to be different from CC/CXX
+
CC_FOR_TARGET =
+
if isCross then
+
"${targetCC}/bin/${targetCC.targetPrefix}cc"
+
else
+
null;
+
CXX_FOR_TARGET =
+
if isCross then
+
"${targetCC}/bin/${targetCC.targetPrefix}c++"
+
else
+
null;
+
+
GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]);
+
GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
+
CGO_ENABLED = 1;
+
+
GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go";
+
+
buildPhase = ''
+
runHook preBuild
+
export GOCACHE=$TMPDIR/go-cache
+
# this is compiled into the binary
+
export GOROOT_FINAL=$out/share/go
+
+
export PATH=$(pwd)/bin:$PATH
+
+
${lib.optionalString isCross ''
+
# Independent from host/target, CC should produce code for the building system.
+
# We only set it when cross-compiling.
+
export CC=${buildPackages.stdenv.cc}/bin/cc
+
''}
+
ulimit -a
+
+
pushd src
+
./make.bash
+
popd
+
runHook postBuild
+
'';
+
+
preInstall = ''
+
# Contains the wrong perl shebang when cross compiling,
+
# since it is not used for anything we can deleted as well.
+
rm src/regexp/syntax/make_perl_groups.pl
+
'' + (if (stdenv.buildPlatform.system != stdenv.hostPlatform.system) then ''
+
mv bin/*_*/* bin
+
rmdir bin/*_*
+
${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
+
rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH}
+
''}
+
'' else lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system) ''
+
rm -rf bin/*_*
+
${lib.optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
+
rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH}
+
''}
+
'');
+
+
installPhase = ''
+
runHook preInstall
+
mkdir -p $GOROOT_FINAL
+
cp -a bin pkg src lib misc api doc $GOROOT_FINAL
+
mkdir -p $out/bin
+
ln -s $GOROOT_FINAL/bin/* $out/bin
+
runHook postInstall
+
'';
+
+
disallowedReferences = [ goBootstrap ];
+
+
passthru = {
+
inherit goBootstrap skopeoTest;
+
tests = {
+
skopeo = testers.testVersion { package = skopeoTest; };
+
};
+
};
+
+
meta = with lib; {
+
changelog = "https://go.dev/doc/devel/release#go${lib.versions.majorMinor version}";
+
description = "The Go Programming language";
+
homepage = "https://go.dev/";
+
license = licenses.bsd3;
+
maintainers = teams.golang.members;
+
platforms = platforms.darwin ++ platforms.linux;
+
};
+
}
+23
pkgs/development/compilers/go/go_no_vendor_checks-1.21.patch
···
+
Starting from go1.14, go verifes that vendor/modules.txt matches the requirements
+
and replacements listed in the main module go.mod file, and it is a hard failure if
+
vendor/modules.txt is missing.
+
+
Relax module consistency checks and switch back to pre go1.14 behaviour if
+
vendor/modules.txt is missing regardless of go version requirement in go.mod.
+
+
This has been ported from FreeBSD: https://reviews.freebsd.org/D24122
+
See https://github.com/golang/go/issues/37948 for discussion.
+
+
diff --git a/src/cmd/go/internal/modload/vendor.go b/src/cmd/go/internal/modload/vendor.go
+
index ffc79bb93f..2d0311975d 100644
+
--- a/src/cmd/go/internal/modload/vendor.go
+
+++ b/src/cmd/go/internal/modload/vendor.go
+
@@ -144,7 +144,7 @@ func checkVendorConsistency(index *modFileIndex, modFile *modfile.File) {
+
readVendorList(MainModules.mustGetSingleMainModule())
+
+
pre114 := false
+
- if gover.Compare(index.goVersion, "1.14") < 0 {
+
+ if gover.Compare(index.goVersion, "1.14") < 0 || (os.Getenv("GO_NO_VENDOR_CHECKS") == "1" && len(vendorMeta) == 0) {
+
// Go versions before 1.14 did not include enough information in
+
// vendor/modules.txt to check for consistency.
+
// If we know that we're on an earlier version, relax the consistency check.
+12 -12
pkgs/development/compilers/openjdk/darwin/11.nix
···
dist = {
x86_64-darwin = {
arch = "x64";
-
zuluVersion = "11.48.21";
-
jdkVersion = "11.0.11";
-
sha256 =
-
if enableJavaFX then "18bd9cd66d6abc6f8c627bc70278dc8fd4860e138e1dc9e170eddb89727ccc7b"
-
else "0v0n7h7i04pvna41wpdq2k9qiy70sbbqzqzvazfdvgm3gb22asw6";
+
zuluVersion = "11.66.15";
+
jdkVersion = "11.0.20";
+
hash =
+
if enableJavaFX then "sha256-pVgCJkgYTlFeL7nkkMWLeJ/J8ELhgvWb7gzf3erZP7Y="
+
else "sha256-vKqxHP5Yb651g8bZ0xHGQ4Q1T7JjjrmgEuykw/Gh2f0=";
};
aarch64-darwin = {
arch = "aarch64";
-
zuluVersion = "11.48.21";
-
jdkVersion = "11.0.11";
-
sha256 =
-
if enableJavaFX then "ef0de2705c6c2d586812f7f3736b70e22b069545b38034816016f9f264ad43f9"
-
else "066whglrxx81c95grv2kxdbvyh32728ixhml2v44ildh549n4lhc";
+
zuluVersion = "11.66.15";
+
jdkVersion = "11.0.20";
+
hash =
+
if enableJavaFX then "sha256-VoZo34SCUU+HHnTl6iLe0QBC+4VDkPP14N98oqSg9EQ="
+
else "sha256-djK8Kfikt9SSuT87x1p7YWMIlNuF0TZFYDWrKiTTiIU=";
};
}."${stdenv.hostPlatform.system}";
jce-policies = fetchurl {
url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
-
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+
hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
};
javaPackage = if enableJavaFX then "ca-fx-jdk" else "ca-jdk";
···
src = fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-${javaPackage}${dist.jdkVersion}-macosx_${dist.arch}.tar.gz";
-
inherit (dist) sha256;
+
inherit (dist) hash;
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
};
+12 -12
pkgs/development/compilers/openjdk/darwin/16.nix
···
dist = {
x86_64-darwin = {
arch = "x64";
-
zuluVersion = "16.30.15";
-
jdkVersion = "16.0.1";
-
sha256 =
-
if enableJavaFX then "cbb3b96d80a0675893f21dc51ba3f532049c501bd7dc4c8d1ee930e63032c745"
-
else "1jihn125dmxr9y5h9jq89zywm3z6rbwv5q7msfzsf2wzrr13jh0z";
+
zuluVersion = "16.32.15";
+
jdkVersion = "16.0.2";
+
hash =
+
if enableJavaFX then "sha256-6URaSBNHQWLauO//kCuKXb4Z7AqyshWnoeJEyVRKgaY="
+
else "sha256-NXgBj/KixTknaCYbo3B+rOo11NImH5CDUIU0LhTCtMo=";
};
aarch64-darwin = {
arch = "aarch64";
-
zuluVersion = "16.30.19";
-
jdkVersion = "16.0.1";
-
sha256 =
-
if enableJavaFX then "a49b23abfd83784d2ac935fc24e25ab7cb09b8ffc8e47c32ed446e05b8a21396"
-
else "1i0bcjx3acb5dhslf6cabdcnd6mrz9728vxw9hb4al5y3f5fll4w";
+
zuluVersion = "16.32.15";
+
jdkVersion = "16.0.2";
+
hash =
+
if enableJavaFX then "sha256-QuyhIAxUY3Vv1adGihW+LIsXtpDX2taCmFsMFj9o5vs="
+
else "sha256-3bUfDcLLyahLeURFAgLAVapBZHvqtam8GHbWTA6MQog=";
};
}."${stdenv.hostPlatform.system}";
jce-policies = fetchurl {
url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
-
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+
hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
};
javaPackage = if enableJavaFX then "ca-fx-jdk" else "ca-jdk";
···
src = fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-${javaPackage}${dist.jdkVersion}-macosx_${dist.arch}.tar.gz";
-
inherit (dist) sha256;
+
inherit (dist) hash;
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
};
+9 -10
pkgs/development/compilers/openjdk/darwin/17.nix
···
dist = {
x86_64-darwin = {
arch = "x64";
-
zuluVersion = "17.34.19";
-
jdkVersion = "17.0.3";
-
sha256 = "sha256-qImyxVC2y2QhxuVZwamKPyo46+n+7ytIFXpYI0e6w2c=";
+
zuluVersion = "17.44.15";
+
jdkVersion = "17.0.8";
+
hash = "sha256-Ci18gBkAv/UUIQw9KlnfibcQMXwQRGx6K7L/NBB7b7Q=";
};
aarch64-darwin = {
arch = "aarch64";
-
zuluVersion = "17.34.19";
-
jdkVersion = "17.0.3";
-
sha256 = "sha256-eaRX8Qa/Mqr9JhpHSEcf0Q9c4qmqLMgWqRhkEEwAjf8=";
+
zuluVersion = "17.44.15";
+
jdkVersion = "17.0.8";
+
hash = "sha256-8b81QY6DGXVOsTKM8QDzJnYjXV0ipCbYWaaz6oF2A6k=";
};
}."${stdenv.hostPlatform.system}";
jce-policies = fetchurl {
-
# Ugh, unversioned URLs... I hope this doesn't change often enough to cause pain before we move to a Darwin source build of OpenJDK!
-
url = "http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
-
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+
url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
+
hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
};
jdk = stdenv.mkDerivation rec {
···
src = fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-ca-jdk${dist.jdkVersion}-macosx_${dist.arch}.tar.gz";
-
inherit (dist) sha256;
+
inherit (dist) hash;
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
};
+9 -10
pkgs/development/compilers/openjdk/darwin/18.nix
···
dist = {
x86_64-darwin = {
arch = "x64";
-
zuluVersion = "18.28.13";
-
jdkVersion = "18.0.0";
-
sha256 = "0hc5m3d4q3n7sighq3pxkdg93vsrgj1kzla1py9nfnm9pnj9l2kq";
+
zuluVersion = "18.32.13";
+
jdkVersion = "18.0.2.1";
+
hash = "sha256-uHPcyOgxUdTgzmIVRp/awtwve9zSt+1TZNef7DUuoRg=";
};
aarch64-darwin = {
arch = "aarch64";
-
zuluVersion = "18.28.13";
-
jdkVersion = "18.0.0";
-
sha256 = "0ch4jp2d4pjvxbmbswvjwf7w2flajrvjg5f16ggiy80y8l0y15cm";
+
zuluVersion = "18.32.13";
+
jdkVersion = "18.0.2.1";
+
hash = "sha256-jAZDgxtWMq/74yKAxA69oOU0C9nXvKG5MjmZLsK04iM=";
};
}."${stdenv.hostPlatform.system}";
jce-policies = fetchurl {
-
# Ugh, unversioned URLs... I hope this doesn't change often enough to cause pain before we move to a Darwin source build of OpenJDK!
-
url = "http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
-
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+
url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
+
hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
};
jdk = stdenv.mkDerivation rec {
···
src = fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-ca-jdk${dist.jdkVersion}-macosx_${dist.arch}.tar.gz";
-
inherit (dist) sha256;
+
inherit (dist) hash;
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
};
+9 -10
pkgs/development/compilers/openjdk/darwin/19.nix
···
dist = {
x86_64-darwin = {
arch = "x64";
-
zuluVersion = "19.30.11";
-
jdkVersion = "19.0.1";
-
sha256 = "1h0qj0xgpxjy506ikbgdn74pi4860lsnh5n3q3bayfmn0pxc5ksn";
+
zuluVersion = "19.32.13";
+
jdkVersion = "19.0.2";
+
hash = "sha256-KARXWumsY+OcqpEOV2EL9SsPni1nGSipjRji/Mn2KsE=";
};
aarch64-darwin = {
arch = "aarch64";
-
zuluVersion = "19.30.11";
-
jdkVersion = "19.0.1";
-
sha256 = "0g8i371h5fv686xhiff0431sgvdk80lbp2lkz86jpfdv9lgg0qnk";
+
zuluVersion = "19.32.13";
+
jdkVersion = "19.0.2";
+
hash = "sha256-F30FjZaLL756X/Xs6xjNwW9jds4pEATxoxOeeLL7Y5E=";
};
}."${stdenv.hostPlatform.system}";
jce-policies = fetchurl {
-
# Ugh, unversioned URLs... I hope this doesn't change often enough to cause pain before we move to a Darwin source build of OpenJDK!
-
url = "http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
-
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+
url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
+
hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
};
jdk = stdenv.mkDerivation rec {
···
src = fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-ca-jdk${dist.jdkVersion}-macosx_${dist.arch}.tar.gz";
-
inherit (dist) sha256;
+
inherit (dist) hash;
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
};
+9 -10
pkgs/development/compilers/openjdk/darwin/20.nix
···
dist = {
x86_64-darwin = {
arch = "x64";
-
zuluVersion = "20.30.11";
-
jdkVersion = "20.0.1";
-
sha256 = "0hg2n2mdbpxsgpw3c58w8y1f3im6schvfqahji352p9ljbdykzmy";
+
zuluVersion = "20.32.11";
+
jdkVersion = "20.0.2";
+
hash = "sha256-Ev9KG6DvuBnsZrOguLsO1KQzudHCBcJNwKh45Inpnfo=";
};
aarch64-darwin = {
arch = "aarch64";
-
zuluVersion = "20.30.11";
-
jdkVersion = "20.0.1";
-
sha256 = "0bc9h1y0b2azyfl3f5sqj19sh02xs995d1kdn55m4lfhc00rzr81";
+
zuluVersion = "20.32.11";
+
jdkVersion = "20.0.2";
+
hash = "sha256-15uNZ6uMfSASV3QU2q2oA/jBk2PCHOfSjn1GY7/7qIY=";
};
}."${stdenv.hostPlatform.system}";
jce-policies = fetchurl {
-
# Ugh, unversioned URLs... I hope this doesn't change often enough to cause pain before we move to a Darwin source build of OpenJDK!
-
url = "http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
-
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+
url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
+
hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
};
jdk = stdenv.mkDerivation rec {
···
src = fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-ca-jdk${dist.jdkVersion}-macosx_${dist.arch}.tar.gz";
-
inherit (dist) sha256;
+
inherit (dist) hash;
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
};
+12 -12
pkgs/development/compilers/openjdk/darwin/8.nix
···
dist = {
x86_64-darwin = {
arch = "x64";
-
zuluVersion = "8.54.0.21";
-
jdkVersion = "8.0.292";
-
sha256 =
-
if enableJavaFX then "e671f8990229b1ca2a76faabb21ba2f1a9e1f7211392e0f657225559be9b05c8"
-
else "1pgl0bir4r5v349gkxk54k6v62w241q7vw4gjxhv2g6pfq6hv7in";
+
zuluVersion = "8.72.0.17";
+
jdkVersion = "8.0.382";
+
hash =
+
if enableJavaFX then "sha256-/x8FqygivzddXsOwIV8aj/u+LPXMmokgu97vLAVEv80="
+
else "sha256-3dTPIPGUeT6nb3gncNvEa4VTRyQIBJpp8oZadrT2ToE=";
};
aarch64-darwin = {
arch = "aarch64";
-
zuluVersion = "8.54.0.21";
-
jdkVersion = "8.0.292";
-
sha256 =
-
if enableJavaFX then "8e901075cde2c31f531a34e8321ea4201970936abf54240a232e9389952afe84"
-
else "05w89wfjlfbpqfjnv6wisxmaf13qb28b2223f9264jyx30qszw1c";
+
zuluVersion = "8.72.0.17";
+
jdkVersion = "8.0.382";
+
hash =
+
if enableJavaFX then "sha256-FkQ+0MzSZWUzc/HmiDVZEHGOrdKAVCdK5pm9wXXzzaU="
+
else "sha256-rN5AI4xAWppE4kJlzMod0JmGyHdHjTXYtx8/wOW6CFk=";
};
}."${stdenv.hostPlatform.system}";
jce-policies = fetchurl {
url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
-
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+
hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
};
javaPackage = if enableJavaFX then "ca-fx-jdk" else "ca-jdk";
···
src = fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-${javaPackage}${dist.jdkVersion}-macosx_${dist.arch}.tar.gz";
-
inherit (dist) sha256;
+
inherit (dist) hash;
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
};
+1 -1
pkgs/development/interpreters/guile/setup-hook-1.8.sh
···
addGuileLibPath () {
if test -d "$1/share/guile/site"; then
-
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
+
addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site"
fi
}
+6 -6
pkgs/development/interpreters/guile/setup-hook-2.0.sh
···
addGuileLibPath () {
if test -d "$1/share/guile/site/2.0"; then
-
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/2.0"
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/2.0"
+
addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site/2.0"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/share/guile/site/2.0"
elif test -d "$1/share/guile/site"; then
-
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
+
addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/share/guile/site"
fi
if test -d "$1/lib/guile/2.0/ccache"; then
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.0/ccache"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/lib/guile/2.0/ccache"
fi
if test -d "$1/lib/guile/2.0/site-ccache"; then
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.0/site-ccache"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/lib/guile/2.0/site-ccache"
fi
}
+6 -6
pkgs/development/interpreters/guile/setup-hook-2.2.sh
···
addGuileLibPath () {
if test -d "$1/share/guile/site/2.2"; then
-
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/2.2"
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/2.2"
+
addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site/2.2"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/share/guile/site/2.2"
elif test -d "$1/share/guile/site"; then
-
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
+
addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/share/guile/site"
fi
if test -d "$1/lib/guile/2.2/ccache"; then
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.2/ccache"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/lib/guile/2.2/ccache"
fi
if test -d "$1/lib/guile/2.2/site-ccache"; then
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/2.2/site-ccache"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/lib/guile/2.2/site-ccache"
fi
}
+9 -9
pkgs/development/interpreters/guile/setup-hook-3.0.sh
···
addGuileLibPath () {
if test -d "$1/share/guile/site/3.0"; then
-
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site/3.0"
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site/3.0"
-
export GUILE_EXTENSIONS_PATH="${GUILE_EXTENSIONS_PATH-}${GUILE_EXTENSIONS_PATH:+:}$1/share/guile/site/3.0"
+
addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site/3.0"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/share/guile/site/3.0"
+
addToSearchPath GUILE_EXTENSIONS_PATH "$1/share/guile/site/3.0"
elif test -d "$1/share/guile/site"; then
-
export GUILE_LOAD_PATH="${GUILE_LOAD_PATH-}${GUILE_LOAD_PATH:+:}$1/share/guile/site"
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/share/guile/site"
-
export GUILE_EXTENSIONS_PATH="${GUILE_EXTENSIONS_PATH-}${GUILE_EXTENSIONS_PATH:+:}$1/share/guile/site"
+
addToSearchPath GUILE_LOAD_PATH "$1/share/guile/site"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/share/guile/site"
+
addToSearchPath GUILE_EXTENSIONS_PATH "$1/share/guile/site"
fi
if test -d "$1/lib/guile/3.0/ccache"; then
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/3.0/ccache"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/lib/guile/3.0/ccache"
fi
if test -d "$1/lib/guile/3.0/site-ccache"; then
-
export GUILE_LOAD_COMPILED_PATH="${GUILE_LOAD_COMPILED_PATH-}${GUILE_LOAD_COMPILED_PATH:+:}$1/lib/guile/3.0/site-ccache"
+
addToSearchPath GUILE_LOAD_COMPILED_PATH "$1/lib/guile/3.0/site-ccache"
fi
if test -d "$1/lib/guile/3.0/extensions"; then
-
export GUILE_EXTENSIONS_PATH="${GUILE_EXTENSIONS_PATH-}${GUILE_EXTENSIONS_PATH:+:}$1/lib/guile/3.0/extensions"
+
addToSearchPath GUILE_EXTENSIONS_PATH "$1/lib/guile/3.0/extensions"
fi
}
+4 -4
pkgs/development/interpreters/python/hooks/default.nix
···
-
self: super: with self;
+
self: dontUse: with self;
let
-
pythonInterpreter = super.python.pythonForBuild.interpreter;
-
pythonSitePackages = super.python.sitePackages;
-
pythonCheckInterpreter = super.python.interpreter;
+
pythonInterpreter = python.pythonForBuild.interpreter;
+
pythonSitePackages = python.sitePackages;
+
pythonCheckInterpreter = python.interpreter;
setuppy = ../run_setup.py;
in {
makePythonHook = args: pkgs.makeSetupHook ({passthru.provides.setupHook = true; } // args);
+3 -2
pkgs/development/interpreters/python/passthrufun.nix
···
selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget.
};
hooks = import ./hooks/default.nix;
-
keep = lib.extends hooks pythonPackagesFun;
+
keep = self: hooks self {};
extra = _: {};
optionalExtensions = cond: as: lib.optionals cond as;
pythonExtension = import ../../../top-level/python-packages.nix;
python2Extension = import ../../../top-level/python2-packages.nix;
extensions = lib.composeManyExtensions ([
+
hooks
pythonExtension
] ++ (optionalExtensions (!self.isPy3k) [
python2Extension
···
otherSplices
keep
extra
-
(lib.extends (lib.composeExtensions aliases extensions) keep))
+
(lib.extends (lib.composeExtensions aliases extensions) pythonPackagesFun))
{
overrides = packageOverrides;
python = self;
+2 -2
pkgs/development/interpreters/ruby/rubygems/default.nix
···
stdenv.mkDerivation rec {
pname = "rubygems";
-
version = "3.4.17";
+
version = "3.4.18";
src = fetchurl {
url = "https://rubygems.org/rubygems/rubygems-${version}.tgz";
-
hash = "sha256-SvqqlGPiqHeZQ0Mvulbgc5bM7E1O3HK7BtnbiscG0vE=";
+
hash = "sha256-+yHTJWedZNCkkRMIRT103QMTFJODlbJ2PwVbTghEo0M=";
};
patches = [
+7
pkgs/development/libraries/abseil-cpp/202301.nix
···
, stdenv
, fetchFromGitHub
, cmake
+
, gtest
, static ? stdenv.hostPlatform.isStatic
, cxxStandard ? null
}:
···
};
cmakeFlags = [
+
"-DABSL_BUILD_TEST_HELPERS=ON"
+
"-DABSL_USE_EXTERNAL_GOOGLETEST=ON"
"-DBUILD_SHARED_LIBS=${if static then "OFF" else "ON"}"
] ++ lib.optionals (cxxStandard != null) [
"-DCMAKE_CXX_STANDARD=${cxxStandard}"
];
+
strictDeps = true;
+
nativeBuildInputs = [ cmake ];
+
+
buildInputs = [ gtest ];
meta = with lib; {
description = "An open-source collection of C++ code designed to augment the C++ standard library";
+2 -2
pkgs/development/libraries/audio/roc-toolkit/default.nix
···
stdenv.mkDerivation rec {
pname = "roc-toolkit";
-
version = "0.2.4";
+
version = "0.2.5";
outputs = [ "out" "dev" ];
···
owner = "roc-streaming";
repo = "roc-toolkit";
rev = "v${version}";
-
hash = "sha256-x4+/MIFKcos9xWhvSNWdsUQA2oLiyYS0MJE60HY/3hQ=";
+
hash = "sha256-vosw4H3YTTCXdDOnQQYRNZgufPo1BxUtfg6jutArzTI=";
};
nativeBuildInputs = [
+34
pkgs/development/libraries/fortify-headers/default.nix
···
+
{ lib
+
, stdenv
+
, fetchurl
+
}:
+
+
stdenv.mkDerivation {
+
pname = "fortify-headers";
+
version = "1.1alpine1";
+
+
# upstream only accessible via git - unusable during bootstrap, hence
+
# extract from the alpine package
+
src = fetchurl {
+
url = "https://dl-cdn.alpinelinux.org/alpine/v3.17/main/x86_64/fortify-headers-1.1-r1.apk";
+
name = "fortify-headers.tar.gz"; # ensure it's extracted as a .tar.gz
+
hash = "sha256-A67NzUv+dldARY+MTaoVnezTg+Es8ZK/b7XOxA6KzpI=";
+
};
+
+
installPhase = ''
+
runHook preInstall
+
+
mkdir -p $out
+
cp -r include/fortify $out/include
+
+
runHook postInstall
+
'';
+
+
meta = {
+
description = "Standalone header-based fortify-source implementation";
+
homepage = "https://git.2f30.org/fortify-headers";
+
license = lib.licenses.bsd0;
+
platforms = lib.platforms.all;
+
maintainers = with lib.maintainers; [ ris ];
+
};
+
}
+3 -2
pkgs/development/libraries/gdk-pixbuf/default.nix
···
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
};
-
# gdk_pixbuf_moduledir variable from gdk-pixbuf-2.0.pc
-
moduleDir = "lib/gdk-pixbuf-2.0/2.10.0/loaders";
+
# gdk_pixbuf_binarydir and gdk_pixbuf_moduledir variables from gdk-pixbuf-2.0.pc
+
binaryDir = "lib/gdk-pixbuf-2.0/2.10.0";
+
moduleDir = "${finalAttrs.passthru.binaryDir}/loaders";
};
meta = with lib; {
+6 -3
pkgs/development/libraries/glibc/locales.nix
···
(callPackage ./common.nix { inherit stdenv; } {
pname = "glibc-locales";
+
extraNativeBuildInputs = [ glibc ];
}).overrideAttrs(finalAttrs: previousAttrs: {
builder = ./locales-builder.sh;
outputs = [ "out" ];
-
-
extraNativeBuildInputs = [ glibc ];
LOCALEDEF_FLAGS = [
(if stdenv.hostPlatform.isLittleEndian
···
echo SUPPORTED-LOCALES='${toString locales}' > ../glibc-2*/localedata/SUPPORTED
'';
-
enableParallelBuilding = true;
+
# Current `nixpkgs` way of building locales is not compatible with
+
# parallel install. `locale-archive` is updated in parallel with
+
# multiple `localedef` processes and causes non-deterministic result:
+
# https://github.com/NixOS/nixpkgs/issues/245360
+
enableParallelBuilding = false;
makeFlags = (previousAttrs.makeFlags or []) ++ [
"localedata/install-locales"
-19
pkgs/development/libraries/gmp/6.2.1-CVE-2021-43618.patch
···
-
https://gmplib.org/repo/gmp-6.2/raw-rev/561a9c25298e
-
-
diff -r e1fd9db13b47 -r 561a9c25298e mpz/inp_raw.c
-
--- a/mpz/inp_raw.c Tue Dec 22 23:49:51 2020 +0100
-
+++ b/mpz/inp_raw.c Thu Oct 21 19:06:49 2021 +0200
-
@@ -88,8 +88,11 @@
-
-
abs_csize = ABS (csize);
-
-
+ if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
-
+ return 0; /* Bit size overflows */
-
+
-
/* round up to a multiple of limbs */
-
- abs_xsize = BITS_TO_LIMBS (abs_csize*8);
-
+ abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
-
-
if (abs_xsize != 0)
-
{
-
+2 -4
pkgs/development/libraries/gmp/6.x.nix
···
let self = stdenv.mkDerivation rec {
pname = "gmp${lib.optionalString cxx "-with-cxx"}";
-
version = "6.2.1";
+
version = "6.3.0";
src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv
urls = [ "mirror://gnu/gmp/gmp-${version}.tar.bz2" "ftp://ftp.gmplib.org/pub/gmp-${version}/gmp-${version}.tar.bz2" ];
-
sha256 = "0z2ddfiwgi0xbf65z4fg4hqqzlhv0cc6hdcswf3c6n21xdmk5sga";
+
hash = "sha256-rCghGnz7YJuuLiyNYFjWbI/pZDT3QM9v4uR7AA0cIMs=";
};
-
-
patches = [ ./6.2.1-CVE-2021-43618.patch ];
#outputs TODO: split $cxx due to libstdc++ dependency
# maybe let ghc use a version with *.so shared with rest of nixpkgs and *.a added
+8 -9
pkgs/development/libraries/gnu-config/default.nix
···
# files.
let
-
rev = "63acb96f92473ceb5e21d873d7c0aee266b3d6d3";
+
rev = "d4e37b5868ef910e3e52744c34408084bb13051c";
# Don't use fetchgit as this is needed during Aarch64 bootstrapping
configGuess = fetchurl {
+
name = "config.guess-${builtins.substring 0 7 rev}";
url = "https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=${rev}";
-
sha256 = "049qgfh4xjd4fxd7ygm1phd5faqphfvhfcv8dsdldprsp86lf55v";
+
sha256 = "191czpnbc1nxrygg8fd3839y1f4m9x43rp57vgrsas6p07zzh3c1";
};
configSub = fetchurl {
+
name = "config.sub-${builtins.substring 0 7 rev}";
url = "https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=${rev}";
-
sha256 = "1rk30y27mzls49wyfdb5jhzjr08hkxl7xqhnxmhcmkvqlmpsjnxl";
+
sha256 = "0148p54gw10p6sk2rn3gi9vvqm89rk8kcvl9335ckayhanx31381";
};
in stdenv.mkDerivation {
pname = "gnu-config";
-
version = "2023-01-21";
+
version = "2023-07-31";
buildCommand = ''
-
mkdir -p $out
-
cp ${configGuess} $out/config.guess
-
cp ${configSub} $out/config.sub
-
-
chmod +x $out/config.*
+
install -Dm755 ${configGuess} $out/config.guess
+
install -Dm755 ${configSub} $out/config.sub
'';
meta = with lib; {
+13 -4
pkgs/development/libraries/gnutls/default.nix
···
{ config, lib, stdenv, fetchurl, zlib, lzo, libtasn1, nettle, pkg-config, lzip
, perl, gmp, autoconf, automake, libidn2, libiconv
+
, fetchpatch, texinfo
, unbound, dns-root-data, gettext, util-linux
, cxxBindings ? !stdenv.hostPlatform.isStatic # tries to link libstdc++.so
, tpmSupport ? false, trousers, which, nettools, libunistring
···
stdenv.mkDerivation rec {
pname = "gnutls";
-
version = "3.8.0";
+
version = "3.8.1";
src = fetchurl {
url = "mirror://gnupg/gnutls/v${lib.versions.majorMinor version}/gnutls-${version}.tar.xz";
-
sha256 = "sha256-DqDRGhZgoeY/lg8Vexl6vm0MjLMlW+JOH7OBWTC5vcU=";
+
hash = "sha256-uoueFa4gq6iPRGYZePW1hjSUMW/n5yLt6dBp/mKUgpw=";
};
outputs = [ "bin" "dev" "out" "man" "devdoc" ];
···
outputInfo = "devdoc";
outputDoc = "devdoc";
-
patches = [ ./nix-ssl-cert-file.patch ];
+
patches = [
+
(fetchpatch { #TODO: when updating drop this patch and texinfo
+
name = "GNUTLS_NO_EXTENSIONS.patch";
+
url = "https://gitlab.com/gnutls/gnutls/-/commit/abfa8634db940115a11a07596ce53c8f9c4f87d2.diff";
+
hash = "sha256-3M5WdNoVx9gUwTUPgu/sXmsaNg+j5d6liXs0UZz8fGU=";
+
})
+
+
./nix-ssl-cert-file.patch
+
];
# Skip some tests:
# - pkg-config: building against the result won't work before installing (3.5.11)
···
++ lib.optional (withP11-kit) p11-kit
++ lib.optional (tpmSupport && stdenv.isLinux) trousers;
-
nativeBuildInputs = [ perl pkg-config ]
+
nativeBuildInputs = [ perl pkg-config texinfo ]
++ lib.optionals doCheck [ which nettools util-linux ];
propagatedBuildInputs = [ nettle ]
+28
pkgs/development/libraries/libavif/default.nix
···
, libjpeg
, dav1d
, libyuv
+
, gdk-pixbuf
+
, makeWrapper
}:
+
+
let
+
gdkPixbufModuleDir = "${placeholder "out"}/${gdk-pixbuf.moduleDir}";
+
gdkPixbufModuleFile = "${placeholder "out"}/${gdk-pixbuf.binaryDir}/avif-loaders.cache";
+
in
stdenv.mkDerivation rec {
pname = "libavif";
···
"-DAVIF_CODEC_DAV1D=ON" # best decoder (fast)
"-DAVIF_CODEC_AOM_DECODE=OFF"
"-DAVIF_BUILD_APPS=ON"
+
"-DAVIF_BUILD_GDK_PIXBUF=ON"
];
nativeBuildInputs = [
cmake
pkg-config
+
gdk-pixbuf
+
makeWrapper
];
buildInputs = [
+
gdk-pixbuf
libaom
zlib
libpng
···
dav1d
libyuv
];
+
+
postPatch = ''
+
substituteInPlace contrib/gdk-pixbuf/avif.thumbnailer.in \
+
--replace '@CMAKE_INSTALL_FULL_BINDIR@/gdk-pixbuf-thumbnailer' "$out/libexec/gdk-pixbuf-thumbnailer-avif"
+
'';
+
+
env.PKG_CONFIG_GDK_PIXBUF_2_0_GDK_PIXBUF_MODULEDIR = gdkPixbufModuleDir;
+
+
postInstall = ''
+
GDK_PIXBUF_MODULEDIR=${gdkPixbufModuleDir} \
+
GDK_PIXBUF_MODULE_FILE=${gdkPixbufModuleFile} \
+
gdk-pixbuf-query-loaders --update-cache
+
+
mkdir -p "$out/bin"
+
makeWrapper ${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer "$out/libexec/gdk-pixbuf-thumbnailer-avif" \
+
--set GDK_PIXBUF_MODULE_FILE ${gdkPixbufModuleFile}
+
'';
meta = with lib; {
description = "C implementation of the AV1 Image File Format";
+1 -1
pkgs/development/libraries/libhwy/default.nix
···
rev = version;
hash = "sha256-Gym2iHq5ws9kuG4HWSQndD8hVugV4USZt6dUFnEkLwY=";
};
-
patches = lib.optionals (with stdenv; isAarch64 && isLinux) [ # conditional, temporarily
+
patches = [
# backport for compilation issue on aarch64
# https://github.com/google/highway/issues/1613
(fetchpatch {
+10 -12
pkgs/development/libraries/librsvg/default.nix
···
, pkg-config
, glib
, gdk-pixbuf
+
, installShellFiles
, pango
, cairo
, libxml2
···
nativeBuildInputs = [
gdk-pixbuf
+
installShellFiles
pkg-config
rustc
cargo-auditable-cargo-wrapper
···
postConfigure = ''
GDK_PIXBUF=$out/lib/gdk-pixbuf-2.0/2.10.0
mkdir -p $GDK_PIXBUF/loaders
-
sed -e "s#gdk_pixbuf_moduledir = .*#gdk_pixbuf_moduledir = $GDK_PIXBUF/loaders#" \
-
-i gdk-pixbuf-loader/Makefile
-
sed -e "s#gdk_pixbuf_cache_file = .*#gdk_pixbuf_cache_file = $GDK_PIXBUF/loaders.cache#" \
-
-i gdk-pixbuf-loader/Makefile
-
sed -e "s#\$(GDK_PIXBUF_QUERYLOADERS)#GDK_PIXBUF_MODULEDIR=$GDK_PIXBUF/loaders \$(GDK_PIXBUF_QUERYLOADERS)#" \
-
-i gdk-pixbuf-loader/Makefile
+
sed -i gdk-pixbuf-loader/Makefile \
+
-e "s#gdk_pixbuf_moduledir = .*#gdk_pixbuf_moduledir = $GDK_PIXBUF/loaders#" \
+
-e "s#gdk_pixbuf_cache_file = .*#gdk_pixbuf_cache_file = $GDK_PIXBUF/loaders.cache#" \
+
-e "s#\$(GDK_PIXBUF_QUERYLOADERS)#GDK_PIXBUF_MODULEDIR=$GDK_PIXBUF/loaders \$(GDK_PIXBUF_QUERYLOADERS)#"
# Fix thumbnailer path
sed -e "s#@bindir@\(/gdk-pixbuf-thumbnailer\)#${gdk-pixbuf}/bin\1#g" \
···
cat ${lib.getLib gdk-pixbuf}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache $GDK_PIXBUF/loaders.cache > $GDK_PIXBUF/loaders.cache.tmp
mv $GDK_PIXBUF/loaders.cache.tmp $GDK_PIXBUF/loaders.cache
-
mkdir -p "$out/share/bash-completion/completions/"
-
${emulator} $out/bin/rsvg-convert --completion bash > "$out/share/bash-completion/completions/rsvg-convert"
-
mkdir -p "$out/share/zsh/site-functions/"
-
${emulator} $out/bin/rsvg-convert --completion zsh > "$out/share/zsh/site-functions/_rsvg-convert"
-
mkdir -p "$out/share/fish/vendor_completions.d/"
-
${emulator} $out/bin/rsvg-convert --completion fish > "$out/share/fish/vendor_completions.d/rsvg-convert.fish"
+
installShellCompletion --cmd rsvg-convert \
+
--bash <(${emulator} $out/bin/rsvg-convert --completion bash) \
+
--fish <(${emulator} $out/bin/rsvg-convert --completion fish) \
+
--zsh <(${emulator} $out/bin/rsvg-convert --completion zsh)
'';
postFixup = lib.optionalString withIntrospection ''
+2 -2
pkgs/development/libraries/openexr/3.nix
···
stdenv.mkDerivation rec {
pname = "openexr";
-
version = "3.1.7";
+
version = "3.1.10";
src = fetchFromGitHub {
owner = "AcademySoftwareFoundation";
repo = "openexr";
rev = "v${version}";
-
sha256 = "sha256-Kl+aOA797aZvrvW4ZQNHdSU7YFPieZEzX3aYeaoH6eU=";
+
sha256 = "sha256-8oV7Himk9AS2e2Z3OREE7KQgFIUysXwATlUN51dDe5M=";
};
outputs = [ "bin" "dev" "out" "doc" ];
+2 -2
pkgs/development/libraries/openldap/default.nix
···
stdenv.mkDerivation rec {
pname = "openldap";
-
version = "2.6.5";
+
version = "2.6.6";
src = fetchurl {
url = "https://www.openldap.org/software/download/OpenLDAP/openldap-release/${pname}-${version}.tgz";
-
hash = "sha256-Lieo1PTCr4/oQLVzJxwgqhY+JJh/l2UhRkQpD1vrONk=";
+
hash = "sha256-CC6ZjPVCmE1DY0RC2+EdqGB1nlEJBxUupXm9xC/jnqA=";
};
# TODO: separate "out" and "bin"
-54
pkgs/development/libraries/openssl/3.0/CVE-2023-2975.patch
···
-
From 6a83f0c958811f07e0d11dfc6b5a6a98edfd5bdc Mon Sep 17 00:00:00 2001
-
From: Tomas Mraz <tomas@openssl.org>
-
Date: Tue, 4 Jul 2023 17:30:35 +0200
-
Subject: [PATCH] Do not ignore empty associated data with AES-SIV mode
-
-
The AES-SIV mode allows for multiple associated data items
-
authenticated separately with any of these being 0 length.
-
-
The provided implementation ignores such empty associated data
-
which is incorrect in regards to the RFC 5297 and is also
-
a security issue because such empty associated data then become
-
unauthenticated if an application expects to authenticate them.
-
-
Fixes CVE-2023-2975
-
-
Reviewed-by: Matt Caswell <matt@openssl.org>
-
Reviewed-by: Paul Dale <pauli@openssl.org>
-
(Merged from https://github.com/openssl/openssl/pull/21384)
-
-
(cherry picked from commit c426c281cfc23ab182f7d7d7a35229e7db1494d9)
-
---
-
.../implementations/ciphers/cipher_aes_siv.c | 18 +++++++++++-------
-
1 file changed, 11 insertions(+), 7 deletions(-)
-
-
diff --git a/providers/implementations/ciphers/cipher_aes_siv.c b/providers/implementations/ciphers/cipher_aes_siv.c
-
index 45010b90db2a..b396c8651a32 100644
-
--- a/providers/implementations/ciphers/cipher_aes_siv.c
-
+++ b/providers/implementations/ciphers/cipher_aes_siv.c
-
@@ -120,14 +120,18 @@ static int siv_cipher(void *vctx, unsigned char *out, size_t *outl,
-
if (!ossl_prov_is_running())
-
return 0;
-
-
- if (inl == 0) {
-
- *outl = 0;
-
- return 1;
-
- }
-
+ /* Ignore just empty encryption/decryption call and not AAD. */
-
+ if (out != NULL) {
-
+ if (inl == 0) {
-
+ if (outl != NULL)
-
+ *outl = 0;
-
+ return 1;
-
+ }
-
-
- if (outsize < inl) {
-
- ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
-
- return 0;
-
+ if (outsize < inl) {
-
+ ERR_raise(ERR_LIB_PROV, PROV_R_OUTPUT_BUFFER_TOO_SMALL);
-
+ return 0;
-
+ }
-
}
-
-
if (ctx->hw->cipher(ctx, out, in, inl) <= 0)
+2 -5
pkgs/development/libraries/openssl/default.nix
···
};
openssl_3 = common {
-
version = "3.0.9";
-
sha256 = "sha256-6xqwR4FHQ2D3fDGKuJ2MWgOrw45j1lpgPKu/GwCh3JA=";
+
version = "3.0.10";
+
sha256 = "sha256-F2HU9bE6ECi5tvPUuOF/6wztyTcPav5h1xk9LNzoMyM=";
patches = [
./3.0/nix-ssl-cert-file.patch
# openssl will only compile in KTLS if the current kernel supports it.
# This patch disables build-time detection.
./3.0/openssl-disable-kernel-detection.patch
-
-
# https://www.openssl.org/news/secadv/20230714.txt
-
./3.0/CVE-2023-2975.patch
(if stdenv.hostPlatform.isDarwin
then ./use-etc-ssl-certs-darwin.patch
+6
pkgs/development/libraries/protobuf/3.23.nix
···
+
{ callPackage, ... } @ args:
+
+
callPackage ./generic-v3-cmake.nix ({
+
version = "3.23.4";
+
sha256 = "sha256-eI+mrsZAOLEsdyTC3B+K+GjD3r16CmPx1KJ2KhCwFdg=";
+
} // args)
+6 -5
pkgs/development/libraries/protobuf/generic-v3-cmake.nix
···
];
buildInputs = [
-
abseil-cpp
zlib
];
-
# After 3.20, CMakeLists.txt can now be found at the top-level, however
-
# a stub cmake/CMakeLists.txt still exists for compatibility with previous build assumptions
-
cmakeDir = "../cmake";
+
propagatedBuildInputs = [
+
abseil-cpp
+
];
+
+
cmakeDir = if lib.versionOlder version "3.22" then "../cmake" else null;
cmakeFlags = [
"-Dprotobuf_ABSL_PROVIDER=package"
-
] ++ lib.optionals (!stdenv.targetPlatform.isStatic) [
+
] ++ lib.optionals (!stdenv.targetPlatform.isStatic) [
"-Dprotobuf_BUILD_SHARED_LIBS=ON"
]
# Tests fail to build on 32-bit platforms; fixed in 3.22
+4 -13
pkgs/development/libraries/protobufc/default.nix
···
{ lib
, stdenv
, fetchFromGitHub
-
, fetchpatch
, autoreconfHook
, pkg-config
, protobuf
···
stdenv.mkDerivation rec {
pname = "protobuf-c";
-
version = "1.4.1";
+
version = "unstable-2023-07-08";
src = fetchFromGitHub {
owner = "protobuf-c";
repo = "protobuf-c";
-
rev = "refs/tags/v${version}";
-
hash = "sha256-TJCLzxozuZ8ynrBQ2lKyk03N+QA/lbOwywUjDUdTlbM=";
+
rev = "fa86fddbd000316772d1deb5a8d1201fa7599ef7";
+
hash = "sha256-pmqZYFREPgSrWPekymTglhtAv6gQR1gP3dOl3hqjYig=";
};
-
patches = [
-
# https://github.com/protobuf-c/protobuf-c/pull/534
-
(fetchpatch {
-
url = "https://github.com/protobuf-c/protobuf-c/commit/a6c9ea5207aeac61c57b446ddf5a6b68308881d8.patch";
-
hash = "sha256-wTb8+YbvrCrOVpgthI5SJdG/CpQcOzCX4Bv47FPY804=";
-
})
-
];
-
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ protobuf zlib ];
-
PROTOC = lib.getExe buildPackages.protobuf;
+
env.PROTOC = lib.getExe buildPackages.protobuf;
meta = with lib; {
homepage = "https://github.com/protobuf-c/protobuf-c/";
+3
pkgs/development/libraries/tix/default.nix
···
})
# Remove duplicated definition of XLowerWindow
./duplicated-xlowerwindow.patch
+
# Fix incompatible function pointer conversions and implicit definition of `panic`.
+
# `panic` is just `Tcl_Panic`, but it is not defined on Darwin due to a conflict with `mach/mach.h`.
+
./fix-clang16.patch
] ++ lib.optional (tcl.release == "8.6")
(fetchpatch {
name = "tix-8.4.3-tcl8.6.patch";
+215
pkgs/development/libraries/tix/fix-clang16.patch
···
+
diff -ur a/generic/tixDItem.c b/generic/tixDItem.c
+
--- a/generic/tixDItem.c 2004-03-27 19:44:56.000000000 -0700
+
+++ b/generic/tixDItem.c 2023-07-11 14:49:51.583894242 -0600
+
@@ -30,7 +30,7 @@
+
Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value,
+
char *widRec, int offset));
+
+
-static char *DItemPrintProc _ANSI_ARGS_((
+
+static const char *DItemPrintProc _ANSI_ARGS_((
+
ClientData clientData, Tk_Window tkwin, char *widRec,
+
int offset, Tcl_FreeProc **freeProcPtr));
+
+
@@ -548,7 +548,7 @@
+
return TCL_OK;
+
}
+
+
-static char *DItemPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+
+static const char *DItemPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+
ClientData clientData;
+
Tk_Window tkwin;
+
char *widRec;
+
diff -ur a/generic/tixDiStyle.c b/generic/tixDiStyle.c
+
--- a/generic/tixDiStyle.c 2004-03-27 19:44:56.000000000 -0700
+
+++ b/generic/tixDiStyle.c 2023-07-11 15:02:45.245210252 -0600
+
@@ -31,7 +31,7 @@
+
static int DItemStyleParseProc _ANSI_ARGS_((ClientData clientData,
+
Tcl_Interp *interp, Tk_Window tkwin,
+
CONST84 char *value,char *widRec, int offset));
+
-static char * DItemStylePrintProc _ANSI_ARGS_((
+
+static const char * DItemStylePrintProc _ANSI_ARGS_((
+
ClientData clientData, Tk_Window tkwin,
+
char *widRec, int offset,
+
Tcl_FreeProc **freeProcPtr));
+
@@ -785,7 +785,7 @@
+
+
hashPtr = Tcl_CreateHashEntry(&stylePtr->base.items, (char*)iPtr, &isNew);
+
if (!isNew) {
+
- panic("DItem is already associated with style");
+
+ Tcl_Panic("DItem is already associated with style");
+
} else {
+
Tcl_SetHashValue(hashPtr, (char*)iPtr);
+
}
+
@@ -801,7 +801,7 @@
+
+
hashPtr = Tcl_FindHashEntry(&stylePtr->base.items, (char*)iPtr);
+
if (hashPtr == NULL) {
+
- panic("DItem is not associated with style");
+
+ Tcl_Panic("DItem is not associated with style");
+
}
+
Tcl_DeleteHashEntry(hashPtr);
+
stylePtr->base.refCount--;
+
@@ -998,7 +998,7 @@
+
return TCL_ERROR;
+
}
+
+
-static char *DItemStylePrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+
+static const char *DItemStylePrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+
ClientData clientData;
+
Tk_Window tkwin;
+
char *widRec;
+
diff -ur a/generic/tixForm.c b/generic/tixForm.c
+
--- a/generic/tixForm.c 2004-03-27 19:44:56.000000000 -0700
+
+++ b/generic/tixForm.c 2023-07-11 14:53:45.695753419 -0600
+
@@ -802,7 +802,7 @@
+
* Now set all the client's geometry
+
*/
+
if (PlaceAllClients(masterPtr) != TCL_OK) {
+
- panic("circular dependency");
+
+ Tcl_Panic("circular dependency");
+
}
+
+
for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+
diff -ur a/generic/tixGrData.c b/generic/tixGrData.c
+
--- a/generic/tixGrData.c 2004-03-27 19:44:56.000000000 -0700
+
+++ b/generic/tixGrData.c 2023-07-11 14:54:19.644741199 -0600
+
@@ -296,7 +296,7 @@
+
Tcl_DeleteHashEntry(cy);
+
}
+
else {
+
- panic("Inconsistent grid dataset: (%d,%d) : %x %x", x, y, cx, cy);
+
+ Tcl_Panic("Inconsistent grid dataset: (%d,%d) : %x %x", x, y, cx, cy);
+
}
+
+
return 1;
+
diff -ur a/generic/tixGrid.c b/generic/tixGrid.c
+
--- a/generic/tixGrid.c 2008-02-27 21:10:43.000000000 -0700
+
+++ b/generic/tixGrid.c 2023-07-11 14:53:59.283841038 -0600
+
@@ -831,7 +831,7 @@
+
* All mapped windows should have been unmapped when the
+
* the entries were deleted
+
*/
+
- panic("tixGrid: mappedWindows not NULL");
+
+ Tcl_Panic("tixGrid: mappedWindows not NULL");
+
}
+
+
Tk_FreeOptions(configSpecs, (char *) wPtr, wPtr->dispData.display, 0);
+
diff -ur a/generic/tixHList.c b/generic/tixHList.c
+
--- a/generic/tixHList.c 2008-02-27 21:05:29.000000000 -0700
+
+++ b/generic/tixHList.c 2023-07-11 14:55:20.699375202 -0600
+
@@ -2036,7 +2036,7 @@
+
break;
+
}
+
if (wPtr->headerWin != NULL) {
+
- panic("HList: header subwindow deleted illegally\n");
+
+ Tcl_Panic("HList: header subwindow deleted illegally\n");
+
}
+
#endif
+
break;
+
@@ -2117,7 +2117,7 @@
+
* All mapped windows should have been unmapped when the
+
* the entries were deleted
+
*/
+
- panic("tixHList: mappedWindows not NULL");
+
+ Tcl_Panic("tixHList: mappedWindows not NULL");
+
}
+
if (wPtr->headerWin) {
+
wPtr->headerWin = NULL;
+
diff -ur a/generic/tixImgCmp.c b/generic/tixImgCmp.c
+
--- a/generic/tixImgCmp.c 2008-02-27 21:05:29.000000000 -0700
+
+++ b/generic/tixImgCmp.c 2023-07-11 14:59:16.429640785 -0600
+
@@ -142,8 +142,8 @@
+
* The type record for bitmap images:
+
*/
+
static int ImgCmpCreate _ANSI_ARGS_((Tcl_Interp *interp,
+
- char *name, int argc, Tcl_Obj *CONST objv[],
+
- Tk_ImageType *typePtr, Tk_ImageMaster master,
+
+ const char *name, int argc, Tcl_Obj *CONST objv[],
+
+ const Tk_ImageType *typePtr, Tk_ImageMaster master,
+
ClientData *clientDataPtr));
+
static ClientData ImgCmpGet _ANSI_ARGS_((Tk_Window tkwin,
+
ClientData clientData));
+
@@ -378,11 +378,11 @@
+
ImgCmpCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
+
Tcl_Interp *interp; /* Interpreter for application containing
+
* image. */
+
- char *name; /* Name to use for image. */
+
+ const char *name; /* Name to use for image. */
+
int argc; /* Number of arguments. */
+
Tcl_Obj *CONST objv[]; /* Argument strings for options (doesn't
+
* include image name or type). */
+
- Tk_ImageType *typePtr; /* Pointer to our type record (not used). */
+
+ const Tk_ImageType *typePtr;/* Pointer to our type record (not used). */
+
Tk_ImageMaster master; /* Token for image, to be used by us in
+
* later callbacks. */
+
ClientData *clientDataPtr; /* Store manager's token for image here;
+
diff -ur a/generic/tixImgXpm.c b/generic/tixImgXpm.c
+
--- a/generic/tixImgXpm.c 2023-07-11 15:01:05.887387236 -0600
+
+++ b/generic/tixImgXpm.c 2023-07-11 15:00:37.209042328 -0600
+
@@ -22,8 +22,8 @@
+
*/
+
+
static int ImgXpmCreate _ANSI_ARGS_((Tcl_Interp *interp,
+
- char *name, int argc, Tcl_Obj *CONST objv[],
+
- Tk_ImageType *typePtr, Tk_ImageMaster master,
+
+ const char *name, int argc, Tcl_Obj *CONST objv[],
+
+ const Tk_ImageType *typePtr, Tk_ImageMaster master,
+
ClientData *clientDataPtr));
+
static ClientData ImgXpmGet _ANSI_ARGS_((Tk_Window tkwin,
+
ClientData clientData));
+
@@ -115,11 +115,11 @@
+
ImgXpmCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
+
Tcl_Interp *interp; /* Interpreter for application containing
+
* image. */
+
- char *name; /* Name to use for image. */
+
+ const char *name; /* Name to use for image. */
+
int argc; /* Number of arguments. */
+
Tcl_Obj *CONST objv[]; /* Argument strings for options (doesn't
+
* include image name or type). */
+
- Tk_ImageType *typePtr; /* Pointer to our type record (not used). */
+
+ const Tk_ImageType *typePtr;/* Pointer to our type record (not used). */
+
Tk_ImageMaster master; /* Token for image, to be used by us in
+
* later callbacks. */
+
ClientData *clientDataPtr; /* Store manager's token for image here;
+
@@ -1213,7 +1213,7 @@
+
PixmapMaster *masterPtr = (PixmapMaster *) masterData;
+
+
if (masterPtr->instancePtr != NULL) {
+
- panic("tried to delete pixmap image when instances still exist");
+
+ Tcl_Panic("tried to delete pixmap image when instances still exist");
+
}
+
masterPtr->tkMaster = NULL;
+
if (masterPtr->imageCmd != NULL) {
+
diff -ur a/generic/tixTList.c b/generic/tixTList.c
+
--- a/generic/tixTList.c 2008-02-27 21:05:29.000000000 -0700
+
+++ b/generic/tixTList.c 2023-07-11 14:55:35.960761327 -0600
+
@@ -1208,7 +1208,7 @@
+
sprintf(buff, "%d", i);
+
Tcl_AppendResult(interp, buff, NULL);
+
} else {
+
- panic("TList list entry is invalid");
+
+ Tcl_Panic("TList list entry is invalid");
+
}
+
} else {
+
Tcl_ResetResult(interp);
+
diff -ur a/generic/tixUtils.c b/generic/tixUtils.c
+
--- a/generic/tixUtils.c 2008-02-27 21:29:17.000000000 -0700
+
+++ b/generic/tixUtils.c 2023-07-11 15:01:43.718202631 -0600
+
@@ -24,7 +24,7 @@
+
static int ReliefParseProc(ClientData clientData,
+
Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value,
+
char *widRec, int offset);
+
-static char * ReliefPrintProc(ClientData clientData,
+
+static const char * ReliefPrintProc(ClientData clientData,
+
Tk_Window tkwin, char *widRec, int offset,
+
Tix_FreeProc **freeProcPtr);
+
+
@@ -637,7 +637,7 @@
+
return TCL_ERROR;
+
}
+
+
-static char *
+
+static const char *
+
ReliefPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+
ClientData clientData;
+
Tk_Window tkwin;
+2 -2
pkgs/development/libraries/umockdev/default.nix
···
stdenv.mkDerivation (finalAttrs: {
pname = "umockdev";
-
version = "0.17.17";
+
version = "0.17.18";
outputs = [ "bin" "out" "dev" "devdoc" ];
src = fetchurl {
url = "https://github.com/martinpitt/umockdev/releases/download/${finalAttrs.version}/umockdev-${finalAttrs.version}.tar.xz";
-
sha256 = "sha256-IOYhseRYsyADz+qZc5tngkuGZShUqLzjPiYSTjR/32w=";
+
sha256 = "sha256-RmrT4McV5W9Q6mqWUWWCPQc6hBN6y4oeObZlc2SKmF8=";
};
patches = [
+3 -6
pkgs/development/libraries/webp-pixbuf-loader/default.nix
···
let
inherit (gdk-pixbuf) moduleDir;
-
-
# turning lib/gdk-pixbuf-#.#/#.#.#/loaders into lib/gdk-pixbuf-#.#/#.#.#/loaders.cache
-
# removeSuffix is just in case moduleDir gets a trailing slash
-
loadersPath = (lib.strings.removeSuffix "/" gdk-pixbuf.moduleDir) + ".cache";
+
loadersPath = "${gdk-pixbuf.binaryDir}/webp-loaders.cache";
in
stdenv.mkDerivation rec {
pname = "webp-pixbuf-loader";
···
postPatch = ''
# It looks for gdk-pixbuf-thumbnailer in this package's bin rather than the gdk-pixbuf bin. We need to patch that.
substituteInPlace webp-pixbuf.thumbnailer.in \
-
--replace "@bindir@/gdk-pixbuf-thumbnailer" "$out/bin/webp-thumbnailer"
+
--replace "@bindir@/gdk-pixbuf-thumbnailer" "$out/libexec/gdk-pixbuf-thumbnailer-webp"
'';
postInstall = ''
···
# It assumes gdk-pixbuf-thumbnailer can find the webp loader in the loaders.cache referenced by environment variable, breaking containment.
# So we replace it with a wrapped executable.
mkdir -p "$out/bin"
-
makeWrapper "${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer" "$out/bin/webp-thumbnailer" \
+
makeWrapper "${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer" "$out/libexec/gdk-pixbuf-thumbnailer-webp" \
--set GDK_PIXBUF_MODULE_FILE "$out/${loadersPath}"
'';
+2
pkgs/development/python-modules/adguardhome/default.nix
···
yarl
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
aresponses
pytest-asyncio
+2
pkgs/development/python-modules/aio-geojson-client/default.nix
···
haversine
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
aresponses
mock
+2
pkgs/development/python-modules/aio-geojson-generic-client/default.nix
···
pytz
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
aresponses
pytest-asyncio
+2
pkgs/development/python-modules/aio-geojson-geonetnz-quakes/default.nix
···
pytz
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
aresponses
pytest-asyncio
+2
pkgs/development/python-modules/aio-geojson-geonetnz-volcano/default.nix
···
pytz
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
aresponses
mock
+2
pkgs/development/python-modules/aio-geojson-nsw-rfs-incidents/default.nix
···
pytz
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
aresponses
pytest-asyncio
+2
pkgs/development/python-modules/aio-geojson-usgs-earthquakes/default.nix
···
pytz
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
];
+2
pkgs/development/python-modules/aio-georss-client/default.nix
···
dateparser
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
aresponses
mock
+2
pkgs/development/python-modules/aio-georss-gdacs/default.nix
···
dateparser
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
aresponses
pytest-asyncio
+2
pkgs/development/python-modules/aiohttp-retry/default.nix
···
aiohttp
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytest-aiohttp
pytestCheckHook
+4
pkgs/development/python-modules/aiohttp/default.nix
···
, pythonOlder
# build_requires
, setuptools
+
, wheel
# install_requires
, attrs
, charset-normalizer
···
url = "https://github.com/aio-libs/aiohttp/commit/7dcc235cafe0c4521bbbf92f76aecc82fee33e8b.patch";
hash = "sha256-ZzhlE50bmA+e2XX2RH1FuWQHZIAa6Dk/hZjxPoX5t4g=";
})
+
# https://github.com/aio-libs/aiohttp/pull/7454 but does not merge cleanly
+
./setuptools-67.5.0-compatibility.diff
];
postPatch = ''
···
nativeBuildInputs = [
setuptools
+
wheel
];
propagatedBuildInputs = [
+27
pkgs/development/python-modules/aiohttp/setuptools-67.5.0-compatibility.diff
···
+
diff --git a/setup.cfg b/setup.cfg
+
index 6944b7e2..dfa65d69 100644
+
--- a/setup.cfg
+
+++ b/setup.cfg
+
@@ -128,6 +128,7 @@ filterwarnings =
+
ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning::
+
ignore:module 'sre_constants' is deprecated:DeprecationWarning:pkg_resources._vendor.pyparsing
+
ignore:path is deprecated. Use files.. instead. Refer to https.//importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.:DeprecationWarning:certifi.core
+
+ ignore:pkg_resources is deprecated as an API:DeprecationWarning
+
junit_suite_name = aiohttp_test_suite
+
norecursedirs = dist docs build .tox .eggs
+
minversion = 3.8.2
+
diff --git a/tests/test_circular_imports.py b/tests/test_circular_imports.py
+
index 22e5ea47..a655fd1d 100644
+
--- a/tests/test_circular_imports.py
+
+++ b/tests/test_circular_imports.py
+
@@ -113,6 +113,10 @@ def test_no_warnings(import_path: str) -> None:
+
"-W",
+
"ignore:Creating a LegacyVersion has been deprecated and will "
+
"be removed in the next major release:DeprecationWarning:",
+
+ # Deprecation warning emitted by setuptools v67.5.0+ triggered by importing
+
+ # `gunicorn.util`.
+
+ "-W", "ignore:pkg_resources is deprecated as an API:"
+
+ "DeprecationWarning",
+
"-c", f"import {import_path!s}",
+
# fmt: on
+
)
+2
pkgs/development/python-modules/aiojobs/default.nix
···
async-timeout
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
pytest-aiohttp
+4
pkgs/development/python-modules/amqp/default.nix
···
, case
, fetchPypi
, pytestCheckHook
+
, pytest-rerunfailures
, pythonOlder
, vine
}:
···
vine
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
case
pytestCheckHook
+
pytest-rerunfailures
];
disabledTests = [
+26 -6
pkgs/development/python-modules/ansi2html/default.nix
···
-
{ lib, buildPythonPackage, fetchPypi, isPy3k, six, mock, pytestCheckHook, setuptools, setuptools-scm }:
+
{ lib
+
, buildPythonPackage
+
, fetchpatch
+
, fetchPypi
+
, pytestCheckHook
+
, setuptools
+
, setuptools-scm
+
, wheel
+
}:
buildPythonPackage rec {
pname = "ansi2html";
version = "1.8.0";
format = "pyproject";
-
-
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
hash = "sha256-OLgqKYSCofomE/D5yb6z23Ko+DLurFjrLke/Ms039tU=";
};
-
nativeBuildInputs = [ setuptools-scm ];
-
propagatedBuildInputs = [ six setuptools ];
+
patches = [
+
(fetchpatch {
+
name = "update-build-requirements.patch";
+
url = "https://github.com/pycontribs/ansi2html/commit/be9c47dd39e500b2e34e95efde90d0a3b44daaee.patch";
+
hash = "sha256-nvOclsgysg+4sK694ppls0BLfq5MCJJQW3V/Ru30D/k=";
+
})
+
];
+
+
nativeBuildInputs = [
+
setuptools
+
setuptools-scm
+
wheel
+
];
preCheck = "export PATH=$PATH:$out/bin";
-
nativeCheckInputs = [ mock pytestCheckHook ];
+
+
nativeCheckInputs = [
+
pytestCheckHook
+
];
pythonImportsCheck = [ "ansi2html" ];
+2
pkgs/development/python-modules/asyncssh/default.nix
···
];
};
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
openssh
openssl
+9 -3
pkgs/development/python-modules/bluetooth-data-tools/default.nix
···
{ lib
, buildPythonPackage
, fetchFromGitHub
+
, cython_3
, poetry-core
, pytestCheckHook
, pythonOlder
···
buildPythonPackage rec {
pname = "bluetooth-data-tools";
-
version = "1.6.1";
+
version = "1.7.0";
format = "pyproject";
disabled = pythonOlder "3.9";
···
owner = "Bluetooth-Devices";
repo = pname;
rev = "refs/tags/v${version}";
-
hash = "sha256-A3zdM2kVmz8cUix9JT8cnIABZK64r6yiZisvb8A1RSQ=";
+
hash = "sha256-EmZPiZKm/80nJpPnJWhI9i4I6MhgQMifLOEUBFLqbSw=";
};
+
# The project can build both an optimized cython version and an unoptimized
+
# python version. This ensures we fail if we build the wrong one.
+
env.REQUIRE_CYTHON = 1;
+
nativeBuildInputs = [
+
cython_3
poetry-core
setuptools
];
···
description = "Library for converting bluetooth data and packets";
homepage = "https://github.com/Bluetooth-Devices/bluetooth-data-tools";
changelog = "https://github.com/Bluetooth-Devices/bluetooth-data-tools/blob/v${version}/CHANGELOG.md";
-
license = with licenses; [ asl20 ];
+
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}
+10 -7
pkgs/development/python-modules/curio/default.nix
···
__darwinAllowLocalNetworking = true;
disabledTests = [
-
"test_aside_basic" # times out
-
"test_write_timeout" # flaky, does not always time out
-
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
-
"test_ssl_outgoing" # touches network
-
"test_unix_echo" # socket bind error on hydra when built with other packages
-
"test_unix_ssl_server" # socket bind error on hydra when built with other packages
-
];
+
"test_aside_basic" # times out
+
"test_write_timeout" # flaky, does not always time out
+
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
+
"test_ssl_outgoing" # touches network
+
"test_unix_echo" # socket bind error on hydra when built with other packages
+
"test_unix_ssl_server" # socket bind error on hydra when built with other packages
+
] ++ lib.optionals stdenv.isDarwin [
+
# connects to python.org:1, expects an OsError, hangs in the darwin sandbox
+
"test_create_bad_connection"
+
];
pythonImportsCheck = [ "curio" ];
+2
pkgs/development/python-modules/datadog/default.nix
···
requests
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
click
freezegun
+8
pkgs/development/python-modules/dbus-fast/default.nix
···
{ lib
, async-timeout
, buildPythonPackage
+
, cython_3
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, setuptools
+
, wheel
}:
buildPythonPackage rec {
···
hash = "sha256-B+NW7ORKIBtjxeR0W0tX7V1MgBtNoyGFX35TXUl7rVE=";
};
+
# The project can build both an optimized cython version and an unoptimized
+
# python version. This ensures we fail if we build the wrong one.
+
env.REQUIRE_CYTHON = 1;
+
nativeBuildInputs = [
+
cython_3
poetry-core
setuptools
+
wheel
];
propagatedBuildInputs = [
+2
pkgs/development/python-modules/devolo-plc-api/default.nix
···
zeroconf
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytest-asyncio
pytest-httpx
+4 -2
pkgs/development/python-modules/django-cachalot/default.nix
···
, psycopg2
, beautifulsoup4
, python
+
, pytz
}:
buildPythonPackage rec {
pname = "django-cachalot";
-
version = "2.5.3";
+
version = "2.6.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "noripyt";
repo = "django-cachalot";
rev = "v${version}";
-
hash = "sha256-ayAN+PgK3aIpt4R8aeC6c6mRGTnfObycmkoXPTjx4WI=";
+
hash = "sha256-bCiIZkh02+7xL6aSWE9by+4dFDsanr0iXuO9QKpLOjw=";
};
patches = [
···
beautifulsoup4
django-debug-toolbar
psycopg2
+
pytz
];
pythonImportsCheck = [ "cachalot" ];
+2
pkgs/development/python-modules/django-cacheops/default.nix
···
six
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
pytest-django
-42
pkgs/development/python-modules/django-compat/default.nix
···
-
{ lib, buildPythonPackage, fetchFromGitHub, python,
-
django, six
-
}:
-
-
buildPythonPackage rec {
-
pname = "django-compat";
-
version = "1.0.15";
-
-
# the pypi packages don't include everything required for the tests
-
src = fetchFromGitHub {
-
owner = "arteria";
-
repo = "django-compat";
-
rev = "v${version}";
-
sha256 = "1pr6v38ahrsvxlgmcx69s4b5q5082f44gzi4h3c32sccdc4pwqxp";
-
};
-
-
patches = [
-
./fix-tests.diff
-
];
-
-
checkPhase = ''
-
runHook preCheck
-
-
# to convince the tests to run against the installed package, not the source directory, we extract the
-
# tests directory from it then dispose of the actual source
-
mv compat/tests .
-
rm -r compat
-
substituteInPlace runtests.py --replace compat.tests tests
-
${python.interpreter} runtests.py
-
-
runHook postCheck
-
'';
-
-
propagatedBuildInputs = [ django six ];
-
-
meta = with lib; {
-
description = "Forward and backwards compatibility layer for Django 1.4, 1.7, 1.8, 1.9, 1.10 and 1.11";
-
homepage = "https://github.com/arteria/django-compat";
-
license = licenses.mit;
-
maintainers = with maintainers; [ ris ];
-
};
-
}
-56
pkgs/development/python-modules/django-compat/fix-tests.diff
···
-
diff -ur a/compat/tests/settings.py b/compat/tests/settings.py
-
--- a/compat/tests/settings.py 2020-03-06 15:32:07.548482597 +0100
-
+++ b/compat/tests/settings.py 2020-03-06 22:19:25.422934249 +0100
-
@@ -16,11 +16,12 @@
-
'django.contrib.admin',
-
'django.contrib.auth',
-
'django.contrib.contenttypes',
-
+ 'django.contrib.messages',
-
'compat',
-
'compat.tests.test_app',
-
]
-
-
-MIDDLEWARE_CLASSES = (
-
+MIDDLEWARE = (
-
'django.contrib.sessions.middleware.SessionMiddleware',
-
'django.middleware.common.CommonMiddleware',
-
'django.middleware.csrf.CsrfViewMiddleware',
-
@@ -43,6 +44,7 @@
-
'django.template.context_processors.i18n',
-
'django.template.context_processors.tz',
-
'django.template.context_processors.request',
-
+ 'django.contrib.messages.context_processors.messages',
-
],
-
'loaders': [
-
'django.template.loaders.filesystem.Loader',
-
diff -ur a/compat/tests/test_compat.py b/compat/tests/test_compat.py
-
--- a/compat/tests/test_compat.py 2020-03-06 15:32:07.548482597 +0100
-
+++ b/compat/tests/test_compat.py 2020-03-06 15:37:39.202835075 +0100
-
@@ -9,7 +9,7 @@
-
from django.core.serializers.json import DjangoJSONEncoder
-
from django.test import TestCase, SimpleTestCase
-
from django.test.client import RequestFactory
-
-from django.contrib.auth.views import logout
-
+from django.contrib.auth.views import auth_logout
-
try:
-
from django.urls import NoReverseMatch
-
except ImportError:
-
@@ -103,7 +103,7 @@
-
Tests that passing a view name to ``resolve_url`` will result in the
-
URL path mapping to that view name.
-
"""
-
- resolved_url = resolve_url(logout)
-
+ resolved_url = resolve_url(auth_logout)
-
self.assertEqual('/accounts/logout/', resolved_url)
-
-
'''
-
diff -ur a/compat/tests/urls.py b/compat/tests/urls.py
-
--- a/compat/tests/urls.py 2020-03-06 15:32:07.548482597 +0100
-
+++ b/compat/tests/urls.py 2020-03-06 15:34:25.962377799 +0100
-
@@ -2,5 +2,5 @@
-
from django.contrib.auth import views
-
-
urlpatterns = [
-
- url(r'^accounts/logout/$', views.logout, name='logout'),
-
+ url(r'^accounts/logout/$', views.auth_logout, name='logout'),
-
]
+22 -3
pkgs/development/python-modules/django-haystack/default.nix
···
, fetchPypi
# build dependencies
+
, setuptools
, setuptools-scm
# dependencies
, django
# tests
+
, elasticsearch
, geopy
, nose
, pysolr
···
buildPythonPackage rec {
pname = "django-haystack";
version = "3.2.1";
-
format = "setuptools";
+
format = "pyproject";
+
disabled = pythonOlder "3.5";
src = fetchPypi {
···
'';
nativeBuildInputs = [
+
setuptools
setuptools-scm
];
-
propagatedBuildInputs = [
+
buildInputs = [
django
];
+
passthru.optional-dependencies = {
+
elasticsearch = [
+
elasticsearch
+
];
+
};
+
+
doCheck = lib.versionOlder django.version "4";
+
nativeCheckInputs = [
geopy
nose
···
python-dateutil
requests
whoosh
-
];
+
]
+
++ passthru.optional-dependencies.elasticsearch;
+
+
checkPhase = ''
+
runHook preCheck
+
python test_haystack/run_tests.py
+
runHook postCheck
+
'';
meta = with lib; {
description = "Pluggable search for Django";
-2
pkgs/development/python-modules/django-hijack/default.nix
···
# dependencies
, django
-
, django-compat
# tests
, pytest-django
···
propagatedBuildInputs = [
django
-
django-compat
];
nativeCheckInputs = [
+32 -9
pkgs/development/python-modules/django-mailman3/default.nix
···
-
{ lib, buildPythonPackage, fetchPypi, django-gravatar2, django-compressor
-
, django-allauth, mailmanclient, django, mock
+
{ lib
+
, buildPythonPackage
+
, fetchPypi
+
+
# propagates
+
, django-gravatar2
+
, django-allauth
+
, mailmanclient
+
, pytz
+
+
# tests
+
, django
+
, pytest-django
+
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "django-mailman3";
version = "1.3.9";
+
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-GpI1W0O9aJpLF/mcS23ktJDZsP69S2zQy7drOiWBnTM=";
};
+
postPatch = ''
+
substituteInPlace setup.py \
+
--replace 'django>=3.2,<4.2' 'django>=3.2,<4.3'
+
'';
+
propagatedBuildInputs = [
-
django-gravatar2 django-compressor django-allauth mailmanclient
+
django-allauth
+
django-gravatar2
+
mailmanclient
+
pytz
];
-
nativeCheckInputs = [ django mock ];
-
checkPhase = ''
-
cd $NIX_BUILD_TOP/$sourceRoot
-
PYTHONPATH=.:$PYTHONPATH django-admin.py test --settings=django_mailman3.tests.settings_test
-
'';
+
nativeCheckInputs = [
+
django
+
pytest-django
+
pytestCheckHook
+
];
-
pythonImportsCheck = [ "django_mailman3" ];
+
pythonImportsCheck = [
+
"django_mailman3"
+
];
meta = with lib; {
description = "Django library for Mailman UIs";
+22 -11
pkgs/development/python-modules/django-modelcluster/default.nix
···
{ lib
, buildPythonPackage
, fetchFromGitHub
+
, pythonOlder
+
+
# dependencies
, django
+
, pytz
+
+
# optionals
, django-taggit
-
, pytz
-
, pythonOlder
-
, python
+
+
# tests
+
, pytest-django
+
, pytestCheckHook
}:
buildPythonPackage rec {
···
src = fetchFromGitHub {
owner = "wagtail";
-
repo = pname;
-
rev = "v${version}";
+
repo = "modelcluster";
+
rev = "refs/tags/v${version}";
hash = "sha256-p6hvOkPWRVJYLHvwyn9nS05wblikRFmlSYZuLiCcuqc=";
};
···
django-taggit
];
-
nativeCheckInputs = passthru.optional-dependencies.taggit;
+
env.DJANGO_SETTINGS_MODULE = "tests.settings";
-
checkPhase = ''
-
runHook preCheck
-
${python.interpreter} ./runtests.py --noinput
-
runHook postCheck
-
'';
+
nativeCheckInputs = [
+
pytest-django
+
pytestCheckHook
+
] ++ passthru.optional-dependencies.taggit;
+
+
# https://github.com/wagtail/django-modelcluster/issues/173
+
disabledTests = lib.optionals (lib.versionAtLeast django.version "4.2") [
+
"test_formfield_callback"
+
];
meta = with lib; {
description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database";
+2
pkgs/development/python-modules/django-pattern-library/default.nix
···
changelog = "https://github.com/torchbox/django-pattern-library/blob/v${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ sephi ];
+
# https://github.com/torchbox/django-pattern-library/issues/212
+
broken = lib.versionAtLeast django.version "4.2";
};
}
+20 -11
pkgs/development/python-modules/django-scim2/default.nix
···
, buildPythonPackage
, fetchFromGitHub
+
# build-system
+
, poetry-core
+
# propagates
, django
-
, python-dateutil
, scim2-filter-parser
-
, gssapi
-
, python-ldap
-
, sssd
# tests
, mock
+
, pytest-django
+
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "django-scim2";
-
version = "0.17.3";
-
format = "setuptools";
+
version = "0.19.0";
+
format = "pyproject";
src = fetchFromGitHub {
owner = "15five";
repo = pname;
rev = "refs/tags/${version}";
-
hash = "sha256-5zdGPpjooiFoj+2OoglXhhKsPFB/KOHvrZWZd+1nZqU=";
+
hash = "sha256-larDh4f9/xVr11/n/WfkJ2Tx45DMQqyK3ZzkWAvzeig=";
};
+
postPatch = ''
+
substituteInPlace pyproject.toml \
+
--replace "poetry.masonry.api" "poetry.core.masonry.api"
+
'';
+
+
nativeBuildInputs = [
+
poetry-core
+
];
+
propagatedBuildInputs = [
django
-
python-dateutil
scim2-filter-parser
-
gssapi
-
python-ldap
-
sssd
];
pythonImportsCheck = [
···
nativeCheckInputs = [
mock
+
pytest-django
+
pytestCheckHook
];
meta = with lib; {
+
changelog = "https://github.com/15five/django-scim2/blob/${src.rev}/CHANGES.txt";
description = "A SCIM 2.0 Service Provider Implementation (for Django)";
homepage = "https://github.com/15five/django-scim2";
license = licenses.mit;
+2
pkgs/development/python-modules/django-sites/default.nix
···
description = "Alternative implementation of django sites framework";
homepage = "https://github.com/niwinz/django-sites";
license = lib.licenses.bsd3;
+
# has not been updated for django>=4.0
+
broken = lib.versionAtLeast django.version "4";
};
}
+3
pkgs/development/python-modules/djangorestframework-guardian/default.nix
···
{ lib
, buildPythonPackage
, fetchFromGitHub
+
, django
, django-guardian
, djangorestframework
}:
···
homepage = "https://github.com/rpkilby/django-rest-framework-guardian";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
+
# unmaintained, last compatible version is 3.x, use djangorestframework-guardian2 instead
+
broken = lib.versionAtLeast django.version "4";
};
}
+32 -10
pkgs/development/python-modules/drf-nested-routers/default.nix
···
{ lib
, buildPythonPackage
, fetchFromGitHub
-
, setuptools
+
, fetchpatch
, django
, djangorestframework
-
, pytest
-
, pytest-cov
+
, pytestCheckHook
, pytest-django
, ipdb
-
, python
}:
buildPythonPackage rec {
pname = "drf-nested-routers";
version = "0.93.4";
+
format = "setuptools";
src = fetchFromGitHub {
owner = "alanjds";
repo = "drf-nested-routers";
-
rev = "v${version}";
+
rev = "refs/tags/v${version}";
hash = "sha256-qlXNDydoQJ9FZB6G7yV/pNmx3BEo+lvRqsfjrvlbdNY=";
};
-
propagatedBuildInputs = [ django djangorestframework setuptools ];
-
nativeCheckInputs = [ pytest pytest-cov pytest-django ipdb ];
+
patches = [
+
# django4 compatibility
+
(fetchpatch {
+
url = "https://github.com/alanjds/drf-nested-routers/commit/59764cc356f7f593422b26845a9dfac0ad196120.patch";
+
hash = "sha256-mq3vLHzQlGl2EReJ5mVVQMMcYgGIVt/T+qi1STtQ0aI=";
+
})
+
(fetchpatch {
+
url = "https://github.com/alanjds/drf-nested-routers/commit/723a5729dd2ffcb66fe315f229789ca454986fa4.patch";
+
hash = "sha256-UCbBjwlidqsJ9vEEWlGzfqqMOr0xuB2TAaUxHsLzFfU=";
+
})
+
(fetchpatch {
+
url = "https://github.com/alanjds/drf-nested-routers/commit/38e49eb73759bc7dcaaa9166169590f5315e1278.patch";
+
hash = "sha256-IW4BLhHHhXDUZqHaXg46qWoQ89pMXv0ZxKjOCTnDcI0=";
+
})
+
];
-
checkPhase = ''
-
${python.interpreter} runtests.py --nolint
-
'';
+
buildInputs = [
+
django
+
];
+
+
propagatedBuildInputs = [
+
djangorestframework
+
];
+
+
nativeCheckInputs = [
+
ipdb
+
pytestCheckHook
+
pytest-django
+
];
meta = with lib; {
homepage = "https://github.com/alanjds/drf-nested-routers";
+2
pkgs/development/python-modules/falcon/default.nix
···
cython
];
+
__darwinAllowLocalNetworking = true;
+
preCheck = ''
export HOME=$TMPDIR
cp -R tests examples $TMPDIR
+2
pkgs/development/python-modules/feedparser/default.nix
···
sgmllib3k
];
+
__darwinAllowLocalNetworking = true;
+
checkPhase = ''
# Tests are failing
# AssertionError: unexpected '~' char in declaration
+55
pkgs/development/python-modules/ffmpy/default.nix
···
+
{ lib
+
, buildPythonPackage
+
, fetchFromGitHub
+
, pythonOlder
+
, pytestCheckHook
+
, go
+
, ffmpeg-headless
+
}:
+
+
buildPythonPackage rec {
+
pname = "ffmpy";
+
version = "0.3.1";
+
format = "setuptools";
+
+
disabled = pythonOlder "3.6";
+
+
src = fetchFromGitHub {
+
owner = "Ch00k";
+
repo = "ffmpy";
+
rev = "refs/tags/${version}";
+
hash = "sha256-kuLhmCG80BmXdqpW67UanBnuYiL2Oh1jKt7IgmVNEAM=";
+
};
+
+
postPatch = ''
+
# default to store ffmpeg
+
substituteInPlace ffmpy.py \
+
--replace 'executable="ffmpeg",' 'executable="${ffmpeg-headless}/bin/ffmpeg",'
+
+
# The tests test a mock that does not behave like ffmpeg. If we default to the nix-store ffmpeg they fail.
+
for fname in tests/*.py; do
+
echo 'FFmpeg.__init__.__defaults__ = ("ffmpeg", *FFmpeg.__init__.__defaults__[1:])' >>"$fname"
+
done
+
'';
+
+
pythonImportsCheck = [ "ffmpy" ];
+
+
nativeCheckInputs = [
+
pytestCheckHook
+
go
+
];
+
+
# the vendored ffmpeg mock binary assumes FHS
+
preCheck = ''
+
rm -v tests/ffmpeg/ffmpeg
+
HOME=$(mktemp -d) go build -o ffmpeg tests/ffmpeg/ffmpeg.go
+
export PATH=".:$PATH"
+
'';
+
+
meta = with lib; {
+
description = "A simple python interface for FFmpeg/FFprobe";
+
homepage = "https://github.com/Ch00k/ffmpy";
+
license = licenses.mit;
+
maintainers = with maintainers; [ pbsds ];
+
};
+
}
+2 -16
pkgs/development/python-modules/flit-core/default.nix
···
{ lib
, buildPythonPackage
-
, callPackage
, flit
}:
···
inherit (flit) version;
format = "pyproject";
-
outputs = [
-
"out"
-
"testsout"
-
];
-
inherit (flit) src patches;
-
preConfigure = ''
-
cd flit_core
-
'';
+
sourceRoot = "source/flit_core";
-
postInstall = ''
-
mkdir $testsout
-
cp -R ../tests $testsout/tests
-
'';
-
-
# check in passthru.tests.pytest to escape infinite recursion with setuptools-scm
+
# Tests are run in the "flit" package.
doCheck = false;
passthru.tests = {
inherit flit;
-
pytest = callPackage ./tests.nix { };
};
meta = with lib; {
-22
pkgs/development/python-modules/flit-core/tests.nix
···
-
{ buildPythonPackage
-
, flit
-
, flit-core
-
, pytestCheckHook
-
, testpath
-
}:
-
-
buildPythonPackage {
-
pname = "flit-core";
-
inherit (flit-core) version;
-
-
src = flit-core.testsout;
-
-
dontBuild = true;
-
dontInstall = true;
-
-
nativeCheckInputs = [
-
flit
-
pytestCheckHook
-
testpath
-
];
-
}
+2
pkgs/development/python-modules/google-auth-httplib2/default.nix
···
httplib2
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
flask
mock
+57
pkgs/development/python-modules/gradio/conftest-skip-network-errors.py
···
+
# This is a pytest hook that skips tests that tries to access the network.
+
# These tests will immediately fail, then get marked as "Expected fail" (xfail).
+
+
from _pytest.runner import pytest_runtest_makereport as orig_pytest_runtest_makereport
+
+
# We use BaseException to minimize the chance it gets caught and 'pass'ed
+
class NixNetworkAccessDeniedError(BaseException):
+
pass
+
+
def pytest_runtest_makereport(item, call):
+
"""
+
Modifies test results after-the-fact. The function name is magic, see:
+
https://docs.pytest.org/en/7.1.x/reference/reference.html?highlight=pytest_runtest_makereport#std-hook-pytest_runtest_makereport
+
"""
+
+
def iterate_exc_chain(exc: Exception):
+
"""
+
Recurses through exception chain, yielding all exceptions
+
"""
+
yield exc
+
if getattr(exc, "__context__", None) is not None:
+
yield from iterate_exc_chain(exc.__context__)
+
if getattr(exc, "__cause__", None) is not None:
+
yield from iterate_exc_chain(exc.__cause__)
+
+
tr = orig_pytest_runtest_makereport(item, call)
+
if call.excinfo is not None:
+
for exc in iterate_exc_chain(call.excinfo.value):
+
if isinstance(exc, NixNetworkAccessDeniedError):
+
tr.outcome, tr.wasxfail = 'skipped', "reason: Requires network access."
+
if isinstance(exc, FileNotFoundError): # gradio specific
+
tr.outcome, tr.wasxfail = 'skipped', "reason: Pypi dist bad."
+
return tr
+
+
# replace network access with exception
+
+
def deny_network_access(*a, **kw):
+
raise NixNetworkAccessDeniedError
+
+
import httpx
+
import requests
+
import socket
+
import urllib
+
import urllib3
+
import websockets
+
+
httpx.AsyncClient.get = deny_network_access
+
httpx.AsyncClient.head = deny_network_access
+
httpx.Request = deny_network_access
+
requests.get = deny_network_access
+
requests.head = deny_network_access
+
requests.post = deny_network_access
+
socket.socket.connect = deny_network_access
+
urllib.request.Request = deny_network_access
+
urllib.request.urlopen = deny_network_access
+
urllib3.connection.HTTPSConnection._new_conn = deny_network_access
+
websockets.connect = deny_network_access
+175
pkgs/development/python-modules/gradio/default.nix
···
+
{ lib
+
, buildPythonPackage
+
, fetchPypi
+
, pythonOlder
+
, pythonRelaxDepsHook
+
, writeText
+
+
# pyproject
+
, hatchling
+
, hatch-requirements-txt
+
, hatch-fancy-pypi-readme
+
+
# runtime
+
, setuptools
+
, aiofiles
+
, aiohttp
+
, altair
+
, fastapi
+
, ffmpy
+
, markdown-it-py
+
, mdit-py-plugins
+
, markupsafe
+
, matplotlib
+
, numpy
+
, orjson
+
, pandas
+
, pillow
+
, pycryptodome
+
, python-multipart
+
, pydub
+
, pyyaml
+
, requests
+
, uvicorn
+
, jinja2
+
, fsspec
+
, httpx
+
, pydantic
+
, websockets
+
, typing-extensions
+
+
# check
+
, pytestCheckHook
+
, pytest-asyncio
+
, mlflow
+
, huggingface-hub
+
, transformers
+
, wandb
+
, respx
+
, scikit-image
+
, ipython
+
, ffmpeg
+
, vega_datasets
+
, boto3
+
}:
+
+
buildPythonPackage rec {
+
pname = "gradio";
+
version = "3.20.1";
+
format = "pyproject";
+
+
disabled = pythonOlder "3.7";
+
+
# We use the Pypi release, as it provides prebuilt webui assets,
+
# and has more frequent releases compared to github tags
+
src = fetchPypi {
+
inherit pname version;
+
hash = "sha256-oG97GwehyBWjWXzDqyfj+x2mAfM6OQhYKdA3j0Rv8Vs=";
+
};
+
+
pythonRelaxDeps = [
+
"mdit-py-plugins"
+
];
+
+
nativeBuildInputs = [
+
pythonRelaxDepsHook
+
hatchling
+
hatch-requirements-txt
+
hatch-fancy-pypi-readme
+
];
+
+
propagatedBuildInputs = [
+
setuptools # needs pkg_resources
+
aiofiles
+
aiohttp
+
altair
+
fastapi
+
ffmpy
+
markdown-it-py
+
mdit-py-plugins
+
markupsafe
+
matplotlib
+
numpy
+
orjson
+
pandas
+
pillow
+
pycryptodome
+
python-multipart
+
pydub
+
pyyaml
+
requests
+
uvicorn
+
jinja2
+
fsspec
+
httpx
+
pydantic
+
websockets
+
typing-extensions
+
] ++ markdown-it-py.optional-dependencies.linkify;
+
+
nativeCheckInputs = [
+
pytestCheckHook
+
pytest-asyncio
+
mlflow
+
#comet-ml # FIXME: enable once packaged
+
huggingface-hub
+
transformers
+
wandb
+
respx
+
scikit-image
+
ipython
+
ffmpeg
+
vega_datasets
+
boto3
+
# shap is needed as well, but breaks too often
+
];
+
+
# Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail).
+
# We additionally xfail FileNotFoundError, since the gradio devs often fail to upload test assets to pypi.
+
preCheck = let
+
in ''
+
export HOME=$TMPDIR
+
cat ${./conftest-skip-network-errors.py} >> test/conftest.py
+
'';
+
+
disabledTests = [
+
# Actually broken
+
"test_mount_gradio_app"
+
+
# FIXME: enable once comet-ml is packaged
+
"test_inline_display"
+
"test_integration_comet"
+
+
# Flaky, tries to pin dependency behaviour. Sensitive to dep versions
+
# These error only affect downstream use of the check dependencies.
+
"test_no_color"
+
"test_in_interface_as_output"
+
"test_should_warn_url_not_having_version"
+
+
# Flaky, unknown reason
+
"test_in_interface"
+
+
# shap is too often broken in nixpkgs
+
"test_shapley_text"
+
];
+
disabledTestPaths = [
+
# makes pytest freeze 50% of the time
+
"test/test_interfaces.py"
+
];
+
#pytestFlagsArray = [ "-x" "-W" "ignore" ]; # uncomment for debugging help
+
+
# check the binary works outside the build env
+
doInstallCheck = true;
+
postInstallCheck = ''
+
env --ignore-environment $out/bin/gradio --help >/dev/null
+
'';
+
+
pythonImportsCheck = [ "gradio" ];
+
+
meta = with lib; {
+
homepage = "https://www.gradio.app/";
+
description = "Python library for easily interacting with trained machine learning models";
+
license = licenses.asl20;
+
maintainers = with maintainers; [ pbsds ];
+
};
+
}
+6 -2
pkgs/development/python-modules/graphene-django/default.nix
···
-
{ lib
+
{ stdenv
+
, lib
, buildPythonPackage
, pythonAtLeast
, pythonOlder
···
];
disabledTests = lib.optionals (pythonAtLeast "3.11") [
-
# Pèython 3.11 support, https://github.com/graphql-python/graphene-django/pull/1365
+
# Python 3.11 support, https://github.com/graphql-python/graphene-django/pull/1365
"test_django_objecttype_convert_choices_enum_naming_collisions"
"test_django_objecttype_choices_custom_enum_name"
"test_django_objecttype_convert_choices_enum_list"
"test_schema_representation"
+
] ++ lib.optionals stdenv.isDarwin [
+
# this test touches files in the "/" directory and fails in darwin sandbox
+
"test_should_filepath_convert_string"
];
meta = with lib; {
-2
pkgs/development/python-modules/gunicorn/default.nix
···
, eventlet
, gevent
, pytestCheckHook
-
, setuptools
}:
buildPythonPackage rec {
···
'';
propagatedBuildInputs = [
-
setuptools
packaging
];
+6 -4
pkgs/development/python-modules/httplib2/default.nix
···
hash = "sha256-1Pl+l28J7crfO2UY/9/D019IzOHWOwjR+UvVEHICTqU=";
};
+
postPatch = ''
+
sed -i "/--cov/d" setup.cfg
+
'';
+
propagatedBuildInputs = [
pyparsing
];
···
pytestCheckHook
];
+
__darwinAllowLocalNetworking = true;
+
# Don't run tests for older Pythons
doCheck = pythonAtLeast "3.9";
-
-
postPatch = ''
-
sed -i "/--cov/d" setup.cfg
-
'';
disabledTests = [
# ValueError: Unable to load PEM file.
+2
pkgs/development/python-modules/httpx-socks/default.nix
···
];
};
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
flask
hypercorn
+11 -2
pkgs/development/python-modules/josepy/default.nix
···
{ lib
, buildPythonPackage
, cryptography
+
, fetchpatch
, fetchPypi
, pyopenssl
, pytestCheckHook
, pythonOlder
-
, setuptools
}:
buildPythonPackage rec {
···
hash = "sha256-iTHa84+KTIUnSg6LfLJa3f2NHyj5+4++0FPdUa7HXck=";
};
+
patches = [
+
# https://github.com/certbot/josepy/pull/158
+
(fetchpatch {
+
name = "fix-setuptools-deprecation.patch";
+
url = "https://github.com/certbot/josepy/commit/8f1b4b57a29a868a87fd6eee19a67a7ebfc07ea1.patch";
+
hash = "sha256-9d+Bk/G4CJXpnjJU0YkXLsg0G3tPxR8YN2niqriQQkI=";
+
includes = [ "tests/test_util.py" ];
+
})
+
];
+
propagatedBuildInputs = [
pyopenssl
cryptography
-
setuptools
];
nativeCheckInputs = [
+7
pkgs/development/python-modules/markdown-it-py/default.nix
···
, stdenv
, pytest-regressions
, pytestCheckHook
+
, pythonRelaxDepsHook
, pythonOlder
}:
···
hash = "sha256-qdRU1BxczFDGoIEtl0ZMkKNn4p5tec8YuPt5ZwX5fYM=";
};
+
# fix downstrem usage of markdown-it-py[linkify]
+
pythonRelaxDeps = [
+
"linkify-it-py"
+
];
+
nativeBuildInputs = [
+
pythonRelaxDepsHook
flit-core
];
-7
pkgs/development/python-modules/meson-python/default.nix
···
./add-build-flags.sh
];
-
# Ugly work-around. Drop ninja dependency.
-
# We already have ninja, but it comes without METADATA.
-
# Building ninja-python-distributions is the way to go.
-
postPatch = ''
-
substituteInPlace pyproject.toml --replace "'ninja'," ""
-
'';
-
meta = {
changelog = "https://github.com/mesonbuild/meson-python/blob/${version}/CHANGELOG.rst";
description = "Meson Python build backend (PEP 517)";
+2
pkgs/development/python-modules/mezzanine/default.nix
···
, pillow
, pyflakes
, pythonOlder
+
, pytz
, requests
, requests-oauthlib
, tzlocal
···
future
grappelli_safe
pillow
+
pytz
requests
requests-oauthlib
tzlocal
+10 -15
pkgs/development/python-modules/mock/default.nix
···
{ lib
, buildPythonPackage
, fetchPypi
-
, fetchpatch
-
, python
, pythonOlder
-
, pytest
-
, unittestCheckHook
+
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "mock";
-
version = "4.0.3";
+
version = "5.1.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
-
sha256 = "7d3fbbde18228f4ff2f1f119a45cdffa458b4c0dee32eb4d2bb2f82554bac7bc";
+
sha256 = "sha256-Xpaq1czaRxjgointlLICTfdcwtVVdbpXYtMfV2e4dn0=";
};
-
patches = [
-
(fetchpatch {
-
url = "https://github.com/testing-cabal/mock/commit/f3e3d82aab0ede7e25273806dc0505574d85eae2.patch";
-
hash = "sha256-wPrv1/WeICZHn31UqFlICFsny2knvn3+Xg8BZoaGbwQ=";
-
})
+
nativeCheckInputs = [
+
pytestCheckHook
];
-
nativeCheckInputs = [
-
unittestCheckHook
-
pytest
+
pythonImportsCheck = [
+
"mock"
];
meta = with lib; {
-
description = "Mock objects for Python";
+
description = "Rolling backport of unittest.mock for all Pythons";
homepage = "https://github.com/testing-cabal/mock";
+
changelog = "https://github.com/testing-cabal/mock/blob/${version}/CHANGELOG.rst";
license = licenses.bsd2;
+
maintainers = [ ];
};
}
+2
pkgs/development/python-modules/moto/default.nix
···
xmltodict
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
freezegun
pytestCheckHook
+23 -48
pkgs/development/python-modules/ninja/default.nix
···
{ lib
, buildPythonPackage
-
, fetchFromGitHub
-
, fetchurl
-
, cmake
-
, setuptools-scm
-
, scikit-build
-
, pytestCheckHook
-
, pytest-virtualenv
+
, flit-core
+
, ninja
}:
-
let
-
# these must match NinjaUrls.cmake
-
ninja_src_url = "https://github.com/Kitware/ninja/archive/v1.11.1.g95dee.kitware.jobserver-1.tar.gz";
-
ninja_src_sha256 = "7ba84551f5b315b4270dc7c51adef5dff83a2154a3665a6c9744245c122dd0db";
-
ninja_src = fetchurl {
-
url = ninja_src_url;
-
sha256 = ninja_src_sha256;
-
};
-
in
+
buildPythonPackage rec {
pname = "ninja";
-
version = "1.11.1";
+
inherit (ninja) version;
format = "pyproject";
-
src = fetchFromGitHub {
-
owner = "scikit-build";
-
repo = "ninja-python-distributions";
-
rev = version;
-
hash = "sha256-scCYsSEyN+u3qZhNhWYqHpJCl+JVJJbKz+T34gOXGJM=";
-
};
-
patches = [
-
# make sure cmake doesn't try to download the ninja sources
-
./no-download.patch
-
];
+
src = ./stub;
-
inherit ninja_src;
postUnpack = ''
-
# assume that if the hash matches, the source should be fine
-
if ! grep "${ninja_src_sha256}" $sourceRoot/NinjaUrls.cmake; then
-
echo "ninja_src_sha256 doesn't match the hash in NinjaUrls.cmake!"
-
exit 1
-
fi
-
mkdir -p "$sourceRoot/Ninja-src"
-
pushd "$sourceRoot/Ninja-src"
-
tar -xavf ${ninja_src} --strip-components 1
-
popd
-
'';
+
substituteInPlace "$sourceRoot/pyproject.toml" \
+
--subst-var version
-
postPatch = ''
-
sed -i '/cov/d' setup.cfg
+
substituteInPlace "$sourceRoot/ninja/__init__.py" \
+
--subst-var-by BIN_DIR "${ninja}/bin"
'';
-
dontUseCmakeConfigure = true;
+
inherit (ninja) setupHook;
nativeBuildInputs = [
-
setuptools-scm
-
scikit-build
-
cmake
+
flit-core
];
-
nativeCheckInputs = [
-
pytestCheckHook
-
pytest-virtualenv
+
preBuild = ''
+
cp "${ninja.src}/misc/ninja_syntax.py" ninja/ninja_syntax.py
+
'';
+
+
pythonImportsCheck = [
+
"ninja"
+
"ninja.ninja_syntax"
];
meta = with lib; {
description = "A small build system with a focus on speed";
+
longDescription = ''
+
This is a stub of the ninja package on PyPI that uses the ninja program
+
provided by nixpkgs instead of downloading ninja from the web.
+
'';
homepage = "https://github.com/scikit-build/ninja-python-distributions";
license = licenses.asl20;
-
maintainers = with maintainers; [ _999eagle ];
+
maintainers = with maintainers; [ _999eagle tjni ];
};
}
-10
pkgs/development/python-modules/ninja/no-download.patch
···
-
--- a/CMakeLists.txt
-
+++ b/CMakeLists.txt
-
@@ -64,6 +64,7 @@
-
# Download selected source archive
-
ExternalProject_add(download_ninja_source
-
SOURCE_DIR ${Ninja_SOURCE_DIR}
-
+ DOWNLOAD_COMMAND ""
-
URL ${${src_archive}_url}
-
URL_HASH SHA256=${${src_archive}_sha256}
-
DOWNLOAD_DIR ${ARCHIVE_DOWNLOAD_DIR}
+9
pkgs/development/python-modules/ninja/stub/ninja/__init__.py
···
+
import os
+
import subprocess
+
import sys
+
+
def _program(name, args):
+
return subprocess.call([os.path.join('@BIN_DIR@', name)] + args, close_fds=False)
+
+
def ninja():
+
raise SystemExit(_program('ninja', sys.argv[1:]))
+11
pkgs/development/python-modules/ninja/stub/pyproject.toml
···
+
[build-system]
+
requires = ["flit_core"]
+
build-backend = "flit_core.buildapi"
+
+
[project]
+
name = "ninja"
+
version = "@version@"
+
description = "Ninja is a small build system with a focus on speed"
+
+
[project.scripts]
+
ninja = "ninja:ninja"
+2
pkgs/development/python-modules/nose2/default.nix
···
six
];
+
__darwinAllowLocalNetworking = true;
+
checkPhase = ''
${python.interpreter} -m unittest
'';
+2
pkgs/development/python-modules/nplusone/default.nix
···
{ lib
, blinker
, buildPythonPackage
+
, django
, fetchFromGitHub
, flake8
, flask-sqlalchemy
···
homepage = "https://github.com/jmcarp/nplusone";
maintainers = with maintainers; [ cript0nauta ];
license = licenses.mit;
+
broken = lib.versionAtLeast django.version "4";
};
}
+2
pkgs/development/python-modules/nvchecker/default.nix
···
tomli
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
flaky
pytest-asyncio
+3 -3
pkgs/development/python-modules/orjson/default.nix
···
buildPythonPackage rec {
pname = "orjson";
-
version = "3.9.2";
+
version = "3.9.4";
format = "pyproject";
disabled = pythonOlder "3.7";
···
owner = "ijl";
repo = pname;
rev = "refs/tags/${version}";
-
hash = "sha256-uEwlrWPQbctCMiIz4fdXe2GDr2SSHaMzmYzzrECerxg=";
+
hash = "sha256-WS4qynQmJIVdDf0sYK/HFVQ+F5nfoJwx/zzmaL6YTRc=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
-
hash = "sha256-U/WenkO7ecZQOGEppBlLtlXGtbpbS7e+Ic1hg/AnKSk=";
+
hash = "sha256-hGUXPTiKvKygxQzxXAO/+bD34eLnpkhQ7r/g27E+d4I=";
};
nativeBuildInputs = [
+4
pkgs/development/python-modules/oscrypto/default.nix
···
hash = "sha256-CmDypmlc/kb6ONCUggjT1Iqd29xNSLRaGh5Hz36dvOw=";
};
+
patches = [
+
./support-openssl-3.0.10.patch
+
];
+
postPatch = ''
for file in oscrypto/_openssl/_lib{crypto,ssl}_c{ffi,types}.py; do
substituteInPlace $file \
+11
pkgs/development/python-modules/oscrypto/support-openssl-3.0.10.patch
···
+
https://github.com/wbond/oscrypto/issues/75
+
--- a/oscrypto/_openssl/_libcrypto_cffi.py
+
+++ b/oscrypto/_openssl/_libcrypto_cffi.py
+
@@ -37,1 +37,1 @@
+
-version_match = re.search('\\b(\\d\\.\\d\\.\\d[a-z]*)\\b', version_string)
+
+version_match = re.search('\\b(\\d\\.\\d\\.\\d+[a-z]*)\\b', version_string)
+
--- a/oscrypto/_openssl/_libcrypto_ctypes.py
+
+++ b/oscrypto/_openssl/_libcrypto_ctypes.py
+
@@ -40,1 +40,1 @@
+
-version_match = re.search('\\b(\\d\\.\\d\\.\\d[a-z]*)\\b', version_string)
+
+version_match = re.search('\\b(\\d\\.\\d\\.\\d+[a-z]*)\\b', version_string)
+2
pkgs/development/python-modules/prometheus-client/default.nix
···
hash = "sha256-ag9gun47Ar0Sw3ZGIXAHjtv4GdhX8x51UVkgwdQ8A+s=";
};
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
];
+2
pkgs/development/python-modules/pycurl/default.nix
···
curl
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
bottle
pytestCheckHook
+2
pkgs/development/python-modules/pyquery/default.nix
···
lxml
];
+
__darwinAllowLocalNetworking = true;
+
pythonImportsCheck = [ "pyquery" ];
checkInputs = [
+2
pkgs/development/python-modules/pyro5/default.nix
···
serpent
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
];
+2
pkgs/development/python-modules/pytest-recording/default.nix
···
attrs
];
+
__darwinAllowLocalNetworking = true;
+
checkInputs = [
pytestCheckHook
pytest-httpbin
+2
pkgs/development/python-modules/pytest-remotedata/default.nix
···
six
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
];
+2
pkgs/development/python-modules/pytest-tornasync/default.nix
···
tornado
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytest
tornado
+2
pkgs/development/python-modules/pywemo/default.nix
···
lxml
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
hypothesis
pytest-vcr
+2
pkgs/development/python-modules/pyzipper/default.nix
···
pycryptodomex
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
];
+5
pkgs/development/python-modules/qcodes/default.nix
···
"--durations=20"
];
+
disabledTests = [
+
# timing sensitive
+
"test_access_channels_by_slice"
+
];
+
disabledTestPaths = [
# depends on qcodes-loop, causing a cyclic dependency
"qcodes/tests/dataset/measurement/test_load_legacy_data.py"
+2
pkgs/development/python-modules/rangehttpserver/default.nix
···
setuptools
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
requests
+2 -2
pkgs/development/python-modules/responses/default.nix
···
buildPythonPackage rec {
pname = "responses";
-
version = "0.23.1";
+
version = "0.23.3";
format = "setuptools";
disabled = pythonOlder "3.7";
···
owner = "getsentry";
repo = pname;
rev = "refs/tags/${version}";
-
hash = "sha256-BU90nUZVqowFMn78KfbBEf59X7Q/1itvkGFdOzy4D2c=";
+
hash = "sha256-VJmcRMn0O+3mDwzkCwxIX7RU3/I9T9p9N8t6USWDZJQ=";
};
propagatedBuildInputs = [
+2
pkgs/development/python-modules/rope/default.nix
···
pytoolconfig
] ++ pytoolconfig.optional-dependencies.global;
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytest-timeout
pytestCheckHook
+2
pkgs/development/python-modules/snakeviz/default.nix
···
tornado
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
ipython
pytestCheckHook
+2
pkgs/development/python-modules/sockio/default.nix
···
--replace "--durations=2 --verbose" ""
'';
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
+11 -1
pkgs/development/python-modules/sshfs/default.nix
···
-
{ lib
+
{ stdenv
+
, lib
, asyncssh
, bcrypt
, buildPythonPackage
···
, mock-ssh-server
, pytest-asyncio
, pytestCheckHook
+
, setuptools
, setuptools-scm
}:
···
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
+
setuptools
setuptools-scm
];
···
fsspec
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
mock-ssh-server
pytest-asyncio
pytestCheckHook
+
];
+
+
disabledTests = lib.optionals stdenv.isDarwin [
+
# test fails with sandbox enabled
+
"test_checksum"
];
pythonImportsCheck = [
+2 -1
pkgs/development/python-modules/terminado/default.nix
···
"terminado"
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytest-timeout
pytestCheckHook
];
-
meta = with lib; {
description = "Terminals served by Tornado websockets";
+2
pkgs/development/python-modules/umodbus/default.nix
···
pyserial
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
pytestCheckHook
];
+2
pkgs/development/python-modules/unearth/default.nix
···
cached-property
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
flask
pytest-httpserver
+2
pkgs/development/python-modules/wandb/default.nix
···
shortuuid
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
azure-containerregistry
azure-core
+2
pkgs/development/python-modules/wsgidav/default.nix
···
pyyaml
];
+
__darwinAllowLocalNetworking = true;
+
nativeCheckInputs = [
cheroot
pytestCheckHook
+2 -2
pkgs/development/ruby-modules/bundler/default.nix
···
inherit ruby;
name = "${gemName}-${version}";
gemName = "bundler";
-
version = "2.4.17";
-
source.sha256 = "sha256-2EV6XnbJ0VPUuw/R/9Kj9Y+/CQyzRIub16Ah0T8ORK0=";
+
version = "2.4.18";
+
source.sha256 = "sha256-tvfScSHUmHSmnJGU1PjvVWsjkMzuxBY1zPTzxYBp9w4=";
dontPatchShebangs = true;
postFixup = ''
-51
pkgs/development/tools/build-managers/meson/darwin-case-sensitive-fs.patch
···
-
From 1643ed0d8a9201732905bee51b096605d26aaaac Mon Sep 17 00:00:00 2001
-
From: Randy Eckenrode <randy@largeandhighquality.com>
-
Date: Fri, 26 May 2023 00:10:45 -0400
-
Subject: [PATCH] Fix test failures on Darwin on a case-sensitive fs
-
-
This issue was encounetered while working on a contribution to nixpkgs.
-
Nix allows the store to be installed on a separate, case-sensitive APFS
-
volume. When the store is on a case-sensitive volume, these tests fail
-
because they try to use `foundation` instead of `Foundation`.
-
---
-
.../failing/78 framework dependency with version/meson.build | 2 +-
-
test cases/objc/2 nsstring/meson.build | 2 +-
-
test cases/osx/6 multiframework/meson.build | 2 +-
-
3 files changed, 3 insertions(+), 3 deletions(-)
-
-
diff --git a/test cases/failing/78 framework dependency with version/meson.build b/test cases/failing/78 framework dependency with version/meson.build
-
index b7e04bab446..ee315ebcbd7 100644
-
--- a/test cases/failing/78 framework dependency with version/meson.build
-
+++ b/test cases/failing/78 framework dependency with version/meson.build
-
@@ -5,4 +5,4 @@ if host_machine.system() != 'darwin'
-
endif
-
-
# do individual frameworks have a meaningful version to test? And multiple frameworks might be listed...
-
-dep = dependency('appleframeworks', modules: 'foundation', version: '>0')
-
+dep = dependency('appleframeworks', modules: 'Foundation', version: '>0')
-
diff --git a/test cases/objc/2 nsstring/meson.build b/test cases/objc/2 nsstring/meson.build
-
index 94d2cf18ab4..2c483d50d68 100644
-
--- a/test cases/objc/2 nsstring/meson.build
-
+++ b/test cases/objc/2 nsstring/meson.build
-
@@ -1,7 +1,7 @@
-
project('nsstring', 'objc')
-
-
if host_machine.system() == 'darwin'
-
- dep = dependency('appleframeworks', modules : 'foundation')
-
+ dep = dependency('appleframeworks', modules : 'Foundation')
-
elif host_machine.system() == 'cygwin'
-
error('MESON_SKIP_TEST GNUstep is not packaged for Cygwin.')
-
else
-
diff --git a/test cases/osx/6 multiframework/meson.build b/test cases/osx/6 multiframework/meson.build
-
index 28846243b21..57e5d61560b 100644
-
--- a/test cases/osx/6 multiframework/meson.build
-
+++ b/test cases/osx/6 multiframework/meson.build
-
@@ -4,7 +4,7 @@ project('multiframework', 'objc')
-
# that causes a build failure when defining two modules. The
-
# arguments for the latter module overwrote the arguments for
-
# the first one rather than adding to them.
-
-cocoa_dep = dependency('appleframeworks', modules : ['AppKit', 'foundation'])
-
+cocoa_dep = dependency('appleframeworks', modules : ['AppKit', 'Foundation'])
-
-
executable('deptester',
-
'main.m',
+7 -9
pkgs/development/tools/build-managers/meson/default.nix
···
{ lib
, stdenv
-
, fetchPypi
+
, fetchFromGitHub
, fetchpatch
, installShellFiles
, ninja
···
python3.pkgs.buildPythonApplication rec {
pname = "meson";
-
version = "1.1.1";
+
version = "1.2.0";
-
src = fetchPypi {
-
inherit pname version;
-
hash = "sha256-0EtUH5fKQ5+4L6t9DUgJiL5L1OYlY6XKNfrbVAByexw=";
+
src = fetchFromGitHub {
+
owner = "mesonbuild";
+
repo = "meson";
+
rev = "refs/tags/${version}";
+
hash = "sha256-bJAmkE+sL9DqKpcjZdBf4/z9lz+m/o0Z87hlAwbVbTY=";
};
patches = [
-
# Fix Meson tests that fail when the Nix store is case-sensitive APFS.
-
# https://github.com/mesonbuild/meson/pull/11820
-
./darwin-case-sensitive-fs.patch
-
# Meson is currently inspecting fewer variables than autoconf does, which
# makes it harder for us to use setup hooks, etc. Taken from
# https://github.com/mesonbuild/meson/pull/6827
+21 -5
pkgs/development/tools/misc/autogen/default.nix
···
};
patches = let
-
dp = { ver ? "1%255.18.16-4", pname, name ? (pname + ".diff"), sha256 }: fetchurl {
+
dp = { ver ? "1%255.18.16-5", name, sha256 }: fetchurl {
url = "https://salsa.debian.org/debian/autogen/-/raw/debian/${ver}"
-
+ "/debian/patches/${pname}.diff?inline=false";
+
+ "/debian/patches/${name}?inline=false";
inherit name sha256;
};
in [
(dp {
-
pname = "20_no_Werror";
+
name = "20_no_Werror.diff";
sha256 = "08z4s2ifiqyaacjpd9pzr59w8m4j3548kkaq1bwvp2gjn29m680x";
})
(dp {
-
pname = "30_ag_macros.m4_syntax_error";
+
name = "30_ag_macros.m4_syntax_error.diff";
sha256 = "1z8vmbwbkz3505wd33i2xx91mlf8rwsa7klndq37nw821skxwyh3";
})
(dp {
-
pname = "31_allow_overriding_AGexe_for_crossbuild";
+
name = "31_allow_overriding_AGexe_for_crossbuild.diff";
sha256 = "0h9wkc9bqb509knh8mymi43hg6n6sxg2lixvjlchcx7z0j7p8xkf";
+
})
+
(dp {
+
name = "40_suse_01-autogen-catch-race-error.patch";
+
sha256 = "1cfkym2zds1f85md1m74snxzqmzlj7wd5jivgmyl342856848xav";
+
})
+
(dp {
+
name = "40_suse_03-gcc9-fix-wrestrict.patch";
+
sha256 = "1ifdwi6gf96jc78jw7q4bfi5fgdldlf2nl55y20h6xb78kv0pznd";
+
})
+
(dp {
+
name = "40_suse_05-sprintf-overflow.patch";
+
sha256 = "136m62k68w1h5k7iapynvbyipidw35js6pq21lsc6rpxvgp0n469";
+
})
+
(dp {
+
name = "40_suse_06-autogen-avoid-GCC-code-analysis-bug.patch";
+
sha256 = "1d65zygzw2rpa00s0jy2y1bg29vkbhnjwlb5pv22rfv87zbk6z9q";
})
# Next upstream release will contain guile-3 support. We apply non-invasive
# patch meanwhile.
+3 -1
pkgs/development/tools/misc/gdb/default.nix
···
, enableDebuginfod ? lib.meta.availableOn stdenv.hostPlatform elfutils, elfutils
, guile ? null
, hostCpuOnly ? false
+
, enableSim ? false
, safePaths ? [
# $debugdir:$datadir/auto-load are whitelisted by default by GDB
"$debugdir" "$datadir/auto-load"
···
] ++ lib.optional (!pythonSupport) "--without-python"
++ lib.optional stdenv.hostPlatform.isMusl "--disable-nls"
++ lib.optional stdenv.hostPlatform.isStatic "--disable-inprocess-agent"
-
++ lib.optional enableDebuginfod "--with-debuginfod=yes";
+
++ lib.optional enableDebuginfod "--with-debuginfod=yes"
+
++ lib.optional (!enableSim) "--disable-sim";
postInstall =
'' # Remove Info files already provided by Binutils and other packages.
+14 -2
pkgs/os-specific/darwin/apple-source-releases/adv_cmds/default.nix
···
-
{ lib, appleDerivation, xcbuild, ncurses, libutil, Libc }:
+
{ stdenv, lib, appleDerivation, xcbuild, ncurses, libutil, Libc }:
+
let
+
# Libc conflicts with libc++ 16, so provide only the header from it that’s needed to build.
+
msgcat = stdenv.mkDerivation {
+
pname = "Libc-msgcat";
+
version = lib.getVersion Libc;
+
+
buildCommand = ''
+
mkdir -p "$out/include"
+
ln -s ${lib.getDev Libc}/include/msgcat.h "$out/include/"
+
'';
+
};
+
in
appleDerivation {
# We can't just run the root build, because https://github.com/facebook/xcbuild/issues/264
···
'';
nativeBuildInputs = [ xcbuild ];
-
buildInputs = [ ncurses libutil Libc ];
+
buildInputs = [ ncurses libutil msgcat ];
meta = {
platforms = lib.platforms.darwin;
+4 -3
pkgs/os-specific/linux/kernel/common-config.nix
···
debug = {
# Necessary for BTF
-
DEBUG_INFO = yes;
+
DEBUG_INFO = mkMerge [
+
(whenOlder "5.2" (if (features.debug or false) then yes else no))
+
(whenBetween "5.2" "5.18" yes)
+
];
DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT = whenAtLeast "5.18" yes;
# Reduced debug info conflict with BTF and have been enabled in
# aarch64 defconfig since 5.13
···
SUNRPC_DEBUG = yes;
# Provide access to tunables like sched_migration_cost_ns
SCHED_DEBUG = yes;
-
-
GDB_SCRIPTS = yes;
};
power-management = {
+6 -3
pkgs/os-specific/linux/kernel/generic.nix
···
# symbolic name and `patch' is the actual patch. The patch may
# optionally be compressed with gzip or bzip2.
kernelPatches ? []
-
, ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name or "" != "pc"
+
, ignoreConfigErrors ? stdenv.hostPlatform.linux-kernel.name != "pc"
, extraMeta ? {}
, isZen ? false
···
, isHardened ? false
# easy overrides to stdenv.hostPlatform.linux-kernel members
-
, autoModules ? stdenv.hostPlatform.linux-kernel.autoModules or true
+
, autoModules ? stdenv.hostPlatform.linux-kernel.autoModules
, preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false
, kernelArch ? stdenv.hostPlatform.linuxArch
, kernelTests ? []
···
++ lib.optionals (lib.versionAtLeast version "4.16") [ bison flex ]
++ lib.optional (lib.versionAtLeast version "5.2") pahole;
+
platformName = stdenv.hostPlatform.linux-kernel.name;
# e.g. "defconfig"
-
kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig or "defconfig";
+
kernelBaseConfig = if defconfig != null then defconfig else stdenv.hostPlatform.linux-kernel.baseConfig;
+
# e.g. "bzImage"
+
kernelTarget = stdenv.hostPlatform.linux-kernel.target;
makeFlags = lib.optionals (stdenv.hostPlatform.linux-kernel ? makeFlags) stdenv.hostPlatform.linux-kernel.makeFlags
++ extraMakeFlags;
+270 -309
pkgs/os-specific/linux/kernel/manual-config.nix
···
{ lib, stdenv, buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
-
, libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole, ubootTools
+
, libelf, cpio, elfutils, zstd, python3Minimal, zlib, pahole
, fetchpatch
}:
···
}:
let
-
config_ = config;
-
in
-
-
let
inherit (lib)
hasAttr getAttr optional optionals optionalString optionalAttrs maintainers platforms;
···
(buildPackages.deterministic-uname.override { inherit modDirVersion; })
] ++ optional (lib.versionAtLeast version "5.13") zstd;
-
config = let attrName = attr: "CONFIG_" + attr; in {
-
isSet = attr: hasAttr (attrName attr) config;
+
drvAttrs = config_: kernelConf: kernelPatches: configfile:
+
let
+
config = let attrName = attr: "CONFIG_" + attr; in {
+
isSet = attr: hasAttr (attrName attr) config;
-
getValue = attr: if config.isSet attr then getAttr (attrName attr) config else null;
+
getValue = attr: if config.isSet attr then getAttr (attrName attr) config else null;
-
isYes = attr: (config.getValue attr) == "y";
+
isYes = attr: (config.getValue attr) == "y";
-
isNo = attr: (config.getValue attr) == "n";
+
isNo = attr: (config.getValue attr) == "n";
-
isModule = attr: (config.getValue attr) == "m";
+
isModule = attr: (config.getValue attr) == "m";
-
isEnabled = attr: (config.isModule attr) || (config.isYes attr);
+
isEnabled = attr: (config.isModule attr) || (config.isYes attr);
-
isDisabled = attr: (!(config.isSet attr)) || (config.isNo attr);
-
} // config_;
+
isDisabled = attr: (!(config.isSet attr)) || (config.isNo attr);
+
} // config_;
-
isModular = config.isYes "MODULES";
+
isModular = config.isYes "MODULES";
-
kernelConf = stdenv.hostPlatform.linux-kernel;
-
target = kernelConf.target or "vmlinux";
+
buildDTBs = kernelConf.DTB or false;
-
buildDTBs = kernelConf.DTB or false;
-
in
+
in (optionalAttrs isModular { outputs = [ "out" "dev" ]; }) // {
+
passthru = rec {
+
inherit version modDirVersion config kernelPatches configfile
+
moduleBuildDependencies stdenv;
+
inherit isZen isHardened isLibre;
+
isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true;
+
baseVersion = lib.head (lib.splitString "-rc" version);
+
kernelOlder = lib.versionOlder baseVersion;
+
kernelAtLeast = lib.versionAtLeast baseVersion;
+
};
-
assert lib.versionOlder version "5.8" -> libelf != null;
-
assert lib.versionAtLeast version "5.8" -> elfutils != null;
+
inherit src;
-
stdenv.mkDerivation ({
-
pname = "linux";
-
inherit version src;
+
patches =
+
map (p: p.patch) kernelPatches
+
# Required for deterministic builds along with some postPatch magic.
+
++ optional (lib.versionOlder version "5.19") ./randstruct-provide-seed.patch
+
++ optional (lib.versionAtLeast version "5.19") ./randstruct-provide-seed-5.19.patch
+
# Linux 5.12 marked certain PowerPC-only symbols as GPL, which breaks
+
# OpenZFS; this was fixed in Linux 5.19 so we backport the fix
+
# https://github.com/openzfs/zfs/pull/13367
+
++ optional (lib.versionAtLeast version "5.12" &&
+
lib.versionOlder version "5.19" &&
+
stdenv.hostPlatform.isPower)
+
(fetchpatch {
+
url = "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/patch/?id=d9e5c3e9e75162f845880535957b7fd0b4637d23";
+
hash = "sha256-bBOyJcP6jUvozFJU0SPTOf3cmnTQ6ZZ4PlHjiniHXLU=";
+
});
-
depsBuildBuild = [ buildPackages.stdenv.cc ];
-
nativeBuildInputs = [
-
bc gmp libmpc mpfr nettools openssl perl python3Minimal rsync ubootTools
-
zstd
-
] ++ optional (lib.versionOlder version "5.8") libelf
-
++ optionals (lib.versionAtLeast version "4.16") [ bison flex ]
-
++ optionals (lib.versionAtLeast version "5.2") [ cpio pahole zlib ]
-
++ optional (lib.versionAtLeast version "5.8") elfutils;
+
postPatch = ''
+
sed -i Makefile -e 's|= depmod|= ${buildPackages.kmod}/bin/depmod|'
-
patches =
-
map (p: p.patch) kernelPatches
-
# Required for deterministic builds along with some postPatch magic.
-
++ optional (lib.versionOlder version "5.19") ./randstruct-provide-seed.patch
-
++ optional (lib.versionAtLeast version "5.19") ./randstruct-provide-seed-5.19.patch
-
# Linux 5.12 marked certain PowerPC-only symbols as GPL, which breaks
-
# OpenZFS; this was fixed in Linux 5.19 so we backport the fix
-
# https://github.com/openzfs/zfs/pull/13367
-
++ optional (lib.versionAtLeast version "5.12" &&
-
lib.versionOlder version "5.19" &&
-
stdenv.hostPlatform.isPower)
-
(fetchpatch {
-
url = "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/patch/?id=d9e5c3e9e75162f845880535957b7fd0b4637d23";
-
hash = "sha256-bBOyJcP6jUvozFJU0SPTOf3cmnTQ6ZZ4PlHjiniHXLU=";
-
});
+
# fixup for pre-5.4 kernels using the $(cd $foo && /bin/pwd) pattern
+
# FIXME: remove when no longer needed
+
substituteInPlace Makefile tools/scripts/Makefile.include --replace /bin/pwd pwd
-
preUnpack = ''
-
# The same preUnpack is used to build the configfile,
-
# which does not have $dev.
-
if [ -n "$dev" ]; then
-
mkdir -p $dev/lib/modules/${modDirVersion}
-
cd $dev/lib/modules/${modDirVersion}
-
fi
-
'';
+
# Don't include a (random) NT_GNU_BUILD_ID, to make the build more deterministic.
+
# This way kernels can be bit-by-bit reproducible depending on settings
+
# (e.g. MODULE_SIG and SECURITY_LOCKDOWN_LSM need to be disabled).
+
# See also https://kernelnewbies.org/BuildId
+
sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|'
-
postUnpack = ''
-
mv -Tv "$sourceRoot" source 2>/dev/null || :
-
export sourceRoot=$PWD/source
-
'';
+
# Some linux-hardened patches now remove certain files in the scripts directory, so the file may not exist.
+
[[ -f scripts/ld-version.sh ]] && patchShebangs scripts/ld-version.sh
-
postPatch = ''
-
sed -i Makefile -e 's|= depmod|= ${buildPackages.kmod}/bin/depmod|'
+
# Set randstruct seed to a deterministic but diversified value. Note:
+
# we could have instead patched gen-random-seed.sh to take input from
+
# the buildFlags, but that would require also patching the kernel's
+
# toplevel Makefile to add a variable export. This would be likely to
+
# cause future patch conflicts.
+
for file in scripts/gen-randstruct-seed.sh scripts/gcc-plugins/gen-random-seed.sh; do
+
if [ -f "$file" ]; then
+
substituteInPlace "$file" \
+
--replace NIXOS_RANDSTRUCT_SEED \
+
$(echo ${randstructSeed}${src} ${placeholder "configfile"} | sha256sum | cut -d ' ' -f 1 | tr -d '\n')
+
break
+
fi
+
done
-
# fixup for pre-4.15 kernels using the $(cd $foo && /bin/pwd) pattern
-
# FIXME: remove when no longer needed
-
substituteInPlace Makefile tools/scripts/Makefile.include --replace /bin/pwd pwd
+
patchShebangs scripts
-
# Don't include a (random) NT_GNU_BUILD_ID, to make the build more deterministic.
-
# This way kernels can be bit-by-bit reproducible depending on settings
-
# (e.g. MODULE_SIG and SECURITY_LOCKDOWN_LSM need to be disabled).
-
# See also https://kernelnewbies.org/BuildId
-
sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|'
+
# also patch arch-specific install scripts
+
for i in $(find arch -name install.sh); do
+
patchShebangs "$i"
+
done
+
'';
-
# Some linux-hardened patches now remove certain files in the scripts directory, so the file may not exist.
-
[[ -f scripts/ld-version.sh ]] && patchShebangs scripts/ld-version.sh
+
configurePhase = ''
+
runHook preConfigure
-
# Set randstruct seed to a deterministic but diversified value. Note:
-
# we could have instead patched gen-random-seed.sh to take input from
-
# the buildFlags, but that would require also patching the kernel's
-
# toplevel Makefile to add a variable export. This would be likely to
-
# cause future patch conflicts.
-
for file in scripts/gen-randstruct-seed.sh scripts/gcc-plugins/gen-random-seed.sh; do
-
if [ -f "$file" ]; then
-
substituteInPlace "$file" \
-
--replace NIXOS_RANDSTRUCT_SEED \
-
$(echo ${randstructSeed}${src} ${placeholder "configfile"} | sha256sum | cut -d ' ' -f 1 | tr -d '\n')
-
break
-
fi
-
done
+
mkdir build
+
export buildRoot="$(pwd)/build"
-
patchShebangs scripts
+
echo "manual-config configurePhase buildRoot=$buildRoot pwd=$PWD"
-
# also patch arch-specific install scripts
-
for i in $(find arch -name install.sh); do
-
patchShebangs "$i"
-
done
-
'';
+
if [ -f "$buildRoot/.config" ]; then
+
echo "Could not link $buildRoot/.config : file exists"
+
exit 1
+
fi
+
ln -sv ${configfile} $buildRoot/.config
-
configurePhase = ''
-
runHook preConfigure
+
# reads the existing .config file and prompts the user for options in
+
# the current kernel source that are not found in the file.
+
make $makeFlags "''${makeFlagsArray[@]}" oldconfig
+
runHook postConfigure
-
export buildRoot=$TMPDIR/kernel-buildroot
-
mkdir -p $buildRoot
+
make $makeFlags "''${makeFlagsArray[@]}" prepare
+
actualModDirVersion="$(cat $buildRoot/include/config/kernel.release)"
+
if [ "$actualModDirVersion" != "${modDirVersion}" ]; then
+
echo "Error: modDirVersion ${modDirVersion} specified in the Nix expression is wrong, it should be: $actualModDirVersion"
+
exit 1
+
fi
-
echo "manual-config configurePhase buildRoot=$buildRoot pwd=$PWD"
+
buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=$(date -u -d @$SOURCE_DATE_EPOCH)")
-
if [ -f "$buildRoot/.config" ]; then
-
echo "Could not link $buildRoot/.config : file exists"
-
exit 1
-
fi
-
ln -sv ${configfile} $buildRoot/.config
+
cd $buildRoot
+
'';
-
# reads the existing .config file and prompts the user for options in
-
# the current kernel source that are not found in the file.
-
make $makeFlags "''${makeFlagsArray[@]}" oldconfig
-
runHook postConfigure
+
buildFlags = [
+
"KBUILD_BUILD_VERSION=1-NixOS"
+
kernelConf.target
+
"vmlinux" # for "perf" and things like that
+
] ++ optional isModular "modules"
+
++ optionals buildDTBs ["dtbs" "DTC_FLAGS=-@"]
+
++ extraMakeFlags;
-
make $makeFlags "''${makeFlagsArray[@]}" prepare
-
actualModDirVersion="$(cat $buildRoot/include/config/kernel.release)"
-
if [ "$actualModDirVersion" != "${modDirVersion}" ]; then
-
echo "Error: modDirVersion ${modDirVersion} specified in the Nix expression is wrong, it should be: $actualModDirVersion"
-
exit 1
-
fi
+
installFlags = [
+
"INSTALL_PATH=$(out)"
+
] ++ (optional isModular "INSTALL_MOD_PATH=$(out)")
+
++ optionals buildDTBs ["dtbs_install" "INSTALL_DTBS_PATH=$(out)/dtbs"];
-
buildFlagsArray+=("KBUILD_BUILD_TIMESTAMP=$(date -u -d @$SOURCE_DATE_EPOCH)")
+
preInstall = let
+
# All we really need to do here is copy the final image and System.map to $out,
+
# and use the kernel's modules_install, firmware_install, dtbs_install, etc. targets
+
# for the rest. Easy, right?
+
#
+
# Unfortunately for us, the obvious way of getting the built image path,
+
# make -s image_name, does not work correctly, because some architectures
+
# (*cough* aarch64 *cough*) change KBUILD_IMAGE on the fly in their install targets,
+
# so we end up attempting to install the thing we didn't actually build.
+
#
+
# Thankfully, there's a way out that doesn't involve just hardcoding everything.
+
#
+
# The kernel has an install target, which runs a pretty simple shell script
+
# (located at scripts/install.sh or arch/$arch/boot/install.sh, depending on
+
# which kernel version you're looking at) that tries to do something sensible.
+
#
+
# (it would be great to hijack this script immediately, as it has all the
+
# information we need passed to it and we don't need it to try and be smart,
+
# but unfortunately, the exact location of the scripts differs between kernel
+
# versions, and they're seemingly not considered to be public API at all)
+
#
+
# One of the ways it tries to discover what "something sensible" actually is
+
# is by delegating to what's supposed to be a user-provided install script
+
# located at ~/bin/installkernel.
+
#
+
# (the other options are:
+
# - a distribution-specific script at /sbin/installkernel,
+
# which we can't really create in the sandbox easily
+
# - an architecture-specific script at arch/$arch/boot/install.sh,
+
# which attempts to guess _something_ and usually guesses very wrong)
+
#
+
# More specifically, the install script exec's into ~/bin/installkernel, if one
+
# exists, with the following arguments:
+
#
+
# $1: $KERNELRELEASE - full kernel version string
+
# $2: $KBUILD_IMAGE - the final image path
+
# $3: System.map - path to System.map file, seemingly hardcoded everywhere
+
# $4: $INSTALL_PATH - path to the destination directory as specified in installFlags
+
#
+
# $2 is exactly what we want, so hijack the script and use the knowledge given to it
+
# by the makefile overlords for our own nefarious ends.
+
#
+
# Note that the makefiles specifically look in ~/bin/installkernel, and
+
# writeShellScriptBin writes the script to <store path>/bin/installkernel,
+
# so HOME needs to be set to just the store path.
+
#
+
# FIXME: figure out a less roundabout way of doing this.
+
installkernel = buildPackages.writeShellScriptBin "installkernel" ''
+
cp -av $2 $4
+
cp -av $3 $4
+
'';
+
in ''
+
installFlagsArray+=("-j$NIX_BUILD_CORES")
+
export HOME=${installkernel}
+
'';
-
cd $buildRoot
-
'';
+
# Some image types need special install targets (e.g. uImage is installed with make uinstall)
+
installTargets = [
+
(kernelConf.installTarget or (
+
/**/ if kernelConf.target == "uImage" then "uinstall"
+
else if kernelConf.target == "zImage" || kernelConf.target == "Image.gz" then "zinstall"
+
else "install"))
+
];
-
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" "pie" ];
+
postInstall = optionalString isModular ''
+
mkdir -p $dev
+
cp vmlinux $dev/
+
if [ -z "''${dontStrip-}" ]; then
+
installFlagsArray+=("INSTALL_MOD_STRIP=1")
+
fi
+
make modules_install $makeFlags "''${makeFlagsArray[@]}" \
+
$installFlags "''${installFlagsArray[@]}"
+
unlink $out/lib/modules/${modDirVersion}/build
+
unlink $out/lib/modules/${modDirVersion}/source
-
# Absolute paths for compilers avoid any PATH-clobbering issues.
-
makeFlags = [
-
"O=$(buildRoot)"
-
"CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
-
"HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"
-
"HOSTLD=${buildPackages.stdenv.cc.bintools}/bin/${buildPackages.stdenv.cc.targetPrefix}ld"
-
"ARCH=${stdenv.hostPlatform.linuxArch}"
-
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
-
] ++ (kernelConf.makeFlags or [])
-
++ extraMakeFlags;
+
mkdir -p $dev/lib/modules/${modDirVersion}/{build,source}
-
karch = stdenv.hostPlatform.linuxArch;
+
# To save space, exclude a bunch of unneeded stuff when copying.
+
(cd .. && rsync --archive --prune-empty-dirs \
+
--exclude='/build/' \
+
* $dev/lib/modules/${modDirVersion}/source/)
-
buildFlags = [
-
"DTC_FLAGS=-@"
-
"KBUILD_BUILD_VERSION=1-NixOS"
+
cd $dev/lib/modules/${modDirVersion}/source
-
# Set by default in the kernel since a73619a845d5,
-
# replicated here to apply to older versions.
-
# Makes __FILE__ relative to the build directory.
-
"KCPPFLAGS=-fmacro-prefix-map=$(sourceRoot)/="
-
kernelConf.target
-
] ++ optional isModular "modules"
-
++ optional buildDTBs "dtbs"
-
++ extraMakeFlags;
+
cp $buildRoot/{.config,Module.symvers} $dev/lib/modules/${modDirVersion}/build
+
make modules_prepare $makeFlags "''${makeFlagsArray[@]}" O=$dev/lib/modules/${modDirVersion}/build
-
installFlags = [
-
"INSTALL_PATH=$(out)"
-
] ++ (optional isModular "INSTALL_MOD_PATH=$(out)")
-
++ optionals buildDTBs ["dtbs_install" "INSTALL_DTBS_PATH=$(out)/dtbs"];
+
# For reproducibility, removes accidental leftovers from a `cc1` call
+
# from a `try-run` call from the Makefile
+
rm -f $dev/lib/modules/${modDirVersion}/build/.[0-9]*.d
-
preInstall = let
-
# All we really need to do here is copy the final image and System.map to $out,
-
# and use the kernel's modules_install, firmware_install, dtbs_install, etc. targets
-
# for the rest. Easy, right?
-
#
-
# Unfortunately for us, the obvious way of getting the built image path,
-
# make -s image_name, does not work correctly, because some architectures
-
# (*cough* aarch64 *cough*) change KBUILD_IMAGE on the fly in their install targets,
-
# so we end up attempting to install the thing we didn't actually build.
-
#
-
# Thankfully, there's a way out that doesn't involve just hardcoding everything.
-
#
-
# The kernel has an install target, which runs a pretty simple shell script
-
# (located at scripts/install.sh or arch/$arch/boot/install.sh, depending on
-
# which kernel version you're looking at) that tries to do something sensible.
-
#
-
# (it would be great to hijack this script immediately, as it has all the
-
# information we need passed to it and we don't need it to try and be smart,
-
# but unfortunately, the exact location of the scripts differs between kernel
-
# versions, and they're seemingly not considered to be public API at all)
-
#
-
# One of the ways it tries to discover what "something sensible" actually is
-
# is by delegating to what's supposed to be a user-provided install script
-
# located at ~/bin/installkernel.
-
#
-
# (the other options are:
-
# - a distribution-specific script at /sbin/installkernel,
-
# which we can't really create in the sandbox easily
-
# - an architecture-specific script at arch/$arch/boot/install.sh,
-
# which attempts to guess _something_ and usually guesses very wrong)
-
#
-
# More specifically, the install script exec's into ~/bin/installkernel, if one
-
# exists, with the following arguments:
-
#
-
# $1: $KERNELRELEASE - full kernel version string
-
# $2: $KBUILD_IMAGE - the final image path
-
# $3: System.map - path to System.map file, seemingly hardcoded everywhere
-
# $4: $INSTALL_PATH - path to the destination directory as specified in installFlags
-
#
-
# $2 is exactly what we want, so hijack the script and use the knowledge given to it
-
# by the makefile overlords for our own nefarious ends.
-
#
-
# Note that the makefiles specifically look in ~/bin/installkernel, and
-
# writeShellScriptBin writes the script to <store path>/bin/installkernel,
-
# so HOME needs to be set to just the store path.
-
#
-
# FIXME: figure out a less roundabout way of doing this.
-
installkernel = buildPackages.writeShellScriptBin "installkernel" ''
-
cp -av $2 $4
-
cp -av $3 $4
-
'';
-
in ''
-
installFlagsArray+=("-j$NIX_BUILD_CORES")
-
export HOME=${installkernel}
-
'';
+
# Keep some extra files on some arches (powerpc, aarch64)
+
for f in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o; do
+
if [ -f "$buildRoot/$f" ]; then
+
cp $buildRoot/$f $dev/lib/modules/${modDirVersion}/build/$f
+
fi
+
done
-
# Some image types need special install targets (e.g. uImage is installed with make uinstall)
-
installTargets = [
-
(kernelConf.installTarget or (
-
/**/ if target == "uImage" then "uinstall"
-
else if target == "zImage" || target == "Image.gz" then "zinstall"
-
else "install"))
-
];
+
# !!! No documentation on how much of the source tree must be kept
+
# If/when kernel builds fail due to missing files, you can add
+
# them here. Note that we may see packages requiring headers
+
# from drivers/ in the future; it adds 50M to keep all of its
+
# headers on 3.10 though.
-
postInstall = optionalString isModular ''
-
if [ -z "''${dontStrip-}" ]; then
-
installFlagsArray+=("INSTALL_MOD_STRIP=1")
-
fi
-
make modules_install $makeFlags "''${makeFlagsArray[@]}" \
-
$installFlags "''${installFlagsArray[@]}"
-
unlink $out/lib/modules/${modDirVersion}/build
-
unlink $out/lib/modules/${modDirVersion}/source
+
chmod u+w -R ..
+
arch=$(cd $dev/lib/modules/${modDirVersion}/build/arch; ls)
-
mkdir $dev/lib/modules/${modDirVersion}/build
+
# Remove unused arches
+
for d in $(cd arch/; ls); do
+
if [ "$d" = "$arch" ]; then continue; fi
+
if [ "$arch" = arm64 ] && [ "$d" = arm ]; then continue; fi
+
rm -rf arch/$d
+
done
-
cd $dev/lib/modules/${modDirVersion}/source
+
# Remove all driver-specific code (50M of which is headers)
+
rm -fR drivers
-
cp $buildRoot/{.config,Module.symvers} $dev/lib/modules/${modDirVersion}/build
-
make modules_prepare $makeFlags "''${makeFlagsArray[@]}" O=$dev/lib/modules/${modDirVersion}/build
+
# Keep all headers
+
find . -type f -name '*.h' -print0 | xargs -0 -r chmod u-w
-
# For reproducibility, removes accidental leftovers from a `cc1` call
-
# from a `try-run` call from the Makefile
-
rm -f $dev/lib/modules/${modDirVersion}/build/.[0-9]*.d
+
# Keep linker scripts (they are required for out-of-tree modules on aarch64)
+
find . -type f -name '*.lds' -print0 | xargs -0 -r chmod u-w
-
# Keep some extra files
-
for f in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o \
-
scripts/gdb/linux vmlinux vmlinux-gdb.py
-
do
-
if [ -e "$buildRoot/$f" ]; then
-
mkdir -p "$(dirname "$dev/lib/modules/${modDirVersion}/build/$f")"
-
cp -HR $buildRoot/$f $dev/lib/modules/${modDirVersion}/build/$f
-
fi
-
done
-
ln -s $dev/lib/modules/${modDirVersion}/build/vmlinux $dev
+
# Keep root and arch-specific Makefiles
+
chmod u-w Makefile arch/"$arch"/Makefile*
-
# !!! No documentation on how much of the source tree must be kept
-
# If/when kernel builds fail due to missing files, you can add
-
# them here. Note that we may see packages requiring headers
-
# from drivers/ in the future; it adds 50M to keep all of its
-
# headers on 3.10 though.
-
-
chmod u+w -R ..
-
arch=$(cd $dev/lib/modules/${modDirVersion}/build/arch; ls)
-
-
# Remove unused arches
-
for d in $(cd arch/; ls); do
-
if [ "$d" = "$arch" ]; then continue; fi
-
if [ "$arch" = arm64 ] && [ "$d" = arm ]; then continue; fi
-
rm -rf arch/$d
-
done
-
-
# Remove all driver-specific code (50M of which is headers)
-
rm -fR drivers
-
-
# Keep all headers
-
find . -type f -name '*.h' -print0 | xargs -0 -r chmod u-w
+
# Keep whole scripts dir
+
chmod u-w -R scripts
-
# Keep linker scripts (they are required for out-of-tree modules on aarch64)
-
find . -type f -name '*.lds' -print0 | xargs -0 -r chmod u-w
+
# Delete everything not kept
+
find . -type f -perm -u=w -print0 | xargs -0 -r rm
-
# Keep root and arch-specific Makefiles
-
chmod u-w Makefile arch/"$arch"/Makefile*
+
# Delete empty directories
+
find -empty -type d -delete
-
# Keep whole scripts dir
-
chmod u-w -R scripts
+
# Remove reference to kmod
+
sed -i Makefile -e 's|= ${buildPackages.kmod}/bin/depmod|= depmod|'
+
'';
-
# Delete everything not kept
-
find . -type f -perm -u=w -print0 | xargs -0 -r rm
+
requiredSystemFeatures = [ "big-parallel" ];
-
# Delete empty directories
-
find -empty -type d -delete
+
meta = {
+
description =
+
"The Linux kernel" +
+
(if kernelPatches == [] then "" else
+
" (with patches: "
+
+ lib.concatStringsSep ", " (map (x: x.name) kernelPatches)
+
+ ")");
+
license = lib.licenses.gpl2Only;
+
homepage = "https://www.kernel.org/";
+
maintainers = lib.teams.linux-kernel.members ++ [
+
maintainers.thoughtpolice
+
];
+
platforms = platforms.linux;
+
timeout = 14400; # 4 hours
+
} // extraMeta;
+
};
+
in
-
# Remove reference to kmod
-
sed -i Makefile -e 's|= ${buildPackages.kmod}/bin/depmod|= depmod|'
-
''
-
# unfortunately linux/arch/mips/Makefile does not understand installkernel
-
# and simply copies to $(INSTALL_PATH)/vmlinux-$(KERNELRELEASE)
-
+ lib.optionalString stdenv.hostPlatform.isMips ''
-
mv $out/vmlinux-* $out/vmlinux || true
-
mv $out/vmlinuz-* $out/vmlinuz || true
-
mv $out/System.map-* $out/System.map
-
'';
+
assert lib.versionOlder version "5.8" -> libelf != null;
+
assert lib.versionAtLeast version "5.8" -> elfutils != null;
-
preFixup = ''
-
# Don't strip $dev/lib/modules/*/vmlinux
-
stripDebugList="$(cd $dev && echo lib/modules/*/build/*/)"
-
'' + lib.optionalString (stdenv.hostPlatform.isMips) ''
-
$STRIP -s $out/vmlinux || true
-
'';
+
stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.linux-kernel kernelPatches configfile) // {
+
pname = "linux";
+
inherit version;
enableParallelBuilding = true;
-
passthru = rec {
-
inherit version modDirVersion config kernelPatches configfile
-
moduleBuildDependencies stdenv;
-
inherit isZen isHardened isLibre;
-
isXen = lib.warn "The isXen attribute is deprecated. All Nixpkgs kernels that support it now have Xen enabled." true;
-
baseVersion = lib.head (lib.splitString "-rc" version);
-
kernelOlder = lib.versionOlder baseVersion;
-
kernelAtLeast = lib.versionAtLeast baseVersion;
-
};
+
depsBuildBuild = [ buildPackages.stdenv.cc ];
+
nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr zstd python3Minimal ]
+
++ optional (stdenv.hostPlatform.linux-kernel.target == "uImage") buildPackages.ubootTools
+
++ optional (lib.versionOlder version "5.8") libelf
+
++ optionals (lib.versionAtLeast version "4.16") [ bison flex ]
+
++ optionals (lib.versionAtLeast version "5.2") [ cpio pahole zlib ]
+
++ optional (lib.versionAtLeast version "5.8") elfutils
+
;
-
requiredSystemFeatures = [ "big-parallel" ];
+
hardeningDisable = [ "bindnow" "format" "fortify" "stackprotector" "pic" "pie" ];
-
meta = {
-
description =
-
"The Linux kernel" +
-
(lib.optionalString (kernelPatches != []) (
-
" (with patches: "
-
+ lib.concatStringsSep ", " (map (x: x.name) kernelPatches)
-
+ ")"
-
));
-
license = lib.licenses.gpl2Only;
-
homepage = "https://www.kernel.org/";
-
maintainers = lib.teams.linux-kernel.members ++ [
-
maintainers.thoughtpolice
-
];
-
platforms = platforms.linux;
-
badPlatforms =
-
lib.optionals (lib.versionOlder version "4.15") [ "riscv32-linux" "riscv64-linux" ] ++
-
lib.optional (lib.versionOlder version "5.19") "loongarch64-linux";
-
timeout = 14400; # 4 hours
-
} // extraMeta;
-
} // optionalAttrs (pos != null) {
-
inherit pos;
-
} // optionalAttrs isModular {
-
outputs = [ "out" "dev" ];
-
}))
+
# Absolute paths for compilers avoid any PATH-clobbering issues.
+
makeFlags = [
+
"O=$(buildRoot)"
+
"CC=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
+
"HOSTCC=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"
+
"HOSTLD=${buildPackages.stdenv.cc.bintools}/bin/${buildPackages.stdenv.cc.targetPrefix}ld"
+
"ARCH=${stdenv.hostPlatform.linuxArch}"
+
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+
] ++ (stdenv.hostPlatform.linux-kernel.makeFlags or [])
+
++ extraMakeFlags;
+
+
karch = stdenv.hostPlatform.linuxArch;
+
} // (optionalAttrs (pos != null) { inherit pos; })))
+2
pkgs/servers/baserow/default.nix
···
doCheck = false;
};
+
+
django = super.django_3;
};
};
in
+2
pkgs/servers/mail/mailman/python.nix
···
python3.override {
packageOverrides = self: super: {
+
django = super.django_3;
+
# does not find tests
alembic = super.alembic.overridePythonAttrs (oldAttrs: {
doCheck = false;
+12 -10
pkgs/servers/sql/postgresql/default.nix
···
};
mkPackages = self: {
+
# TODO: remove ahead of 23.11 branchoff
+
# "PostgreSQL 11 will stop receiving fixes on November 9, 2023"
postgresql_11 = self.callPackage generic {
-
version = "11.20";
+
version = "11.21";
psqlSchema = "11.1"; # should be 11, but changing it is invasive
-
hash = "sha256-PXyIgvZKfphTSgRCV9/uerrXelt9oSUI2F1yK5i1rM4=";
+
hash = "sha256-B7CDdHHV3XeyUWazRxjzuhCBa2rWHmkeb8VHzz/P+FA=";
this = self.postgresql_11;
thisAttr = "postgresql_11";
inherit self;
};
postgresql_12 = self.callPackage generic {
-
version = "12.15";
+
version = "12.16";
psqlSchema = "12";
-
hash = "sha256-u1IG4oZMHEV5k4uW6mCW0VXyKr8tLMKqV1cePEyxKzY=";
+
hash = "sha256-xfH/96D5Ph7DdGQXsFlCkOzmF7SZXtlbjVJ68LoOOPM=";
this = self.postgresql_12;
thisAttr = "postgresql_12";
inherit self;
};
postgresql_13 = self.callPackage generic {
-
version = "13.11";
+
version = "13.12";
psqlSchema = "13";
-
hash = "sha256-SZL/ZHIDVmtnDU5U3FMXSZomhWyTV20OqVG99r7lC/s=";
+
hash = "sha256-DaHtzuNRS3vHum268MAEmeisFZBmjoeJxQJTpiSfIYs=";
this = self.postgresql_13;
thisAttr = "postgresql_13";
inherit self;
};
postgresql_14 = self.callPackage generic {
-
version = "14.8";
+
version = "14.9";
psqlSchema = "14";
-
hash = "sha256-OdOPADBzftA4Nd6+7+47N9M1RizkmV4kl7w41iHr5Fo=";
+
hash = "sha256-sf47qbGn86ljfdFlbf2tKIkBYHP9TTXxO1AUPLu2qO8=";
this = self.postgresql_14;
thisAttr = "postgresql_14";
inherit self;
};
postgresql_15 = self.callPackage generic {
-
version = "15.3";
+
version = "15.4";
psqlSchema = "15";
-
hash = "sha256-/8fUiR8A/79cP06rf7vO2EYLjA7mPFpRZxM7nmWZ2TI=";
+
hash = "sha256-uuxaS9xENzNmU7bLXZ7Ym+W9XAxYuU4L7O4KmZ5jyPk=";
this = self.postgresql_15;
thisAttr = "postgresql_15";
inherit self;
+4
pkgs/shells/bash/5.nix
···
url = "https://cgit.freebsd.org/ports/plain/shells/bash/files/patch-configure?id=3e147a1f594751a68fea00a28090d0792bee0b51";
sha256 = "XHFMQ6eXTReNoywdETyrfQEv1rKF8+XFbQZP4YoVKFk=";
})
+
# Apply parallel build fix pending upstream inclusion:
+
# https://savannah.gnu.org/patch/index.php?10373
+
# Had to fetch manually to workaround -p0 default.
+
./parallel.patch
];
configureFlags = [
+12
pkgs/shells/bash/parallel.patch
···
+
From https://savannah.gnu.org/patch/index.php?10373
+
https://savannah.gnu.org/patch/download.php?file_id=54964
+
--- Makefile.in
+
+++ Makefile.in
+
@@ -1432,6 +1432,7 @@ siglist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
subst.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
test.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
trap.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
+unwind_prot.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
variables.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
version.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
xmalloc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+21 -48
pkgs/stdenv/darwin/default.nix
···
isBuiltByBootstrapFilesCompiler =
pkg: isFromNixpkgs pkg && isFromBootstrapFiles pkg.stdenv.cc.cc;
-
commonPreHook = pkgs: lib.optionalString (pkgs.darwin.system_cmds != null) ''
-
# Only use a response file on older systems with a small ARG_MAX (less than 1 MiB).
-
export NIX_CC_USE_RESPONSE_FILE=$(( "$("${lib.getBin pkgs.darwin.system_cmds}/bin/getconf" ARG_MAX)" < 1048576 ))
-
export NIX_LD_USE_RESPONSE_FILE=$NIX_CC_USE_RESPONSE_FILE
-
'' + ''
+
commonPreHook = ''
export NIX_ENFORCE_NO_NATIVE=''${NIX_ENFORCE_NO_NATIVE-1}
export NIX_ENFORCE_PURITY=''${NIX_ENFORCE_PURITY-1}
export NIX_IGNORE_LD_THROUGH_GCC=1
···
# dependencies on the bootstrapTools in the final stdenv.
dontPatchShebangs=1
'' + ''
-
${commonPreHook prevStage}
+
${commonPreHook}
${extraPreHook}
'' + lib.optionalString (prevStage.darwin ? locale) ''
export PATH_LOCALE=${prevStage.darwin.locale}/share/locale
···
print-reexports = null;
rewrite-tbd = null;
sigtool = null;
-
system_cmds = null;
CF = null;
Libsystem = null;
};
···
rewrite-tbd = bootstrapTools;
sigtool = bootstrapTools;
-
-
# The bootstrap only needs `getconf` from system_cmds, and it only needs to be able to
-
# query `ARG_MAX`. Using a small value here should be fine for the initial stage 1 build.
-
system_cmds = self.stdenv.mkDerivation {
-
name = "bootstrap-stage0-system_cmds";
-
buildCommand = ''
-
mkdir -p "$out/bin"
-
cat <<block > "$out/bin/getconf"
-
#!${bootstrapTools}/bin/bash
-
case "\$1" in
-
ARG_MAX)
-
echo "262144"
-
;;
-
*)
-
exit 1
-
esac
-
block
-
chmod a+x "$out/bin/getconf"
-
'';
-
passthru.isFromBootstrapFiles = true;
-
};
} // lib.optionalAttrs (! useAppleSDKLibs) {
CF = self.stdenv.mkDerivation {
name = "bootstrap-stage0-CF";
···
assert lib.all isFromBootstrapFiles (with prevStage; [ bash coreutils cpio gnugrep pbzx ]);
assert lib.all isFromBootstrapFiles (with prevStage.darwin; [
-
binutils-unwrapped cctools print-reexports rewrite-tbd sigtool system_cmds
+
binutils-unwrapped cctools print-reexports rewrite-tbd sigtool
]);
assert (! useAppleSDKLibs) -> lib.all isFromBootstrapFiles (with prevStage.darwin; [ CF Libsystem ]);
···
python3 = super.python3Minimal;
darwin = super.darwin.overrideScope (selfDarwin: superDarwin: {
-
inherit (prevStage.darwin) system_cmds;
+
signingUtils = prevStage.darwin.signingUtils.override {
+
inherit (selfDarwin) sigtool;
+
};
-
signingUtils = prevStage.darwin.signingUtils.override {
+
postLinkSignHook = prevStage.darwin.postLinkSignHook.override {
inherit (selfDarwin) sigtool;
};
···
'';
})
-
# Build sysctl, system_cmds and Python for use by LLVM’s check phase. These must be built in their
+
# Build sysctl and Python for use by LLVM’s check phase. These must be built in their
# own stage, or an infinite recursion results on x86_64-darwin when using the source-based SDK.
(prevStage:
# previous stage1 stdenv:
···
assert lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [
binutils-unwrapped cctools locale libtapi print-reexports rewrite-tbd sigtool
]);
-
assert lib.all isFromBootstrapFiles (with prevStage.darwin; [ system_cmds ]);
-
assert (! useAppleSDKLibs) -> lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [ CF Libsystem configd ]);
assert useAppleSDKLibs -> lib.all isFromNixpkgs (with prevStage.darwin; [ CF Libsystem libobjc]);
assert lib.all isFromNixpkgs (with prevStage.darwin; [ dyld launchd xnu ]);
···
]);
assert lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [
-
binutils-unwrapped cctools locale libtapi print-reexports rewrite-tbd sigtool system_cmds
+
binutils-unwrapped cctools locale libtapi print-reexports rewrite-tbd sigtool
]);
assert (! useAppleSDKLibs) -> lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [ CF Libsystem configd ]);
···
darwin = super.darwin.overrideScope (_: superDarwin: {
inherit (prevStage.darwin)
CF Libsystem configd darwin-stubs dyld launchd libclosure libdispatch libobjc
-
locale objc4 postLinkSignHook print-reexports rewrite-tbd signingUtils sigtool
-
system_cmds;
+
locale objc4 postLinkSignHook print-reexports rewrite-tbd signingUtils sigtool;
# Avoid building unnecessary Python dependencies due to building LLVM manpages.
cctools-llvm = superDarwin.cctools-llvm.override { enableManpages = false; };
···
]);
assert lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [
-
binutils-unwrapped cctools locale libtapi print-reexports rewrite-tbd sigtool system_cmds
+
binutils-unwrapped cctools locale libtapi print-reexports rewrite-tbd sigtool
]);
assert (! useAppleSDKLibs) -> lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [ CF Libsystem configd ]);
···
darwin = super.darwin.overrideScope (selfDarwin: superDarwin: {
inherit (prevStage.darwin)
CF binutils-unwrapped cctools configd darwin-stubs launchd libobjc libtapi locale
-
objc4 print-reexports rewrite-tbd signingUtils sigtool system_cmds;
+
objc4 print-reexports rewrite-tbd signingUtils sigtool;
});
llvmPackages = super.llvmPackages // (
···
]);
assert lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [
-
binutils-unwrapped cctools locale libtapi print-reexports rewrite-tbd sigtool system_cmds
+
binutils-unwrapped cctools locale libtapi print-reexports rewrite-tbd sigtool
]);
assert (! useAppleSDKLibs) -> lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [ CF configd ]);
···
darwin = super.darwin.overrideScope (selfDarwin: superDarwin: {
inherit (prevStage.darwin)
Libsystem configd darwin-stubs launchd locale print-reexports rewrite-tbd
-
signingUtils sigtool system_cmds;
+
signingUtils sigtool;
# Rewrap binutils so it uses the rebuilt Libsystem.
binutils = superDarwin.binutils.override {
···
]);
assert lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [
-
locale print-reexports rewrite-tbd sigtool system_cmds
+
locale print-reexports rewrite-tbd sigtool
]);
assert lib.all isBuiltByNixpkgsCompiler (with prevStage.darwin; [
binutils-unwrapped cctools libtapi
···
inherit (prevStage.darwin)
CF Libsystem binutils binutils-unwrapped cctools cctools-llvm cctools-port configd
darwin-stubs dyld launchd libclosure libdispatch libobjc libtapi locale objc4
-
postLinkSignHook print-reexports rewrite-tbd signingUtils sigtool system_cmds;
+
postLinkSignHook print-reexports rewrite-tbd signingUtils sigtool;
});
llvmPackages = super.llvmPackages // (
···
]);
assert lib.all isBuiltByBootstrapFilesCompiler (with prevStage.darwin; [
-
locale print-reexports rewrite-tbd sigtool system_cmds
+
locale print-reexports rewrite-tbd sigtool
]);
assert lib.all isBuiltByNixpkgsCompiler (with prevStage.darwin; [
binutils-unwrapped cctools libtapi
···
]);
assert lib.all isBuiltByNixpkgsCompiler (with prevStage.darwin; [
-
binutils-unwrapped cctools libtapi locale print-reexports rewrite-tbd sigtool system_cmds
+
binutils-unwrapped cctools libtapi locale print-reexports rewrite-tbd sigtool
]);
assert (! useAppleSDKLibs) -> lib.all isBuiltByNixpkgsCompiler (with prevStage.darwin; [ CF Libsystem configd ]);
···
inherit config;
-
preHook = (commonPreHook prevStage) + ''
+
preHook = ''
+
${commonPreHook}
stripDebugFlags="-S" # llvm-strip does not support "-p" for Mach-O
export PATH_LOCALE=${prevStage.darwin.locale}/share/locale
'';
···
dyld
libtapi
locale
-
system_cmds
++ lib.optional useAppleSDKLibs [ objc4 ]
++ lib.optionals doSign [ postLinkSignHook sigtool signingUtils ]);
···
darwin = super.darwin.overrideScope (_: _: {
inherit (prevStage.darwin)
-
CF ICU Libsystem darwin-stubs dyld locale libobjc libtapi system_cmds xnu;
+
CF ICU Libsystem darwin-stubs dyld locale libobjc libtapi xnu;
} // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
inherit (prevStage.darwin) binutils binutils-unwrapped cctools-llvm cctools-port;
});
+1 -4
pkgs/stdenv/generic/default.nix
···
../../build-support/setup-hooks/prune-libtool-files.sh
../../build-support/setup-hooks/reproducible-builds.sh
../../build-support/setup-hooks/set-source-date-epoch-to-latest.sh
-
(with buildPlatform; if isAarch64 && isLinux
-
then ../../build-support/setup-hooks/strip-tmp-aarch64.sh
-
else ../../build-support/setup-hooks/strip.sh
-
)
+
../../build-support/setup-hooks/strip.sh
] ++ lib.optionals hasCC [ cc ];
defaultBuildInputs = extraBuildInputs;
+3
pkgs/stdenv/linux/default.nix
···
inherit lib;
inherit (prevStage) coreutils gnugrep;
stdenvNoCC = prevStage.ccWrapperStdenv;
+
fortify-headers = prevStage.fortify-headers;
}).overrideAttrs(a: lib.optionalAttrs (prevStage.gcc-unwrapped.passthru.isXgcc or false) {
# This affects only `xgcc` (the compiler which compiles the final compiler).
postFixup = (a.postFixup or "") + ''
···
inherit lib;
inherit (self) stdenvNoCC coreutils gnugrep;
shell = self.bash + "/bin/bash";
+
fortify-headers = self.fortify-headers;
};
};
extraNativeBuildInputs = [
···
++ [ linuxHeaders # propagated from .dev
binutils gcc gcc.cc gcc.cc.lib gcc.expand-response-params gcc.cc.libgcc glibc.passthru.libgcc
]
+
++ lib.optionals (localSystem.libc == "musl") [ fortify-headers ]
++ [ prevStage.updateAutotoolsGnuConfigScriptsHook prevStage.gnu-config ]
++ (with gcc-unwrapped.passthru; [
gmp libmpc mpfr isl
+18 -1
pkgs/test/stdenv/patch-shebangs.nix
···
};
};
+
updates-nix-store = stdenv.mkDerivation {
+
name = "updates-nix-store";
+
strictDeps = false;
+
dontUnpack = true;
+
installPhase = ''
+
mkdir -p $out/bin
+
echo "#!$NIX_STORE/path/to/bash" > $out/bin/test
+
echo "echo -n hello" >> $out/bin/test
+
chmod +x $out/bin/test
+
patchShebangs --update $out/bin/test
+
dontPatchShebangs=1
+
'';
+
passthru = {
+
assertion = "grep '^#!${stdenv.shell}' $out/bin/test > /dev/null";
+
};
+
};
+
split-string = stdenv.mkDerivation {
name = "split-string";
strictDeps = false;
···
in
stdenv.mkDerivation {
name = "test-patch-shebangs";
-
passthru = { inherit (tests) bad-shebang ignores-nix-store split-string; };
+
passthru = { inherit (tests) bad-shebang ignores-nix-store updates-nix-store split-string; };
buildCommand = ''
validate() {
local name=$1
+9 -2
pkgs/tools/archivers/zip/default.nix
···
];
sha256 = "0sb3h3067pzf3a7mlxn1hikpcjrsvycjcnj9hl9b1c3ykcgvps7h";
};
-
patchPhase = ''
+
prePatch = ''
substituteInPlace unix/Makefile --replace 'CC = cc' ""
'';
···
"INSTALL=cp"
];
-
patches = lib.optionals (enableNLS && !stdenv.isCygwin) [ ./natspec-gentoo.patch.bz2 ];
+
patches = [
+
# Trying to use `memset` without declaring it is flagged as an error with clang 16, causing
+
# the `configure` script to incorrectly define `ZMEM`. That causes the build to fail due to
+
# incompatible redeclarations of `memset`, `memcpy`, and `memcmp` in `zip.h`.
+
./fix-memset-detection.patch
+
# Implicit declaration of `closedir` and `opendir` cause dirent detection to fail with clang 16.
+
./fix-implicit-declarations.patch
+
] ++ lib.optionals (enableNLS && !stdenv.isCygwin) [ ./natspec-gentoo.patch.bz2 ];
buildInputs = lib.optional enableNLS libnatspec
++ lib.optional stdenv.isCygwin libiconv;
+21
pkgs/tools/archivers/zip/fix-implicit-declarations.patch
···
+
--- a/unix/configure 2009-04-16 15:25:12.000000000 -0400
+
+++ b/unix/configure 2023-05-30 15:18:33.670321348 -0400
+
@@ -408,7 +408,7 @@
+
echo Check for errno declaration
+
cat > conftest.c << _EOF_
+
#include <errno.h>
+
-main()
+
+int main()
+
{
+
errno = 0;
+
return 0;
+
@@ -419,6 +419,8 @@
+
+
echo Check for directory libraries
+
cat > conftest.c << _EOF_
+
+#include <sys/types.h>
+
+#include <dirent.h>
+
int main() { return closedir(opendir(".")); }
+
_EOF_
+
+
+15
pkgs/tools/archivers/zip/fix-memset-detection.patch
···
+
diff -ur a/unix/configure b/unix/configure
+
--- a/unix/configure 2008-06-19 21:32:20.000000000 -0600
+
+++ b/unix/configure 2023-07-11 10:02:57.809867694 -0600
+
@@ -519,7 +519,10 @@
+
+
+
echo Check for memset
+
-echo "int main(){ char k; memset(&k,0,0); return 0; }" > conftest.c
+
+cat > conftest.c << _EOF_
+
+#include <string.h>
+
+int main(){ char k; memset(&k,0,0); return 0; }
+
+_EOF_
+
$CC -o conftest conftest.c >/dev/null 2>/dev/null
+
[ $? -ne 0 ] && CFLAGS="${CFLAGS} -DZMEM"
+
+2 -2
pkgs/tools/compression/xz/default.nix
···
stdenv.mkDerivation rec {
pname = "xz";
-
version = "5.4.3";
+
version = "5.4.4";
src = fetchurl {
url = "https://tukaani.org/xz/xz-${version}.tar.bz2";
-
sha256 = "sha256-kkOgRZjXpwwfVnoBQ6JVWBrFxksUD9Vf1cvB4AsOb5A=";
+
sha256 = "sha256-C2/N4aw46QQzolVvUAwGWVC5vNLWAgBu/DNHgr3+YpY=";
};
strictDeps = true;
+2 -2
pkgs/tools/graphics/graphviz/default.nix
···
in
stdenv.mkDerivation rec {
pname = "graphviz";
-
version = "8.0.5";
+
version = "8.1.0";
src = fetchFromGitLab {
owner = "graphviz";
repo = "graphviz";
rev = version;
-
hash = "sha256-s3AUOLZhehxs2GcDCsq87RVvsDli1NvvQtwI0AyUs4k=";
+
hash = "sha256-xTdrtwSpizqf5tNRX0Q0w10mEk4S0X7cmxHj3Us14kY=";
};
nativeBuildInputs = [
+2 -2
pkgs/tools/misc/nanoemoji/default.nix
···
absl-py
fonttools
lxml
-
ninja-python
+
ninja
picosvg
pillow
regex
···
nativeCheckInputs = with python3.pkgs; [
pytestCheckHook
-
ninja-python
+
ninja
picosvg
];
+17 -2
pkgs/top-level/all-packages.nix
···
folks = callPackage ../development/libraries/folks { };
+
fortify-headers = callPackage ../development/libraries/fortify-headers { };
+
makeFontsConf = let fontconfig_ = fontconfig; in {fontconfig ? fontconfig_, fontDirectories}:
callPackage ../development/libraries/fontconfig/make-fonts-conf.nix {
inherit fontconfig fontDirectories;
···
prospector = callPackage ../development/tools/prospector { };
-
protobuf = protobuf3_21;
+
protobuf = protobuf3_23;
+
protobuf3_23 = callPackage ../development/libraries/protobuf/3.23.nix { };
protobuf3_21 = callPackage ../development/libraries/protobuf/3.21.nix {
abseil-cpp = abseil-cpp_202103;
···
buildGo120Package = darwin.apple_sdk_11_0.callPackage ../build-support/go/package.nix {
go = buildPackages.go_1_20;
+
};
+
+
# requires a newer Apple SDK
+
go_1_21 = darwin.apple_sdk_11_0.callPackage ../development/compilers/go/1.21.nix {
+
inherit (darwin.apple_sdk_11_0.frameworks) Foundation Security;
+
};
+
buildGo121Module = darwin.apple_sdk_11_0.callPackage ../build-support/go/module.nix {
+
go = buildPackages.go_1_21;
+
};
+
buildGo121Package = darwin.apple_sdk_11_0.callPackage ../build-support/go/package.nix {
+
go = buildPackages.go_1_21;
go2nix = callPackage ../development/tools/go2nix { };
···
ecs-agent = callPackage ../applications/virtualization/ecs-agent { };
-
ed = callPackage ../applications/editors/ed { };
+
inherit (recurseIntoAttrs (callPackage ../applications/editors/ed { }))
+
ed edUnstable;
edbrowse = callPackage ../applications/editors/edbrowse { };
+2 -12
pkgs/top-level/darwin-packages.nix
···
sigtool = callPackage ../os-specific/darwin/sigtool { };
-
postLinkSignHook = pkgs.writeTextFile {
-
name = "post-link-sign-hook";
-
executable = true;
-
-
text = ''
-
if [ "$linkerOutput" != "/dev/null" ]; then
-
CODESIGN_ALLOCATE=${targetPrefix}codesign_allocate \
-
${self.sigtool}/bin/codesign -f -s - "$linkerOutput"
-
fi
-
'';
-
};
+
signingUtils = callPackage ../os-specific/darwin/signing-utils { };
-
signingUtils = callPackage ../os-specific/darwin/signing-utils { };
+
postLinkSignHook = callPackage ../os-specific/darwin/signing-utils/post-link-sign-hook.nix { };
autoSignDarwinBinariesHook = pkgs.makeSetupHook {
name = "auto-sign-darwin-binaries-hook";
+2
pkgs/top-level/python-aliases.nix
···
django_classytags = django-classy-tags; # added 2023-07-25
django_colorful = django-colorful; # added 2023-07-25
django_compat = django-compat; # added 2023-07-25
+
django-compat = throw "django-compat has been removed. It provided forward/backport compat for django 1.x, which is long end of life."; # added 2023-07-26
django_contrib_comments = django-contrib-comments; # added 2023-07-25
django-discover-runner = throw "django-discover-runner was removed because it is no longer maintained."; # added 2022-11-21
django_environ = django-environ; # added 2021-12-25
···
mutmut = throw "mutmut has been promoted to a top-level attribute"; # added 2022-10-02
net2grid = gridnet; # add 2022-04-22
nghttp2 = throw "in 1.52.0 removed deprecated python bindings."; # added 2023-06-08
+
ninja-python = ninja; # add 2022-08-03
nose-cover3 = throw "nose-cover3 has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-02-16
nose_progressive = throw "nose_progressive has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; #added 2023-02-21
notifymuch = throw "notifymuch has been promoted to a top-level attribute"; # added 2022-10-02
+11 -8
pkgs/top-level/python-packages.nix
···
distutils_extra = callPackage ../development/python-modules/distutils_extra { };
-
django = self.django_3;
-
-
# Current LTS
+
# LTS in extended support phase
django_3 = callPackage ../development/python-modules/django/3.nix { };
-
# Current latest
+
# LTS with mainsteam support
+
django = self.django_4;
django_4 = callPackage ../development/python-modules/django/4.nix { };
django-admin-datta = callPackage ../development/python-modules/django-admin-datta { };
···
django-cleanup = callPackage ../development/python-modules/django-cleanup { };
django-colorful = callPackage ../development/python-modules/django-colorful { };
-
-
django-compat = callPackage ../development/python-modules/django-compat { };
django-compressor = callPackage ../development/python-modules/django-compressor { };
···
ffmpeg-progress-yield = callPackage ../development/python-modules/ffmpeg-progress-yield { };
+
ffmpy = callPackage ../development/python-modules/ffmpy { };
+
fiblary3-fork = callPackage ../development/python-modules/fiblary3-fork { };
fido2 = callPackage ../development/python-modules/fido2 { };
···
gradient-utils = callPackage ../development/python-modules/gradient-utils { };
gradient_statsd = callPackage ../development/python-modules/gradient_statsd { };
+
+
gradio = callPackage ../development/python-modules/gradio { };
grammalecte = callPackage ../development/python-modules/grammalecte { };
···
mesonpep517 = callPackage ../development/python-modules/mesonpep517 { };
-
meson-python = callPackage ../development/python-modules/meson-python { };
+
meson-python = callPackage ../development/python-modules/meson-python {
+
inherit (pkgs) ninja;
+
};
messagebird = callPackage ../development/python-modules/messagebird { };
···
nine = callPackage ../development/python-modules/nine { };
-
ninja-python = callPackage ../development/python-modules/ninja { };
+
ninja = callPackage ../development/python-modules/ninja { inherit (pkgs) ninja; };
nipy = callPackage ../development/python-modules/nipy { };