Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-05-08 06:20:05 +00:00 committed by GitHub
commit e21fb16f9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 442 additions and 317 deletions

View File

@ -87,4 +87,16 @@ rec {
then { system = elem; }
else { parsed = elem; };
in lib.matchAttrs pattern platform;
/* Check if a package is available on a given platform.
A package is available on a platform if both
1. One of `meta.platforms` pattern matches the given platform.
2. None of `meta.badPlatforms` pattern matches the given platform.
*/
availableOn = platform: pkg:
lib.any (platformMatch platform) pkg.meta.platforms &&
lib.all (elem: !platformMatch platform elem) (pkg.meta.badPlatforms or []);
}

View File

@ -260,14 +260,14 @@ rec {
};
u8 = unsign 8 256;
u16 = unsign 16 65536;
# the biggest int a 64-bit Nix accepts is 2^63 - 1 (9223372036854775808), for a 32-bit Nix it is 2^31 - 1 (2147483647)
# the smallest int a 64-bit Nix accepts is -2^63 (-9223372036854775807), for a 32-bit Nix it is -2^31 (-2147483648)
# u32 = unsign 32 4294967296;
# the biggest int Nix accepts is 2^63 - 1 (9223372036854775808)
# the smallest int Nix accepts is -2^63 (-9223372036854775807)
u32 = unsign 32 4294967296;
# u64 = unsign 64 18446744073709551616;
s8 = sign 8 256;
s16 = sign 16 65536;
# s32 = sign 32 4294967296;
s32 = sign 32 4294967296;
};
# Alias of u16 for a port number

View File

@ -1,7 +1,7 @@
{ pkgs, lib, ... }:
{
config = lib.mkIf (lib.any (lib.meta.platformMatch pkgs.stdenv.hostPlatform) pkgs.kexectools.meta.platforms) {
config = lib.mkIf (lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.kexectools) {
environment.systemPackages = [ pkgs.kexectools ];
systemd.services.prepare-kexec =

View File

@ -12,13 +12,14 @@
buildPythonPackage rec {
pname = "pick-colour-picker";
version = "unstable-2019-10-11"; # "1.5.0-3ec940"
version = "unstable-2021-01-19";
src = fetchFromGitHub {
owner = "stuartlangridge";
repo = "ColourPicker";
rev = "3ec9406d787ce373f6db0d520ed38a921edb9473";
sha256 = "04l8ch9297nhkgcmyhsbg0il424c8vy0isns1c7aypn0zp0dc4zd";
rev = "dec8f144918aa7964aaf86a346161beb7e997f09";
sha256 = "hW2rarfchZ3M0JVfz5RbJRvMhv2PpyLNEMyMAp2gC+o=";
fetchSubmodules = false;
};
nativeBuildInputs = [

View File

@ -5,13 +5,13 @@
buildGoModule rec {
pname = "dasel";
version = "1.14.1";
version = "1.15.0";
src = fetchFromGitHub {
owner = "TomWright";
repo = pname;
rev = "v${version}";
sha256 = "0nxdyd0zg4w1zr8p9z2x88h36vbn7ryk7160zszdiwh5qmdlv47v";
sha256 = "sha256-XJSWdXGa1qkkMfETUV8xx9oaMdNVFdO27/GvDvczjG8=";
};
vendorSha256 = "sha256-BdX4DO77mIf/+aBdkNVFUzClsIml1UMcgvikDbbdgcY=";

View File

@ -9,19 +9,19 @@ in
rustPlatform.buildRustPackage rec {
pname = "dwm-status";
version = "1.7.1";
version = "unstable-2021-05-04";
src = fetchFromGitHub {
owner = "Gerschtli";
repo = "dwm-status";
rev = version;
sha256 = "172qkzbi37j6wx81pyqqffi9wxbg3bf8nis7d15ncn1yfd5r4gqh";
repo = pname;
rev = "c5b1fda78a8175cb53df9d31ae037c58279df810";
sha256 = "sha256-dJUQ7vuz9OC6eU00Snbbza63j01ms54sXO1kqheun+8=";
};
nativeBuildInputs = [ makeWrapper pkg-config ];
buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ];
cargoSha256 = "041sd9zm1c3v6iihnwjcya2xg5yxb2y4biyxpjlfblz2srxa15dm";
cargoSha256 = "sha256-zSt6iNZ9hmvAgFEXzqfovRsMryVyFWHm68G7J3SMztY=";
postInstall = lib.optionalString (bins != []) ''
wrapProgram $out/bin/dwm-status --prefix "PATH" : "${lib.makeBinPath bins}"
@ -32,6 +32,7 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/Gerschtli/dwm-status";
license = with licenses; [ mit ];
maintainers = with maintainers; [ gerschtli ];
mainProgram = pname;
platforms = platforms.linux;
};
}

View File

@ -18,7 +18,7 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform

View File

@ -18,7 +18,7 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform

View File

@ -19,7 +19,7 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
enableIntegerSimple ? !(lib.meta.availableOn stdenv.hostPlatform gmp), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform

View File

@ -22,7 +22,7 @@
, # If enabled, GHC will be built with the GPL-free but slightly slower native
# bignum backend instead of the faster but GPLed gmp backend.
enableNativeBignum ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
enableNativeBignum ? !(lib.meta.availableOn stdenv.hostPlatform gmp)
, gmp
, # If enabled, use -fPIC when compiling static libs.

View File

@ -14,7 +14,7 @@ let
mkEnable = mkFlag "enable-" "disable-";
mkWith = mkFlag "with-" "without-";
shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
optLz4 = shouldUsePkg lz4;
optSnappy = shouldUsePkg snappy;

View File

@ -4,7 +4,8 @@
, sqlalchemy
, aiocontextvars
, isPy27
, pytest
, pytestCheckHook
, pymysql
, asyncpg
, aiomysql
, aiosqlite
@ -12,33 +13,37 @@
buildPythonPackage rec {
pname = "databases";
version = "0.2.6";
version = "0.4.3";
disabled = isPy27;
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "0cdb4vln4zdmqbbcj7711b81b2l64jg1miihqcg8gpi35v404h2q";
sha256 = "0aq88k7d9036cy6qvlfv9p2dxd6p6fic3j0az43gn6k1ardhdsgf";
};
propagatedBuildInputs = [
sqlalchemy
aiocontextvars
sqlalchemy
];
checkInputs = [
pytest
asyncpg
aiomysql
aiosqlite
asyncpg
pymysql
pytestCheckHook
];
# big chunk to tests depend on existing posgresql and mysql databases
# some tests are better than no tests
checkPhase = ''
pytest --ignore=tests/test_integration.py --ignore=tests/test_databases.py
'';
disabledTestPaths = [
# ModuleNotFoundError: No module named 'aiopg'
"tests/test_connection_options.py"
# circular dependency on starlette
"tests/test_integration.py"
# TEST_DATABASE_URLS is not set.
"tests/test_databases.py"
];
meta = with lib; {
description = "Async database support for Python";

View File

@ -0,0 +1,38 @@
{ lib
, buildPythonPackage
, fetchPypi
, cryptography
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "PyJWT";
version = "1.7.1";
src = fetchPypi {
inherit pname version;
sha256 = "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd";
};
postPatch = ''
substituteInPlace setup.py --replace "pytest>=4.0.1,<5.0.0" "pytest"
# drop coverage
sed -i '/pytest-cov/d' setup.py
sed -i '/--cov/d' setup.cfg
'';
propagatedBuildInputs = [
cryptography
];
checkInputs = [
pytestCheckHook
];
meta = with lib; {
description = "JSON Web Token implementation in Python";
homepage = "https://github.com/jpadilla/pyjwt";
license = licenses.mit;
};
}

View File

@ -15,7 +15,7 @@
with lib;
let
inherit (python3Packages) python dbus-python;
shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
libOnly = prefix == "lib";

View File

@ -5,7 +5,7 @@
}:
let
shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
optAlsaLib = shouldUsePkg alsaLib;
optDb = shouldUsePkg db;

File diff suppressed because it is too large Load Diff

View File

@ -605,7 +605,7 @@ self: super: {
libiconv
];
cargoSha256 = "1c8bwvwd23d7c3bk1ky1i8xgfz10dr8nqqcvp20g8rldjl8p2r08";
cargoSha256 = "sha256-Jy8ThtcdPV4fMGcQbJJnibwb3o5iEHNn54831OI9adc=";
};
in
''

View File

@ -132,6 +132,7 @@ fisadev/vim-isort
flazz/vim-colorschemes
floobits/floobits-neovim
folke/lsp-colors.nvim@main
folke/lsp-trouble.nvim@main
folke/which-key.nvim@main
freitass/todo.txt-vim
frigoeu/psc-ide-vim
@ -188,6 +189,7 @@ hrsh7th/vim-vsnip-integ
hsanson/vim-android
hsitz/VimOrganizer
iamcco/coc-spell-checker
iamcco/markdown-preview.nvim
ianks/vim-tsx
idanarye/vim-merginal
idris-hackers/idris-vim
@ -277,7 +279,7 @@ keith/rspec.vim
keith/swift.vim
kevinhwang91/nvim-bqf@main
kevinhwang91/nvim-hlslens@main
kevinhwang91/rnvimr
kevinhwang91/rnvimr@main
kien/rainbow_parentheses.vim
knubie/vim-kitty-navigator
konfekt/fastfold
@ -391,6 +393,7 @@ mpickering/hlint-refactor-vim
ms-jpq/chadtree@chad
mtikekar/vim-bsv
mzlogin/vim-markdown-toc
mzlogin/vim-smali
nanotech/jellybeans.vim
natebosch/vim-lsc
nathanaelkane/vim-indent-guides
@ -575,6 +578,7 @@ sickill/vim-pasta
SidOfc/mkdx
simnalamburt/vim-mundo
simrat39/rust-tools.nvim
sindrets/diffview.nvim@main
SirVer/ultisnips
sjl/gundo.vim
sjl/splice.vim
@ -596,6 +600,7 @@ takac/vim-hardtime
tami5/compe-conjure
tami5/lispdocs.nvim
tami5/sql.nvim
tbastos/vim-lua
tbodt/deoplete-tabnine
ternjs/tern_for_vim
terryma/vim-expand-region

View File

@ -3,8 +3,8 @@
, flex, bison
, linuxHeaders ? stdenv.cc.libc.linuxHeaders
, gawk
, withPerl ? stdenv.hostPlatform == stdenv.buildPlatform && lib.any (lib.meta.platformMatch stdenv.hostPlatform) perl.meta.platforms, perl
, withPython ? stdenv.hostPlatform == stdenv.buildPlatform && lib.any (lib.meta.platformMatch stdenv.hostPlatform) python.meta.platforms, python
, withPerl ? stdenv.hostPlatform == stdenv.buildPlatform && lib.meta.availableOn stdenv.hostPlatform perl, perl
, withPython ? stdenv.hostPlatform == stdenv.buildPlatform && lib.meta.availableOn stdenv.hostPlatform python, python
, swig
, ncurses
, pam

View File

@ -51,9 +51,9 @@
, iptables
, withSelinux ? false
, libselinux
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms
, withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp
, libseccomp
, withKexectools ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) kexectools.meta.platforms
, withKexectools ? lib.meta.availableOn stdenv.hostPlatform kexectools
, kexectools
, bashInteractive
, libmicrohttpd

View File

@ -14,7 +14,7 @@ let
mkWith = mkFlag "with-" "without-";
mkOther = mkFlag "" "" true;
shouldUsePkg = pkg: if pkg != null && lib.any (lib.meta.platformMatch stdenv.hostPlatform) pkg.meta.platforms then pkg else null;
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
optPam = shouldUsePkg pam;
optLibidn = shouldUsePkg libidn;

View File

@ -233,7 +233,7 @@ let
sed -e "s|sed |${gnused}/bin/sed |" \
-i "$out/share/fish/functions/alias.fish" \
"$out/share/fish/functions/prompt_pwd.fish"
sed -i "s|nroff |${groff}/bin/nroff |" \
sed -i "s|nroff|${groff}/bin/nroff|" \
"$out/share/fish/functions/__fish_print_help.fish"
sed -e "s|clear;|${getBin ncurses}/bin/clear;|" \
-i "$out/share/fish/functions/fish_default_key_bindings.fish"

View File

@ -46,7 +46,8 @@ python3Packages.buildPythonApplication rec {
--replace "cryptography==3.2.1" "cryptography" \
--replace "pyOpenSSL==19.1.0" "pyOpenSSL" \
--replace "PyYAML==5.3.1" "PyYAML" \
--replace "six==1.14.0" "six"
--replace "six==1.14.0" "six" \
--replace "arrow==0.17.0" "arrow"
'';
meta = with lib; {

View File

@ -88,7 +88,7 @@
systemd
util-linux
] ++ lib.optional enableRDW networkmanager
++ lib.optional (lib.any (lib.meta.platformMatch stdenv.hostPlatform) x86_energy_perf_policy.meta.platforms) x86_energy_perf_policy
++ lib.optional (lib.meta.availableOn stdenv.hostPlatform x86_energy_perf_policy) x86_energy_perf_policy
);
in
''

View File

@ -21,7 +21,7 @@ common =
, storeDir
, stateDir
, confDir
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
, withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp, libseccomp
, withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp
, enableStatic ? stdenv.hostPlatform.isStatic
, pname, version, suffix ? "", src

View File

@ -433,6 +433,8 @@ with self; with super; {
pyhamcrest = callPackage ../development/python-modules/pyhamcrest/1.nix { };
pyjwt = callPackage ../development/python-modules/pyjwt/1.nix { };
pykickstart = callPackage ../development/python-modules/pykickstart { };
pylibacl = callPackage ../development/python-modules/pylibacl/0.5.nix { };