Merge pull request #147092 from NixOS/staging-next

staging-next: 2021-11-22
This commit is contained in:
Jonathan Ringer 2021-12-02 16:04:32 -08:00 committed by GitHub
commit 571cbf3d1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
86 changed files with 767 additions and 574 deletions

View file

@ -82,6 +82,9 @@ in
# chromium-based browsers refuse to run as root
test-support.displayManager.auto.user = "alice";
# browsers may hang with the default memory
virtualisation.memorySize = 600;
networking.hosts."127.0.0.1" = [ "good.example.com" "bad.example.com" ];
security.pki.certificateFiles = [ "${example-good-cert}/ca.crt" ];
@ -160,7 +163,7 @@ in
browser = command.split()[0]
with subtest("Good certificate is trusted in " + browser):
execute_as(
"alice", f"env P11_KIT_DEBUG=trust {command} https://good.example.com & >&2"
"alice", f"{command} https://good.example.com >&2 &"
)
wait_for_window_as("alice", browser)
machine.wait_for_text("It works!")
@ -168,9 +171,9 @@ in
execute_as("alice", "xdotool key ctrl+w") # close tab
with subtest("Unknown CA is untrusted in " + browser):
execute_as("alice", f"{command} https://bad.example.com & >&2")
execute_as("alice", f"{command} https://bad.example.com >&2 &")
machine.wait_for_text(error)
machine.screenshot("bad" + browser)
machine.succeed("pkill " + browser)
machine.succeed("pkill -f " + browser)
'';
})

View file

@ -25,7 +25,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport;
let
version = "2.33.1";
version = "2.34.0";
svn = subversionClient.override { perlBindings = perlSupport; };
gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
@ -37,7 +37,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "sha256-4FSm5sKwiL0b/19h7ZulqpHJo81QlTmktBxd3wIgHy8=";
sha256 = "07s1c9lzlm4kpbb5lmxy0869phg7037pv4faz5hlqyb5csrbjv7x";
};
outputs = [ "out" ] ++ lib.optional withManual "doc";

View file

@ -22,8 +22,16 @@ stdenv.mkDerivation rec {
moveToOutput "bin/orbit2-config" "$dev"
'';
# Parallel build fails due to missing internal library dependency:
# libtool --tag=CC --mode=link gcc ... -o orbit-name-server-2 ...
# ld: cannot find libname-server-2.a: No such file or directory
# It happens because orbit-name-server-2 should have libname-server-2.a
# in _DEPENDENCIES but does not. Instead of fixing it and regenerating
# Makefile.in let's just disable parallel build.
enableParallelBuilding = false;
meta = with lib; {
homepage = "https://projects.gnome.org/ORBit2/";
homepage = "https://developer-old.gnome.org/ORBit2/";
description = "A CORBA 2.4-compliant Object Request Broker";
platforms = platforms.unix;
maintainers = with maintainers; [ lovek323 ];

View file

@ -51,11 +51,11 @@ in
stdenv.mkDerivation rec {
pname = "go";
version = "1.16.9";
version = "1.16.10";
src = fetchurl {
url = "https://dl.google.com/go/go${version}.src.tar.gz";
sha256 = "sha256-ChzH/XvSBEj3Hr7WTYRhOIUNUJmxjPXMEKT8RRYNjD0=";
sha256 = "sha256-qQVHIBFYXkA9ANKkHefO0puIhDCdc0gqMH9on9DzILU=";
};
# perl is used for testing go vet

View file

@ -73,6 +73,20 @@ in stdenv.mkDerivation (rec {
sha256 = "0nh123kld0dgz2h941lng331dkj3wbm5lfxm375k1f569gv83hlk";
stripLen = 1;
})
# Fix invalid std::string(nullptr) for GCC 12
(fetchpatch {
name = "nvptx-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})
(fetchpatch {
name = "dfaemitter-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/0841916e87a39e3c223c986e8da31e4a9a1432e3.patch";
sha256 = "1kckghvsngs51mqm82asy0s9vr19h8aqbw43a0w44mccqw6bzrwf";
stripLen = 1;
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
postPatch = optionalString stdenv.isDarwin ''

View file

@ -65,6 +65,26 @@ in stdenv.mkDerivation (rec {
sha256 = "sha256:12s8vr6ibri8b48h2z38f3afhwam10arfiqfy4yg37bmc054p5hi";
stripLen = 1;
})
# gcc-11 compat upstream patch
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/b498303066a63a203d24f739b2d2e0e56dca70d1.patch";
sha256 = "sha256:0nh123kld0dgz2h941lng331dkj3wbm5lfxm375k1f569gv83hlk";
stripLen = 1;
})
# Fix invalid std::string(nullptr) for GCC 12
(fetchpatch {
name = "nvptx-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})
(fetchpatch {
name = "dfaemitter-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/0841916e87a39e3c223c986e8da31e4a9a1432e3.patch";
sha256 = "1kckghvsngs51mqm82asy0s9vr19h8aqbw43a0w44mccqw6bzrwf";
stripLen = 1;
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
postPatch = optionalString stdenv.isDarwin ''

View file

@ -44,6 +44,8 @@ let
];
postPatch = ''
(cd tools && ln -s ../../clang-tools-extra extra)
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
-e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
lib/Driver/ToolChains/*.cpp

View file

@ -66,6 +66,14 @@ stdenv.mkDerivation ({
# stripLen = 1;
#})
./gnu-install-dirs.patch
# Fix invalid std::string(nullptr) for GCC 12
(fetchpatch {
name = "nvptx-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
postPatch = optionalString stdenv.isDarwin ''

View file

@ -64,6 +64,14 @@ stdenv.mkDerivation ({
sha256 = "0fxgrxmfnjx17w3lcq19rk68b2xksh1bynz3ina784kma7hp4wdb";
})
./gnu-install-dirs.patch
# Fix invalid std::string(nullptr) for GCC 12
(fetchpatch {
name = "nvptx-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
postPatch = optionalString stdenv.isDarwin ''

View file

@ -68,6 +68,14 @@ in stdenv.mkDerivation ({
sha256 = "0k6k1p5yisgwx417a67s7sr9930rqh1n0zv5jvply8vjjy4b3kf8";
})
./gnu-install-dirs.patch
# Fix invalid std::string(nullptr) for GCC 12
(fetchpatch {
name = "nvptx-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
postPatch = optionalString stdenv.isDarwin ''

View file

@ -71,6 +71,14 @@ in stdenv.mkDerivation ({
sha256 = "0nh123kld0dgz2h941lng331dkj3wbm5lfxm375k1f569gv83hlk";
stripLen = 1;
})
# Fix invalid std::string(nullptr) for GCC 12
(fetchpatch {
name = "nvptx-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
postPatch = optionalString stdenv.isDarwin ''

View file

@ -69,6 +69,14 @@ in stdenv.mkDerivation (rec {
sha256 = "0nh123kld0dgz2h941lng331dkj3wbm5lfxm375k1f569gv83hlk";
stripLen = 1;
})
# Fix invalid std::string(nullptr) for GCC 12
(fetchpatch {
name = "nvptx-gcc-12.patch";
url = "https://github.com/llvm/llvm-project/commit/99e64623ec9b31def9375753491cc6093c831809.patch";
sha256 = "0zjfjgavqzi2ypqwqnlvy6flyvdz8hi1anwv0ybwnm2zqixg7za3";
stripLen = 1;
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
postPatch = optionalString stdenv.isDarwin ''

View file

@ -44,6 +44,8 @@ let
];
postPatch = ''
(cd tools && ln -s ../../clang-tools-extra extra)
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
-e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
lib/Driver/ToolChains/*.cpp

View file

@ -1,10 +1,11 @@
{ lib, stdenv, fetchurl, m4, cxx ? true }:
let self = stdenv.mkDerivation rec {
name = "gmp-4.3.2";
pname = "gmp";
version = "4.3.2";
src = fetchurl {
url = "mirror://gnu/gmp/${name}.tar.bz2";
url = "mirror://gnu/gmp/gmp-${version}.tar.bz2";
sha256 = "0x8prpqi9amfcmi7r4zrza609ai9529pjaq0h4aw51i867064qck";
};

View file

@ -6,10 +6,11 @@
let inherit (lib) optional; in
let self = stdenv.mkDerivation rec {
name = "gmp-5.1.3";
pname = "gmp";
version = "5.1.3";
src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv
urls = [ "mirror://gnu/gmp/${name}.tar.bz2" "ftp://ftp.gmplib.org/pub/${name}/${name}.tar.bz2" ];
urls = [ "mirror://gnu/gmp/gmp-${version}.tar.bz2" "ftp://ftp.gmplib.org/pub/gmp-${version}/gmp-${version}.tar.bz2" ];
sha256 = "0q5i39pxrasgn9qdxzpfbwhh11ph80p57x6hf48m74261d97j83m";
};

View file

@ -12,10 +12,11 @@
let inherit (lib) optional; in
let self = stdenv.mkDerivation rec {
name = "gmp-6.2.1";
pname = "gmp";
version = "6.2.1";
src = fetchurl { # we need to use bz2, others aren't in bootstrapping stdenv
urls = [ "mirror://gnu/gmp/${name}.tar.bz2" "ftp://ftp.gmplib.org/pub/${name}/${name}.tar.bz2" ];
urls = [ "mirror://gnu/gmp/gmp-${version}.tar.bz2" "ftp://ftp.gmplib.org/pub/gmp-${version}/gmp-${version}.tar.bz2" ];
sha256 = "0z2ddfiwgi0xbf65z4fg4hqqzlhv0cc6hdcswf3c6n21xdmk5sga";
};

View file

@ -51,8 +51,10 @@ stdenv.mkDerivation rec {
preConfigure = "patchShebangs .";
configureFlags =
lib.optional stdenv.isLinux "--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt"
++ [
lib.optionals stdenv.isLinux [
"--with-default-trust-store-file=/etc/ssl/certs/ca-certificates.crt"
"--with-default-trust-store-pkcs11=pkcs11:"
] ++ [
"--disable-dependency-tracking"
"--enable-fast-install"
"--with-unbound-root-key-file=${dns-root-data}/root.key"

View file

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "libnetfilter_log";
version = "1.0.1";
version = "1.0.2";
src = fetchurl {
url = "https://netfilter.org/projects/libnetfilter_log/files/${pname}-${version}.tar.bz2";
sha256 = "089vjcfxl5qjqpswrbgklf4wflh44irmw6sk2k0kmfixfmszxq3l";
sha256 = "1spy9xs41v76kid5ana8n126f3mvgq6fjibbfbj4kn0larbhix73";
};
buildInputs = [ libmnl ];

View file

@ -1,12 +1,12 @@
{ lib, stdenv, fetchurl, pkg-config, libmnl }:
stdenv.mkDerivation rec {
version = "1.2.0";
version = "1.2.1";
pname = "libnftnl";
src = fetchurl {
url = "https://netfilter.org/projects/${pname}/files/${pname}-${version}.tar.bz2";
sha256 = "1xblq1cbcxhr6qmjpy98i1qdza148idgz99vbhjc7s4vzvfizc4h";
sha256 = "0z4khm2mnys9mcl8ckwf19cw20jgrv8650nfncy3xcgs2k2aa23m";
};
nativeBuildInputs = [ pkg-config ];
@ -17,6 +17,6 @@ stdenv.mkDerivation rec {
homepage = "http://netfilter.org/projects/libnftnl";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz ];
maintainers = with maintainers; [ fpletz ajs124 ];
};
}

View file

@ -5,13 +5,13 @@
stdenv.mkDerivation rec {
pname = "libuninameslist";
version = "20210917";
version = "20211114";
src = fetchFromGitHub {
owner = "fontforge";
repo = pname;
rev = version;
sha256 = "sha256-bwMgNK3DhhWjijush27265Q1UoZOw7T17fKsaR6IV14=";
sha256 = "sha256-izxG2mx+D83s78eL19ERUaLrw9FPjlJRcFZw3+xzLDQ=";
};
nativeBuildInputs = [

View file

@ -33,7 +33,7 @@ with lib;
let
# Release calendar: https://www.mesa3d.org/release-calendar.html
# Release frequency: https://www.mesa3d.org/releasing.html#schedule
version = "21.2.5";
version = "21.2.6";
branch = versions.major version;
self = stdenv.mkDerivation {
@ -47,7 +47,7 @@ self = stdenv.mkDerivation {
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
];
sha256 = "1fxcdf4qs4vmyjcns7jv62w4jy3gr383ar5b7mr77nb0nxgmhjcf";
sha256 = "0m69h3f9fr66h6xjxfc485zfdci6kl8j24ab0kx5k23f7kcj4zhy";
};
# TODO:

View file

@ -31,7 +31,11 @@ stdenv.mkDerivation rec {
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-trust-paths=/etc/ssl/trust-source:/etc/ssl/certs/ca-certificates.crt"
"--with-trust-paths=${lib.concatStringsSep ":" [
"/etc/ssl/trust-source" # p11-kit trust source
"/etc/ssl/certs/ca-certificates.crt" # NixOS + Debian/Ubuntu/Arch/Gentoo...
"/etc/pki/tls/certs/ca-bundle.crt" # Fedora/CentOS
]}"
];
enableParallelBuilding = true;

View file

@ -17,4 +17,3 @@ name="$2";
name=${name:-$(basename "$url")}
cached_output get_file "${name%%.*}" "$url" "${name#*.}"

View file

@ -16,4 +16,3 @@ cached_output () {
cat "cache-${ext//./-}/${basename}.${ext}";
}

View file

@ -26,6 +26,11 @@ buildPythonPackage rec {
pytestCheckHook
];
disabledTests = [
# makes http request to another server
"testEnviron"
];
pythonImportsCheck = [ "aiohttp_wsgi" ];
meta = with lib; {

View file

@ -6,6 +6,7 @@
, requests
, beautifulsoup4
, mypy
, types-requests
}:
buildPythonPackage rec {
@ -26,14 +27,17 @@ buildPythonPackage rec {
beautifulsoup4
];
checkInputs = [ mypy ];
checkInputs = [
mypy
types-requests
];
checkPhase = ''
echo -e "\x1b[32m## run mypy\x1b[0m"
mypy hydracheck
'';
meta = with lib;{
meta = with lib; {
description = "check hydra for the build status of a package";
homepage = "https://github.com/nix-community/hydra-check";
license = licenses.mit;

View file

@ -10,16 +10,20 @@
buildPythonPackage rec {
pname = "importlib-metadata";
version = "4.8.1";
version = "4.8.2";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
pname = "importlib_metadata";
inherit version;
sha256 = "sha256-8oSz4RJWrR5dA6uGuyzNb1M5aI/xek15eg/n3zJvI7E=";
sha256 = "sha256-db3sFMOX9ShyTBv9lwnWYLM6TS53OHozWPILhIu15fs=";
};
nativeBuildInputs = [ setuptools-scm ];
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
toml
@ -30,7 +34,10 @@ buildPythonPackage rec {
# Cyclic dependencies due to pyflakefs
doCheck = false;
pythonImportsCheck = [ "importlib_metadata" ];
pythonImportsCheck = [
"importlib_metadata"
];
meta = with lib; {
description = "Read metadata from Python packages";

View file

@ -1,28 +1,63 @@
{ lib, stdenv, fetchPypi, buildPythonPackage, typed-ast, psutil, isPy3k
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, buildPythonPackage
, mypy-extensions
, python
, pythonOlder
, typed-ast
, typing-extensions
, tomli
, types-typed-ast
}:
buildPythonPackage rec {
pname = "mypy";
version = "0.812";
disabled = !isPy3k;
version = "unstable-2021-11-14";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "069i9qnfanp7dn8df1vspnqb0flvsszzn22v00vj08nzlnd061yd";
src = fetchFromGitHub {
owner = "python";
repo = "mypy";
rev = "053a1beb94ee4e5b3260725594315d1b6776e42f";
sha256 = "sha256-q2ntj3y3GgXrw4v+yMvcqWFv4y/6YwunIj3bNzU9CH0=";
};
propagatedBuildInputs = [ typed-ast psutil mypy-extensions typing-extensions ];
patches = [
# FIXME: Remove patch after upstream has decided the proper solution.
# https://github.com/python/mypy/pull/11143
(fetchpatch {
url = "https://github.com/python/mypy/commit/f1755259d54330cd087cae763cd5bbbff26e3e8a.patch";
sha256 = "sha256-5gPahX2X6+/qUaqDQIGJGvh9lQ2EDtks2cpQutgbOHk=";
})
];
postPatch = ''
substituteInPlace setup.py \
--replace "tomli>=1.1.0,<1.2.0" "tomli"
'';
buildInputs = [
types-typed-ast
];
propagatedBuildInputs = [
mypy-extensions
tomli
typed-ast
typing-extensions
];
# Tests not included in pip package.
doCheck = false;
pythonImportsCheck = [
"mypy"
"mypy.types"
"mypy.api"
"mypy.fastparse"
"mypy.report"
"mypy.types"
"mypyc"
"mypyc.analysis"
];
@ -32,10 +67,13 @@ buildPythonPackage rec {
# is64bit: unfortunately the build would exhaust all possible memory on i686-linux.
MYPY_USE_MYPYC = stdenv.buildPlatform.is64bit;
# when testing reduce optimisation level to drastically reduce build time
MYPYC_OPT_LEVEL = 1;
meta = with lib; {
description = "Optional static typing for Python";
homepage = "http://www.mypy-lang.org";
license = licenses.mit;
maintainers = with maintainers; [ martingms lnl7 ];
maintainers = with maintainers; [ martingms lnl7 SuperSandro2000 ];
};
}

View file

@ -13,12 +13,12 @@ buildPythonPackage rec {
sha256 = "2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8";
};
propagatedBuildInputs = if pythonOlder "3.5" then [ typing ] else [ ];
propagatedBuildInputs = lib.optional (pythonOlder "3.5") typing;
meta = with lib; {
description = "Experimental type system extensions for programs checked with the mypy typechecker";
homepage = "http://www.mypy-lang.org";
license = licenses.mit;
maintainers = with maintainers; [ martingms lnl7 ];
maintainers = with maintainers; [ martingms lnl7 SuperSandro2000 ];
};
}

View file

@ -1,5 +1,6 @@
{ lib
, fetchPypi
, fetchpatch
, python
, buildPythonPackage
, gfortran
@ -72,10 +73,6 @@ in buildPythonPackage rec {
ln -s ${cfg} site.cfg
'';
# Workaround flakey compiler feature detection
# https://github.com/numpy/numpy/issues/19624
hardeningDisable = [ "strictoverflow" ];
enableParallelBuilding = true;
checkInputs = [

View file

@ -20,10 +20,16 @@ buildPythonPackage rec {
sha256 = "1d119csj1k5m9j0f7wdvpvnd02h548css6ybxqah92nk2v0rjscr";
};
disabledTests = [
"test_multiple_workspaces"
];
checkInputs = [ pytestCheckHook mock ];
propagatedBuildInputs = [ mypy python-lsp-server ];
pythonImportsCheck = [ "pylsp_mypy" ];
meta = with lib; {
homepage = "https://github.com/Richardk2n/pylsp-mypy";
description = "Mypy plugin for the Python LSP Server";

View file

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "tomli";
version = "1.2.1";
version = "1.2.2";
format = "pyproject";
outputs = [
@ -19,9 +19,14 @@ buildPythonPackage rec {
owner = "hukkin";
repo = pname;
rev = version;
sha256 = "sha256-30AQ9MQmclcjl1d83mIoxFXzaJn1OFKQlVxayqC5NxY=";
sha256 = "sha256-oDjpNzWxTaCC1+WyBKrkR6kp90ZomcZQfyW+xKddDoM=";
};
patches = [
# required for mypy
./fix-backwards-compatibility-load.patch
];
nativeBuildInputs = [ flit-core ];
postInstall = ''

View file

@ -0,0 +1,21 @@
diff --git a/tomli/_parser.py b/tomli/_parser.py
index 89e81c3..6fb1bfd 100644
--- a/tomli/_parser.py
+++ b/tomli/_parser.py
@@ -1,6 +1,6 @@
import string
from types import MappingProxyType
-from typing import Any, BinaryIO, Dict, FrozenSet, Iterable, NamedTuple, Optional, Tuple
+from typing import IO, Union, Any, BinaryIO, Dict, FrozenSet, Iterable, NamedTuple, Optional, Tuple
import warnings
from tomli._re import (
@@ -48,7 +48,7 @@ class TOMLDecodeError(ValueError):
"""An error raised if a document is not valid TOML."""
-def load(fp: BinaryIO, *, parse_float: ParseFloat = float) -> Dict[str, Any]:
+def load(fp: Union[IO, BinaryIO], *, parse_float: ParseFloat = float) -> Dict[str, Any]:
"""Parse TOML from a binary file object."""
s_bytes = fp.read()
try:

View file

@ -1,15 +1,16 @@
{ buildPythonPackage, fetchFromGitHub, lib, pythonOlder, pytest }:
buildPythonPackage rec {
pname = "typed-ast";
version = "1.4.3";
version = "1.5.0";
disabled = pythonOlder "3.3";
src = fetchFromGitHub {
owner = "python";
repo = "typed_ast";
rev = version;
sha256 = "16mn9snwik5n2ib65sw2xcaqdm02j8ps21zgjxf8kyy7qnx2mx4w";
sha256 = "sha256-z3l5gMG1Jp6EI7SnGn5ABVXVBi+bK///iJBqEWn4d+s=";
};
# Only works with Python 3.3 and newer;
disabled = pythonOlder "3.3";
pythonImportsCheck = [
"typed_ast"
@ -21,6 +22,7 @@ buildPythonPackage rec {
checkInputs = [
pytest
];
checkPhase = ''
runHook preCheck
@ -32,9 +34,10 @@ buildPythonPackage rec {
runHook postCheck
'';
meta = {
meta = with lib; {
homepage = "https://github.com/python/typed_ast";
description = "Python 2 and 3 ast modules with type comment support";
license = lib.licenses.asl20;
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -0,0 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
}:
buildPythonPackage rec {
pname = "types-typed-ast";
version = "1.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-2Op5y/vFIL6Nm8jeSHL0SzQtvbwJFmfi8hsDu9eWkVA=";
};
# Module doesn't have tests
doCheck = false;
pythonImportsCheck = [ "typed_ast-stubs" ];
meta = with lib; {
description = "Typing stubs for typed-ast";
homepage = "https://github.com/python/typeshed";
license = licenses.asl20;
maintainers = with maintainers; [ SuperSandro2000 veehaitch ];
};
}

View file

@ -1,4 +1,7 @@
{ lib, stdenv, fetchurl, perl, gdb, cctools, xnu, bootstrap_cmds }:
{ lib, stdenv, fetchurl, fetchpatch
, autoreconfHook, perl
, gdb, cctools, xnu, bootstrap_cmds
}:
stdenv.mkDerivation rec {
pname = "valgrind";
@ -9,16 +12,25 @@ stdenv.mkDerivation rec {
sha256 = "sha256-AIWaoTp3Lt33giIl9LRu4NOa++Bx0yd42k2ZmECB9/U=";
};
patches = [
# Fix tests on Musl.
# https://bugs.kde.org/show_bug.cgi?id=445300
(fetchpatch {
url = "https://bugsfiles.kde.org/attachment.cgi?id=143535";
sha256 = "036zyk30rixjvpylw3c7n171n4gpn6zcp7h6ya2dz4h5r478l9i6";
})
];
outputs = [ "out" "dev" "man" "doc" ];
hardeningDisable = [ "stackprotector" ];
hardeningDisable = [ "pie" "stackprotector" ];
# GDB is needed to provide a sane default for `--db-command'.
# Perl is needed for `callgrind_{annotate,control}'.
buildInputs = [ gdb perl ] ++ lib.optionals (stdenv.isDarwin) [ bootstrap_cmds xnu ];
# Perl is also a native build input.
nativeBuildInputs = [ perl ];
nativeBuildInputs = [ autoreconfHook perl ];
enableParallelBuilding = true;
separateDebugInfo = stdenv.isLinux;

View file

@ -21,6 +21,11 @@ wafConfigurePhase() {
echoCmd 'configure flags' "${flagsArray[@]}"
python "$wafPath" "${flagsArray[@]}"
if ! [[ -v enableParallelBuilding ]]; then
enableParallelBuilding=1
echo "waf: enabled parallel building"
fi
runHook postConfigure
}

View file

@ -15,7 +15,8 @@ stdenv.mkDerivation rec {
rm tests/test_conf_parser_save.sh
'';
enableParallelBuilding = true;
# test suite is not thread safe
enableParallelBuilding = false;
nativeBuildInputs = [ texinfo help2man ];

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
pname = "checkpolicy";
version = "2.9";
inherit (libsepol) se_release se_url;
version = "3.3";
inherit (libsepol) se_url;
src = fetchurl {
url = "${se_url}/${se_release}/checkpolicy-${version}.tar.gz";
sha256 = "13jz6f8zdrijvn5w1j102b36fs41z0q8ii74axw48cj550mw6im9";
url = "${se_url}/${version}/checkpolicy-${version}.tar.gz";
sha256 = "118l8c2vvnnckbd269saslr7adv6rdavr5rv0z5vh2m1lgglxj15";
};
nativeBuildInputs = [ bison flex ];

View file

@ -41,6 +41,7 @@ let
(whenAtLeast "5.2" yes)
];
DEBUG_INFO_BTF = whenAtLeast "5.2" (option yes);
BPF_LSM = whenAtLeast "5.7" (option yes);
DEBUG_KERNEL = yes;
DEBUG_DEVRES = no;
DYNAMIC_DEBUG = yes;

View file

@ -9,14 +9,14 @@ with lib;
stdenv.mkDerivation rec {
pname = "libselinux";
version = "3.0";
inherit (libsepol) se_release se_url;
version = "3.3";
inherit (libsepol) se_url;
outputs = [ "bin" "out" "dev" "man" ] ++ optional enablePython "py";
src = fetchurl {
url = "${se_url}/${se_release}/libselinux-${version}.tar.gz";
sha256 = "0cr4p0qkr4qd5z1x677vwhz6mlz55kxyijwi2dmrvbhxcw7v78if";
url = "${se_url}/${version}/libselinux-${version}.tar.gz";
sha256 = "0mvh793g7fg6wb6zqhkdyrv80x6k84ypqwi8ii89c91xcckyxzdc";
};
nativeBuildInputs = [ pkg-config ] ++ optionals enablePython [ swig python3 ];

View file

@ -6,12 +6,12 @@ with lib;
stdenv.mkDerivation rec {
pname = "libsemanage";
version = "2.9";
inherit (libsepol) se_release se_url;
version = "3.3";
inherit (libsepol) se_url;
src = fetchurl {
url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
sha256 = "075w6y3l9hiy5hicgwrmijyxmhfyd1r7cnc08qxyg4j46jfk8xi5";
url = "${se_url}/${version}/libsemanage-${version}.tar.gz";
sha256 = "1s3wb66l47blc15s6lkqs11j9l8pycdqqbb03x3vpfrlz9dfrl44";
};
outputs = [ "out" "dev" "man" ] ++ optional enablePython "py";

View file

@ -2,31 +2,16 @@
stdenv.mkDerivation rec {
pname = "libsepol";
version = "3.0";
se_release = "20191204";
version = "3.3";
se_url = "https://github.com/SELinuxProject/selinux/releases/download";
outputs = [ "bin" "out" "dev" "man" ];
src = fetchurl {
url = "${se_url}/${se_release}/libsepol-${version}.tar.gz";
sha256 = "0ygb6dh5lng91xs6xiqf5v0nxa68qmjc787p0s5h9w89364f2yjv";
url = "${se_url}/${version}/libsepol-${version}.tar.gz";
sha256 = "12r39ygn7aa1kz52wibfr4520m0cp75hlrn3i6rnjqa6p0zdz5rd";
};
patches = [
# upstream build fix against -fno-common compilers like >=gcc-10
(fetchpatch {
url = "https://github.com/SELinuxProject/selinux/commit/a96e8c59ecac84096d870b42701a504791a8cc8c.patch";
sha256 = "0aybv4kzbhx8xq6s82dsh4ib76k59qzh2bgxmk44iq5cjnqn5rd6";
stripLen = 1;
})
(fetchpatch {
url = "https://github.com/SELinuxProject/selinux/commit/3d32fc24d6aff360a538c63dad08ca5c957551b0.patch";
sha256 = "1mphwdlj4d6mwmsp5xkpf6ci4rxhgbi3fm79d08h4jbzxaf4wny4";
stripLen = 1;
})
];
postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
substituteInPlace src/Makefile --replace 'all: $(LIBA) $(LIBSO)' 'all: $(LIBA)'
sed -i $'/^\t.*LIBSO/d' src/Makefile
@ -46,7 +31,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-Wno-error";
passthru = { inherit se_release se_url; };
passthru = { inherit se_url; };
meta = with lib; {
description = "SELinux binary policy manipulation library";

View file

@ -10,12 +10,12 @@
with lib;
stdenv.mkDerivation rec {
version = "1.0.0";
version = "1.0.1";
pname = "nftables";
src = fetchurl {
url = "https://netfilter.org/projects/nftables/files/${pname}-${version}.tar.bz2";
sha256 = "1x25zs2czmn14mmq1nqi4zibsvh04vqjbx5lxj42nylnmxym9gsq";
sha256 = "08x4xw0s5sap3q7jfr91v7mrkxrydi4dvsckw85ims0qb1ibmviw";
};
nativeBuildInputs = [
@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
configureFlags = [
"--with-json"
"--with-cli=readline" # TODO: maybe switch to editline
] ++ optional (!withDebugSymbols) "--disable-debug"
++ optional (!withPython) "--disable-python"
++ optional withPython "--enable-python"
@ -45,6 +46,6 @@ stdenv.mkDerivation rec {
homepage = "https://netfilter.org/projects/nftables/";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ izorkin ];
maintainers = with maintainers; [ izorkin ajs124 ];
};
}

View file

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
pname = "policycoreutils";
version = "2.9";
inherit (libsepol) se_release se_url;
version = "3.3";
inherit (libsepol) se_url;
src = fetchurl {
url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz";
sha256 = "0yqg5ws5gbl1cbn8msxdk1c3ilmmx58qg5dx883kqyq0517k8g65";
url = "${se_url}/${version}/policycoreutils-${version}.tar.gz";
sha256 = "0y0hl32b2ks7r0fhbx3k2j1gqqms5aplyasjs3fz50caxl6096a1";
};
postPatch = ''
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
makeFlags = [
"PREFIX=$(out)"
"SBINDIR=$(out)/sbin"
"SBINDIR=$(out)/bin"
"ETCDIR=$(out)/etc"
"BASHCOMPLETIONDIR=$out/share/bash-completion/completions"
"LOCALEDIR=$(out)/share/locale"

View file

@ -7,13 +7,13 @@ with lib;
stdenv.mkDerivation rec {
pname = "selinux-python";
version = "2.9";
version = "3.3";
inherit (libsepol) se_release se_url;
inherit (libsepol) se_url;
src = fetchurl {
url = "${se_url}/${se_release}/selinux-python-${version}.tar.gz";
sha256 = "1pjzsyay5535cxcjag7y7k193ajry0s0xc3dqv5905qd7cwval1n";
url = "${se_url}/${version}/selinux-python-${version}.tar.gz";
sha256 = "1v244hpb45my303793xa4kcn7qnxjgxn4ja7rdn9k1q361hi1nca";
};
strictDeps = true;
@ -49,4 +49,3 @@ stdenv.mkDerivation rec {
platforms = platforms.linux;
};
}

View file

@ -9,12 +9,12 @@ with python3.pkgs;
stdenv.mkDerivation rec {
pname = "selinux-sandbox";
version = "2.9";
inherit (policycoreutils) se_release se_url;
version = "3.3";
inherit (policycoreutils) se_url;
src = fetchurl {
url = "${se_url}/${se_release}/selinux-sandbox-${version}.tar.gz";
sha256 = "0qj20jyi8v1653xdqj5yak3wwbvg5bw8f2jmx8fpahl6y1bmz481";
url = "${se_url}/${version}/selinux-sandbox-${version}.tar.gz";
sha256 = "0rw8pxfqhl6ww4w31fbf4hi3zilh1n3b1rfjm7ra76mm78wfyylj";
};
nativeBuildInputs = [ wrapPython ];

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "semodule-utils";
version = "2.9";
version = "3.3";
inherit (libsepol) se_release se_url;
inherit (libsepol) se_url;
src = fetchurl {
url = "${se_url}/${se_release}/${pname}-${version}.tar.gz";
sha256 = "01yrwnd3calmw6r8kdh8ld7i7fb250n2yqqqk9p0ymrlwsg6g0w0";
url = "${se_url}/${version}/${pname}-${version}.tar.gz";
sha256 = "0qvhl40a6jlm8p719nnlw2ghlxbh8lxbcsd59azxp884bxgfr61h";
};
buildInputs = [ libsepol ];

View file

@ -1,24 +0,0 @@
{ lib, stdenv, fetchurl, libsepol, python }:
stdenv.mkDerivation rec {
pname = "sepolgen";
version = "1.2.2";
inherit (libsepol) se_release se_url;
src = fetchurl {
url = "${se_url}/${se_release}/sepolgen-${version}.tar.gz";
sha256 = "09139kspr41zgksayi4dh982p8080lrfl96p4dld51nknbpaigdy";
};
preBuild = ''
makeFlagsArray+=("PREFIX=$out")
makeFlagsArray+=("DESTDIR=$out")
makeFlagsArray+=("PYTHONLIBDIR=lib/${python.libPrefix}/site-packages")
'';
meta = with lib; {
inherit (libsepol.meta) homepage platforms maintainers;
description = "SELinux policy generation library";
license = licenses.gpl2;
};
}

View file

@ -1,6 +1,5 @@
{ lib, fetchFromGitHub, python3
, libsepol, libselinux, checkpolicy
, fetchpatch
, withGraphics ? false
}:
@ -9,22 +8,15 @@ with python3.pkgs;
buildPythonApplication rec {
pname = "setools";
version = "4.3.0";
version = "4.4.0";
src = fetchFromGitHub {
owner = "SELinuxProject";
repo = pname;
rev = version;
sha256 = "0vr20bi8w147z5lclqz1l0j1b34137zg2r04pkafkgqqk7qbyjk6";
sha256 = "1qvd5j6zwq4fmlahg45swjplhif2z89x7s6pnp07gvcp2fbqdsh5";
};
patches = [
(fetchpatch { # included in 4.4.0
url = "https://github.com/SELinuxProject/setools/commit/f1b4a5d375be05fbccedb258c940d771bff8e524.diff";
sha256 = "1r38s6i4i6bdr2zdp5wcg1yifpf3pd018c73a511mgynyg7d11xy";
})
];
nativeBuildInputs = [ cython ];
buildInputs = [ libsepol ];
propagatedBuildInputs = [ enum34 libselinux networkx ]

View file

@ -59,6 +59,7 @@ stdenv.mkDerivation {
ln -sv mariadb $dev/include/mysql
ln -sv mariadb_version.h $dev/include/mariadb/mysql_version.h
ln -sv libmariadb.pc $dev/lib/pkgconfig/mysqlclient.pc
install -Dm644 include/ma_config.h $dev/include/mariadb/my_config.h
'';
meta = {

View file

@ -201,18 +201,18 @@ let
in self: {
postgresql_9_6 = self.callPackage generic {
version = "9.6.23";
version = "9.6.24";
psqlSchema = "9.6";
sha256 = "1fa735lrmv2vrfiixg73nh024gxlagcbrssklvgwdf0s82cgfjd8";
sha256 = "sha256-rrehlr4+vtGnR271ZfOXIhh8EI3UfadIm+nE/K6YKs4=";
this = self.postgresql_9_6;
thisAttr = "postgresql_9_6";
inherit self;
};
postgresql_10 = self.callPackage generic {
version = "10.18";
version = "10.19";
psqlSchema = "10.0"; # should be 10, but changing it is invasive
sha256 = "009qpb02bq0rx0aaw5ck70gk07xwparhfxvlfimgihw2vhp7qisp";
sha256 = "sha256-brgwtCi2DoSuh+IENrzmecTZ0CAr567A5BsMZ9kTQjk=";
this = self.postgresql_10;
thisAttr = "postgresql_10";
inherit self;
@ -220,36 +220,36 @@ in self: {
};
postgresql_11 = self.callPackage generic {
version = "11.13";
version = "11.14";
psqlSchema = "11.1"; # should be 11, but changing it is invasive
sha256 = "0j5wnscnxa3sx8d39s55654df8aikmvkihfb0a02hrgmyygnihx0";
sha256 = "sha256-llx/S+lvtk+VgYUsWMTwXDgS1K2CPA8+K9/nd8Fi+Zk=";
this = self.postgresql_11;
thisAttr = "postgresql_11";
inherit self;
};
postgresql_12 = self.callPackage generic {
version = "12.8";
version = "12.9";
psqlSchema = "12";
sha256 = "0an6v5bsp26d276wbdx76lsq6cq86hgi2fmkzwawnk63j3h02r72";
sha256 = "sha256-if2i3jPtBKmFSOQ/PuXxW4gr4XUF1jH+DdGlQKK1bc4=";
this = self.postgresql_12;
thisAttr = "postgresql_12";
inherit self;
};
postgresql_13 = self.callPackage generic {
version = "13.4";
version = "13.5";
psqlSchema = "13";
sha256 = "1kf0gcsrl5n25rjlvkh87aywmn28kbwvakm5c7j1qpr4j01y34za";
sha256 = "sha256-m4EGelXtuqvEGKrO9FfdhHdkKCdJlWCwBhWm6mwT9rM=";
this = self.postgresql_13;
thisAttr = "postgresql_13";
inherit self;
};
postgresql_14 = self.callPackage generic {
version = "14.0";
version = "14.1";
psqlSchema = "14";
sha256 = "08m14zcrcvc2i0xl10p0wgzycsmfmk27gny40a8mwdx74s8xfapf";
sha256 = "sha256-TTwQHqeuOJgvBr3HN1i1Nyf7ZALs2TggBvpezHwspB8=";
this = self.postgresql_14;
thisAttr = "postgresql_14";
inherit self;

View file

@ -9,4 +9,8 @@ patch: [
(patch "006" "051x8wlwrqk0yr0zg378vh824iklfl5g9pkmcdf62qp8gn9pvqbm")
(patch "007" "0fir80pp1gmlpadmqcgkrv4y119pc7xllchjzg05fd7px73viz5c")
(patch "008" "1lfjgshk8i9vch92p5wgc9r90j3phw79aa7gbai89w183b2z6b7j")
(patch "009" "1vn36dzd9g4y1h3jiss6418crla0rbcd0d6wwsyv9d5l7aaxlp74")
(patch "010" "0amfmvbzsand7bdypylkjdpcp88fa3cplfshn7vyzv2ff2rdgj52")
(patch "011" "0yq24abb4fzfxqnwl20b330sxl9lr9ds0nc4yi30f81l94b1y6aq")
(patch "012" "165bff97ffih49vfs4mkr5w3z5gn1w6zfyrf773iajkw6v48kw8h")
]

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-HkDgWwHoRWCNtWyfP4sj3veEd+KT5J7yL4J4Z/hJcrE=";
};
patches = lib.optionals stdenv.cc.isClang [
patches = [
# Fix clang configuration; remove with next release
(fetchpatch {
url = "https://github.com/rhash/RHash/commit/4dc506066cf1727b021e6352535a8bb315c3f8dc.patch";

View file

@ -18,6 +18,13 @@ stdenv.mkDerivation rec {
sha256 = "1wnj0jmkmrwjww7qk9dvfxh8h06jdn7mi8v2fvwh95b6x87z5l47";
excludes = [ "ChangeLog" ];
})
# Upstream fix for clang-13 and gcc-12 test support
(fetchpatch {
name = "gcc-12.patch";
url = "http://git.savannah.gnu.org/cgit/src-highlite.git/patch/?id=ab9fe5cb9b85c5afab94f2a7f4b6d7d473c14ee9";
sha256 = "1v33zd2766k7cdgmajw2lffw9wd7v4f8z01f40z53f6bp608nr62";
})
];
# source-highlight uses it's own binary to generate documentation.
@ -35,7 +42,7 @@ stdenv.mkDerivation rec {
"--with-bash-completion=${placeholder "out"}/share/bash_completion.d"
];
doCheck = !stdenv.cc.isClang;
doCheck = true;
enableParallelBuilding = true;
# Upstream uses the same intermediate files in multiple tests, running

View file

@ -838,6 +838,7 @@ mapAliases ({
sdlmame = mame; # added 2019-10-30
seeks = throw "seeks has been removed from nixpkgs, as it was unmaintained"; # added 2020-06-21
seg3d = throw "seg3d has been removed from nixpkgs (2019-11-10)";
sepolgen = throw "sepolgen was merged into selinux-python"; # added 2021-11-11
shared_mime_info = shared-mime-info; # added 2018-02-25
skrooge2 = skrooge; # added 2017-02-18
sky = throw "sky has been removed from nixpkgs (2020-09-16)";

View file

@ -22700,8 +22700,6 @@ with pkgs;
sdrangel = libsForQt5.callPackage ../applications/radio/sdrangel { };
sepolgen = callPackage ../os-specific/linux/sepolgen { };
setools = callPackage ../os-specific/linux/setools { };
seturgent = callPackage ../os-specific/linux/seturgent { };

View file

@ -9626,6 +9626,8 @@ in {
types-toml = callPackage ../development/python-modules/types-toml { };
types-typed-ast = callPackage ../development/python-modules/types-typed-ast { };
typesentry = callPackage ../development/python-modules/typesentry { };
typesystem = callPackage ../development/python-modules/typesystem { };