diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-02-20 12:19:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-20 12:19:39 +0000 |
commit | 5884dca2b9d7bc0c505d01e61c270d626f1eb31c (patch) | |
tree | 32b0305637009dbdf768841dc7faaa92ca82b911 | |
parent | 92087cb1701d40d2cd3e167f7fa42fab6fbcd9cc (diff) | |
parent | e59a33db58feb4d4c0c58cee6d859a85324110dc (diff) | |
download | nixpkgs-5884dca2b9d7bc0c505d01e61c270d626f1eb31c.tar nixpkgs-5884dca2b9d7bc0c505d01e61c270d626f1eb31c.tar.gz nixpkgs-5884dca2b9d7bc0c505d01e61c270d626f1eb31c.tar.bz2 nixpkgs-5884dca2b9d7bc0c505d01e61c270d626f1eb31c.tar.lz nixpkgs-5884dca2b9d7bc0c505d01e61c270d626f1eb31c.tar.xz nixpkgs-5884dca2b9d7bc0c505d01e61c270d626f1eb31c.tar.zst nixpkgs-5884dca2b9d7bc0c505d01e61c270d626f1eb31c.zip |
Merge master into staging-next
-rw-r--r-- | pkgs/applications/editors/emacs/generic.nix | 12 | ||||
-rwxr-xr-x | pkgs/build-support/fetchgit/nix-prefetch-git | 14 | ||||
-rw-r--r-- | pkgs/build-support/go/garble.nix | 12 | ||||
-rw-r--r-- | pkgs/development/interpreters/python/pypy/prebuilt.nix | 11 | ||||
-rw-r--r-- | pkgs/development/python-modules/numba/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/python-modules/numpy-stl/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/python-modules/pypcap/default.nix | 56 | ||||
-rw-r--r-- | pkgs/servers/keycloak/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/system/netdata/default.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 5 |
10 files changed, 90 insertions, 42 deletions
diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index 619bde59874..70e253dd6df 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -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\")" \ diff --git a/pkgs/build-support/fetchgit/nix-prefetch-git b/pkgs/build-support/fetchgit/nix-prefetch-git index a2dad2f698c..f2df9d9a869 100755 --- a/pkgs/build-support/fetchgit/nix-prefetch-git +++ b/pkgs/build-support/fetchgit/nix-prefetch-git @@ -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. diff --git a/pkgs/build-support/go/garble.nix b/pkgs/build-support/go/garble.nix index 27277d1b992..da1e3152ba4 100644 --- a/pkgs/build-support/go/garble.nix +++ b/pkgs/build-support/go/garble.nix @@ -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/"; diff --git a/pkgs/development/interpreters/python/pypy/prebuilt.nix b/pkgs/development/interpreters/python/pypy/prebuilt.nix index f301fd15f09..460af1cc67b 100644 --- a/pkgs/development/interpreters/python/pypy/prebuilt.nix +++ b/pkgs/development/interpreters/python/pypy/prebuilt.nix @@ -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}"; diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index aa08ead2d97..3f67c044dea 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -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 diff --git a/pkgs/development/python-modules/numpy-stl/default.nix b/pkgs/development/python-modules/numpy-stl/default.nix index cb43084556e..2176b5f9497 100644 --- a/pkgs/development/python-modules/numpy-stl/default.nix +++ b/pkgs/development/python-modules/numpy-stl/default.nix @@ -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 ]; diff --git a/pkgs/development/python-modules/pypcap/default.nix b/pkgs/development/python-modules/pypcap/default.nix index 08c90d82898..fbf6769ab4c 100644 --- a/pkgs/development/python-modules/pypcap/default.nix +++ b/pkgs/development/python-modules/pypcap/default.nix @@ -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"; diff --git a/pkgs/servers/keycloak/default.nix b/pkgs/servers/keycloak/default.nix index 468904b3f0d..aaa2a2f2b5c 100644 --- a/pkgs/servers/keycloak/default.nix +++ b/pkgs/servers/keycloak/default.nix @@ -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 ]; diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index e727734be6d..6fd15d3d20d 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -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 ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d77b084f777..d3424ad3930 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; |