Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-02-20 12:19:39 +00:00 committed by GitHub
commit 5884dca2b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 90 additions and 42 deletions

View File

@ -159,10 +159,14 @@ let emacs = stdenv.mkDerivation (lib.optionalAttrs nativeComp {
'' + lib.optionalString (nativeComp && withNS) ''
ln -snf $out/lib/emacs/*/native-lisp $out/Applications/Emacs.app/Contents/native-lisp
'' + lib.optionalString nativeComp ''
$out/bin/emacs --batch \
-l comp --eval "(mapatoms (lambda (s) \
(when (subr-primitive-p (symbol-function s)) \
(comp-trampoline-compile s))))"
echo "Generating native-compiled trampolines..."
# precompile trampolines in parallel, but avoid spawning one process per trampoline.
# 1000 is a rough lower bound on the number of trampolines compiled.
$out/bin/emacs --batch --eval "(mapatoms (lambda (s) \
(when (subr-primitive-p (symbol-function s)) (print s))))" \
| xargs -n $((1000/NIX_BUILD_CORES + 1)) -P $NIX_BUILD_CORES \
$out/bin/emacs --batch -l comp --eval "(while argv \
(comp-trampoline-compile (intern (pop argv))))"
mkdir -p $out/share/emacs/native-lisp
$out/bin/emacs --batch \
--eval "(add-to-list 'comp-eln-load-path \"$out/share/emacs/native-lisp\")" \

View File

@ -149,7 +149,19 @@ checkout_hash(){
fi
clean_git fetch -t ${builder:+--progress} origin || return 1
clean_git checkout -b "$branchName" "$hash" || return 1
local object_type=$(git cat-file -t "$hash")
if [[ "$object_type" == "commit" ]]; then
clean_git checkout -b "$branchName" "$hash" || return 1
elif [[ "$object_type" == "tree" ]]; then
clean_git config user.email "nix-prefetch-git@localhost"
clean_git config user.name "nix-prefetch-git"
local commit_id=$(git commit-tree "$hash" -m "Commit created from tree hash $hash")
clean_git checkout -b "$branchName" "$commit_id" || return 1
else
echo "Unrecognized git object type: $object_type"
return 1
fi
}
# Fetch only a branch/tag and checkout it.

View File

@ -1,4 +1,5 @@
{ buildGoModule
{ stdenv
, buildGoModule
, fetchFromGitHub
, lib
}:
@ -15,6 +16,15 @@ buildGoModule rec {
vendorSha256 = "sha256-x2fk2QmZDK2yjyfYdK7x+sQjvt7tuggmm8ieVjsNKek=";
preBuild = ''
# https://github.com/burrowers/garble/issues/184
substituteInPlace testdata/scripts/tiny.txt \
--replace "{6,8}" "{4,8}"
'' + lib.optionalString (!stdenv.isx86_64) ''
# The test assumex amd64 assembly
rm testdata/scripts/asm.txt
'';
meta = {
description = "Obfuscate Go code by wrapping the Go toolchain";
homepage = "https://github.com/burrowers/garble/";

View File

@ -1,4 +1,5 @@
{ stdenv
{ lib
, stdenv
, fetchurl
, python-setup-hook
, self
@ -31,9 +32,15 @@ let
implementation = "pypy";
libPrefix = "pypy${pythonVersion}";
executable = "pypy${if isPy3k then "3" else ""}";
pythonForBuild = self; # Not possible to cross-compile with.
sitePackages = "site-packages";
hasDistutilsCxxPatch = false;
# Not possible to cross-compile with.
pythonOnBuildForBuild = throw "${pname} does not support cross compilation";
pythonOnBuildForHost = self;
pythonOnBuildForTarget = throw "${pname} does not support cross compilation";
pythonOnHostForHost = throw "${pname} does not support cross compilation";
pythonOnTargetForTarget = throw "${pname} does not support cross compilation";
};
pname = "${passthru.executable}_prebuilt";
version = with sourceVersion; "${major}.${minor}.${patch}";

View File

@ -4,12 +4,9 @@
, fetchPypi
, python
, buildPythonPackage
, isPy27
, isPy3k
, numpy
, llvmlite
, funcsigs
, singledispatch
, setuptools
, libcxx
}:
@ -26,9 +23,8 @@ buildPythonPackage rec {
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
propagatedBuildInputs = [numpy llvmlite]
++ lib.optionals isPy27 [ funcsigs singledispatch];
propagatedBuildInputs = [ numpy llvmlite setuptools ];
pythonImportsCheck = [ "numba" ];
# Copy test script into $out and run the test suite.
checkPhase = ''
${python.interpreter} -m numba.runtests

View File

@ -2,11 +2,11 @@
buildPythonPackage rec {
pname = "numpy-stl";
version = "2.13.0";
version = "2.15.1";
src = fetchPypi {
inherit pname version;
sha256 = "648386e6cdad3218adc4e3e6a349bee41c55a61980dace616c05d6a31e8c652d";
sha256 = "f57fdb3c0e420f729dbe54ec3add9bdbbd19b62183aa8f4576e00e5834b2ef52";
};
checkInputs = [ pytest pytestrunner ];

View File

@ -1,34 +1,50 @@
{ lib, writeText, buildPythonPackage, fetchPypi, libpcap, dpkt }:
{ lib
, buildPythonPackage
, dpkt
, fetchFromGitHub
, fetchpatch
, libpcap
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pypcap";
version = "1.2.3";
src = fetchPypi {
inherit pname version;
sha256 = "1w5i79gh7cswvznr8rhilcmzhnh2y5c4jwh2qrfnpx05zqigm1xd";
src = fetchFromGitHub {
owner = "pynetwork";
repo = pname;
rev = "v${version}";
sha256 = "1zscfk10jpqwxgc8d84y8bffiwr92qrg2b24afhjwiyr352l67cf";
};
patches = [
# The default setup.py searchs for pcap.h in a static list of default
# folders. So we have to add the path to libpcap in the nix-store.
(writeText "libpcap-path.patch"
''
--- a/setup.py
+++ b/setup.py
@@ -28,6 +28,7 @@ def recursive_search(path, target_files):
def find_prefix_and_pcap_h():
prefixes = chain.from_iterable((
+ '${libpcap}',
('/usr', sys.prefix),
glob.glob('/opt/libpcap*'),
glob.glob('../libpcap*'),
'')
# Support for Python 3.9, https://github.com/pynetwork/pypcap/pull/102
(fetchpatch {
name = "support-python-3.9.patch";
url = "https://github.com/pynetwork/pypcap/pull/102/commits/e22f5d25f0d581d19ef337493434e72cd3a6ae71.patch";
sha256 = "0n1syh1vcplgsf6njincpqphd2w030s3b2jyg86d7kbqv1w5wk0l";
})
];
postPatch = ''
# Add the path to libpcap in the nix-store
substituteInPlace setup.py --replace "('/usr', sys.prefix)" "'${libpcap}'"
# Remove coverage from test run
sed -i "/--cov/d" setup.cfg
'';
buildInputs = [ libpcap ];
checkInputs = [ dpkt ];
checkInputs = [
dpkt
pytestCheckHook
];
pytestFlagsArray = [ "tests" ];
pythonImportsCheck = [ "pcap" ];
meta = with lib; {
homepage = "https://github.com/pynetwork/pypcap";

View File

@ -18,11 +18,11 @@ let
in
stdenv.mkDerivation rec {
pname = "keycloak";
version = "12.0.2";
version = "12.0.3";
src = fetchzip {
url = "https://github.com/keycloak/keycloak/releases/download/${version}/keycloak-${version}.zip";
sha256 = "006k6ac00iz61s6hi3wzj6w71mhhv7n00vh82ak4yhwr97jffqbz";
sha256 = "sha256-YUeSX02iLhrGzItnbUbK8ib7IfWG3+2k154cTPAt8Wc=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -15,14 +15,14 @@ with lib;
let
go-d-plugin = callPackage ./go.d.plugin.nix {};
in stdenv.mkDerivation rec {
version = "1.29.1";
version = "1.29.2";
pname = "netdata";
src = fetchFromGitHub {
owner = "netdata";
repo = "netdata";
rev = "v${version}";
sha256 = "sha256-Wmfqxjy0kCy8vsegoe+Jn5Az/XEZxeHZDRMLmOrp+Iw=";
sha256 = "sha256-Y949jHIX3VOwaxeaBqqTZUx66Sd0s27kMCCjcnJORO4=";
};
nativeBuildInputs = [ autoreconfHook pkg-config ];

View File

@ -13797,7 +13797,10 @@ in
ganv = callPackage ../development/libraries/ganv { };
garble = callPackage ../build-support/go/garble.nix { };
garble = callPackage ../build-support/go/garble.nix {
# https://github.com/burrowers/garble/issues/124
buildGoModule = buildGo115Module;
};
gcab = callPackage ../development/libraries/gcab { };