Merge staging-next into staging

This commit is contained in:
Frederik Rietdijk 2019-07-26 14:45:31 +02:00
commit 0f6bda38fe
38 changed files with 460 additions and 168 deletions

View file

@ -53,12 +53,16 @@ rec {
# Filter sources by a list of regular expressions.
#
# E.g. `src = sourceByRegex ./my-subproject [".*\.py$" "^database.sql$"]`
sourceByRegex = src: regexes: cleanSourceWith {
filter = (path: type:
let relPath = lib.removePrefix (toString src + "/") (toString path);
in lib.any (re: builtins.match re relPath != null) regexes);
inherit src;
};
sourceByRegex = src: regexes:
let
isFiltered = src ? _isLibCleanSourceWith;
origSrc = if isFiltered then src.origSrc else src;
in lib.cleanSourceWith {
filter = (path: type:
let relPath = lib.removePrefix (toString origSrc + "/") (toString path);
in lib.any (re: builtins.match re relPath != null) regexes);
inherit src;
};
# Get all files ending with the specified suffices from the given
# directory or its descendants. E.g. `sourceFilesBySuffices ./dir

View file

@ -95,7 +95,7 @@ in {
# forward all Matrix API calls to the synapse Matrix homeserver
locations."/_matrix" = {
proxyPass = "http://[::1]:8008/_matrix";
proxyPass = "http://[::1]:8008"; # without a trailing /
};
};
};

View file

@ -1,6 +1,6 @@
{ stdenv, substituteAll, fetchFromGitHub, python3Packages, glfw, libunistring,
harfbuzz, fontconfig, pkgconfig, ncurses, imagemagick, xsel,
libstartup_notification, libX11, libXrandr, libXinerama, libXcursor,
libstartup_notification, libGL, libX11, libXrandr, libXinerama, libXcursor,
libxkbcommon, libXi, libXext, wayland-protocols, wayland,
which, dbus,
Cocoa,
@ -57,6 +57,8 @@ buildPythonApplication rec {
optipng
];
propagatedBuildInputs = stdenv.lib.optional stdenv.isLinux libGL;
outputs = [ "out" "terminfo" ];
patches = [
@ -70,6 +72,10 @@ buildPythonApplication rec {
./png2icns.patch
];
preConfigure = stdenv.lib.optional (!stdenv.isDarwin) ''
substituteInPlace glfw/egl_context.c --replace "libEGL.so.1" "${stdenv.lib.getLib libGL}/lib/libEGL.so.1"
'';
buildPhase = if stdenv.isDarwin then ''
make app
'' else ''

View file

@ -1,4 +1,8 @@
{ stdenv, bazel, cacert }:
{ stdenv
, bazel
, cacert
, lib
}:
args@{ name, bazelFlags ? [], bazelTarget, buildAttrs, fetchAttrs, ... }:
@ -109,6 +113,31 @@ in stdenv.mkDerivation (fBuildAttrs // {
buildPhase = fBuildAttrs.buildPhase or ''
runHook preBuild
'' + lib.optionalString stdenv.isDarwin ''
# Bazel sandboxes the execution of the tools it invokes, so even though we are
# calling the correct nix wrappers, the values of the environment variables
# the wrappers are expecting will not be set. So instead of relying on the
# wrappers picking them up, pass them in explicitly via `--copt`, `--linkopt`
# and related flags.
#
copts=()
host_copts=()
for flag in $NIX_CFLAGS_COMPILE; do
copts+=( "--copt=$flag" )
host_copts+=( "--host_copt=$flag" )
done
for flag in $NIX_CXXSTDLIB_COMPILE; do
copts+=( "--copt=$flag" )
host_copts+=( "--host_copt=$flag" )
done
linkopts=()
host_linkopts=()
for flag in $NIX_LD_FLAGS; do
linkopts+=( "--linkopt=$flag" )
host_linkopts+=( "--host_linkopt=$flag" )
done
'' + ''
BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \
USER=homeless-shelter \
bazel \
@ -116,6 +145,12 @@ in stdenv.mkDerivation (fBuildAttrs // {
--output_user_root="$bazelUserRoot" \
build \
-j $NIX_BUILD_CORES \
'' + lib.optionalString stdenv.isDarwin ''
"''${copts[@]}" \
"''${host_copts[@]}" \
"''${linkopts[@]}" \
"''${host_linkopts[@]}" \
'' + ''
$bazelFlags \
$bazelTarget

View file

@ -2,6 +2,7 @@
, config
, pkgconfig, python3, gst-plugins-base, orc
, gobject-introspection
, enableZbar ? true
, faacSupport ? false, faac ? null
, faad2, libass, libkate, libmms, librdf, ladspaH
, libnice, webrtc-audio-processing, lilv, lv2, serd, sord, sratom
@ -136,13 +137,13 @@ stdenv.mkDerivation rec {
soundtouch
spandsp
srtp
zbar
fluidsynth libvdpau
libwebp xvidcore gnutls libGLU_combined
libgme openssl x265 libxml2
libintl
srt
]
++ optional enableZbar zbar
++ optional faacSupport faac
++ optional stdenv.isLinux wayland
# wildmidi requires apple's OpenAL
@ -158,6 +159,7 @@ stdenv.mkDerivation rec {
"-Dexamples=disabled" # requires many dependencies and probably not useful for our users
"-Ddts=disabled" # required `libdca` library not packaged in nixpkgs as of writing, and marked as "BIG FAT WARNING: libdca is still in early development"
"-Dzbar=${if enableZbar then "enabled" else "disabled"}"
"-Dfaac=${if faacSupport then "enabled" else "disabled"}"
"-Diqa=disabled" # required `dssim` library not packaging in nixpkgs as of writing
"-Dmsdk=disabled" # not packaged in nixpkgs as of writing / no Windows support

View file

@ -154,17 +154,13 @@ stdenv.mkDerivation rec {
done
'';
# Make all demo related things in dev
postFixup = ''
moveToOutput share/icons/hicolor "$dev"
moveToOutput share/applications "$dev"
moveToOutput share/gsettings-schemas "$dev"
# Wrap demos
postFixup = optionalString (!stdenv.isDarwin) ''
demos=(gtk3-demo gtk3-demo-application gtk3-icon-browser gtk3-widget-factory)
for program in ''${demos[@]}; do
wrapProgram $dev/bin/$program \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$dev/share/gsettings-schemas/${pname}-${version}"
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${pname}-${version}"
done
'';

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, lib, bzip2, cmake, gflags, lz4, snappy, zlib, zstd, enableLite ? false }:
{ stdenv, fetchFromGitHub, lib, bzip2, cmake, lz4, snappy, zlib, zstd, enableLite ? false }:
stdenv.mkDerivation rec {
pname = "rocksdb";
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ cmake ];
buildInputs = [ bzip2 gflags lz4 snappy zlib zstd ];
buildInputs = [ bzip2 lz4 snappy zlib zstd ];
patches = [ ./0001-findzlib.patch ];
@ -27,6 +27,7 @@ stdenv.mkDerivation rec {
"-DWITH_SNAPPY=1"
"-DWITH_ZLIB=1"
"-DWITH_ZSTD=1"
"-DWITH_GFLAGS=0"
(lib.optional
(stdenv.hostPlatform.system == "i686-linux"
|| stdenv.hostPlatform.system == "x86_64-linux")

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, asciidoc }:
{ stdenv, fetchFromGitHub, cmake, asciidoc, enableDrafts ? false }:
stdenv.mkDerivation rec {
name = "zeromq-${version}";
@ -17,6 +17,8 @@ stdenv.mkDerivation rec {
doCheck = false; # fails all the tests (ctest)
cmakeFlags = if enableDrafts then [ "-DENABLE_DRAFTS=ON" ] else null;
meta = with stdenv.lib; {
branch = "4";
homepage = http://www.zeromq.org;

View file

@ -8,7 +8,12 @@ eval "$NIX_LISP_PREHOOK"
NIX_LISP_COMMAND="$1"
shift
[ -z "$NIX_LISP" ] && NIX_LISP="${NIX_LISP_COMMAND##*/}"
if [ -z "$NIX_LISP" ]; then
while [ -h "${NIX_LISP_COMMAND}" ]; do
NIX_LISP_COMMAND="$(readlink -n "${NIX_LISP_COMMAND}")"
done
NIX_LISP="${NIX_LISP_COMMAND##*/}"
fi
export NIX_LISP NIX_LISP_LOAD_FILE NIX_LISP_EXEC_CODE NIX_LISP_COMMAND NIX_LISP_FINAL_PARAMETERS
@ -116,8 +121,10 @@ nix_lisp_build_system(){
eval "$NIX_LISP_PRELAUNCH_HOOK"
[ -z "$NIX_LISP_SKIP_CODE" ] && "$NIX_LISP_COMMAND" $NIX_LISP_EARLY_OPTIONS \
$NIX_LISP_EXEC_CODE "${NIX_LISP_ASDF_LOAD:-"(load \"$NIX_LISP_ASDF/lib/common-lisp/asdf/build/asdf.$NIX_LISP_FASL_TYPE\")"}" \
$NIX_LISP_EXEC_CODE "$NIX_LISP_ASDF_REGISTRY_CODE" \
${NIX_LISP_FINAL_PARAMETERS[*]:+"${NIX_LISP_FINAL_PARAMETERS[@]}"} \
"$@"
if [ -z "$NIX_LISP_SKIP_CODE" ]; then
"$NIX_LISP_COMMAND" $NIX_LISP_EARLY_OPTIONS \
$NIX_LISP_EXEC_CODE "${NIX_LISP_ASDF_LOAD:-"(load \"$NIX_LISP_ASDF/lib/common-lisp/asdf/build/asdf.$NIX_LISP_FASL_TYPE\")"}" \
$NIX_LISP_EXEC_CODE "$NIX_LISP_ASDF_REGISTRY_CODE" \
${NIX_LISP_FINAL_PARAMETERS[*]:+"${NIX_LISP_FINAL_PARAMETERS[@]}"} \
"$@"
fi

View file

@ -0,0 +1,27 @@
{ lib, buildPythonPackage, fetchFromGitHub, humanfriendly, pytest, pytestcov }:
buildPythonPackage rec {
pname = "capturer";
version = "2.4";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-capturer";
rev = version;
sha256 = "07zy264xd0g7pz9sxjqcpwmrck334xcbb7wfss26lmvgdr5nhcb9";
};
propagatedBuildInputs = [ humanfriendly ];
checkPhase = ''
PATH=$PATH:$out/bin pytest .
'';
checkInputs = [ pytest ];
meta = with lib; {
description = "Easily capture stdout/stderr of the current process and subprocesses";
homepage = https://github.com/xolox/python-capturer;
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
};
}

View file

@ -0,0 +1,34 @@
{ lib, buildPythonPackage, fetchFromGitHub, stdenv, isPy3k, fetchpatch, humanfriendly, verboselogs, capturer, pytest, mock, utillinux }:
buildPythonPackage rec {
pname = "coloredlogs";
version = "10.0";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-coloredlogs";
rev = version;
sha256 = "0rdvp4dfvzhx7z7s2jdl3fv7x1hazgpy5gc7bcf05bnbv2iia54a";
};
# patch by risicle
patches = lib.optional (stdenv.isDarwin && isPy3k) (fetchpatch {
name = "darwin-py3-capture-fix.patch";
url = "https://github.com/xolox/python-coloredlogs/pull/74.patch";
sha256 = "0pk7k94iz0gdripw623vzdl4hd83vwhsfzshl8pbvh1n6swi0xx9";
});
checkPhase = ''
PATH=$PATH:$out/bin pytest . -k "not test_plain_text_output_format"
'';
checkInputs = [ pytest mock utillinux ];
propagatedBuildInputs = [ humanfriendly verboselogs capturer ];
meta = with lib; {
description = "Colored stream handler for Python's logging module";
homepage = https://github.com/xolox/python-coloredlogs;
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
};
}

View file

@ -36,7 +36,7 @@ let
bazelTarget = ":install";
fetchAttrs = {
sha256 = "0f2rlzrlazmgjrsin8vq3jfv431cc8sx8lxsr6x4wgd4jx5d1zzy";
sha256 = "141k2caj5hlk31gnqryp6w2mzyz4i5s1rf8f3qr18isxy235k3w6";
};
bazelFlags = [

View file

@ -0,0 +1,31 @@
{ lib, buildPythonPackage, fetchFromGitHub, coloredlogs, property-manager, fasteners, pytest, mock, virtualenv }:
buildPythonPackage rec {
pname = "executor";
version = "21.3";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-executor";
rev = version;
sha256 = "0rc14vjx3d6irfaw0pczzw1pn0xjl7xikv32hc1fvxv2ibnldv5d";
};
propagatedBuildInputs = [ coloredlogs property-manager fasteners ];
checkInputs = [ pytest mock virtualenv ];
# ignore impure tests
checkPhase = ''
pytest . -k "not option and not retry \
and not remote and not ssh \
and not foreach and not local_context"
'';
meta = with lib; {
description = "Programmer friendly subprocess wrapper";
homepage = https://github.com/xolox/python-executor;
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
};
}

View file

@ -3,11 +3,11 @@
buildPythonPackage rec {
pname = "google-api-python-client";
version = "1.7.9";
version = "1.7.10";
src = fetchPypi {
inherit pname version;
sha256 = "1v551xaavqff085gplinnnrz2sk6sikmm7j47gi0wf34hpba1384";
sha256 = "1mlx5dvkh6rjkvkd91flyhrmji2kw9rlr05n8n4wccv2np3sam9f";
};
# No tests included in archive

View file

@ -5,13 +5,17 @@
buildPythonPackage rec {
pname = "jsondiff";
version = "1.1.2";
version = "1.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "7e18138aecaa4a8f3b7ac7525b8466234e6378dd6cae702b982c9ed851d2ae21";
sha256 = "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l";
};
postPatch = ''
sed -e "/'jsondiff=jsondiff.cli:main_deprecated',/d" -i setup.py
'';
# No tests
doCheck = false;
@ -20,5 +24,4 @@ buildPythonPackage rec {
homepage = https://github.com/ZoomerAnalytics/jsondiff;
license = lib.licenses.mit;
};
}
}

View file

@ -0,0 +1,26 @@
{ lib, buildPythonPackage, fetchFromGitHub, cython, mkl, nose, six }:
buildPythonPackage rec {
pname = "mkl-service";
version = "2.1.0";
src = fetchFromGitHub {
owner = "IntelPython";
repo = "mkl-service";
rev = "v${version}";
sha256 = "1bnpgx629rxqf0yhn0jn68ypj3dqv6njc3981j1g8j8rsm5lycrn";
};
MKLROOT = mkl;
checkInputs = [ nose ];
nativeBuildInputs = [ cython ];
propagatedBuildInputs = [ mkl six ];
meta = with lib; {
description = "Python hooks for Intel(R) Math Kernel Library runtime control settings";
homepage = "https://github.com/IntelPython/mkl-service";
license = licenses.bsd3;
maintainers = with maintainers; [ bhipple ];
};
}

View file

@ -0,0 +1,20 @@
{ lib, buildPythonPackage, fetchFromGitHub }:
buildPythonPackage rec {
pname = "naturalsort";
version = "1.5.1";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-naturalsort";
rev = version;
sha256 = "0w43vlddzh97hffnvxp2zkrns9qyirx5g8ijxnxkbx1c4b4gq5ih";
};
meta = with lib; {
description = "Simple natural order sorting API for Python that just works";
homepage = https://github.com/xolox/python-naturalsort;
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
};
}

View file

@ -0,0 +1,23 @@
{ lib, buildPythonPackage, fetchFromGitHub, humanfriendly, verboselogs, coloredlogs, pytest, pytestcov }:
buildPythonPackage rec {
pname = "property-manager";
version = "2.3.1";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-property-manager";
rev = version;
sha256 = "0s4nwipxd8c2vp4rd8mxrj8wbycniz5ki5n177d0dbrnll5amcz0";
};
propagatedBuildInputs = [ coloredlogs humanfriendly verboselogs ];
checkInputs = [ pytest pytestcov ];
meta = with lib; {
description = "Useful property variants for Python programming";
homepage = https://github.com/xolox/python-property-manager;
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
};
}

View file

@ -0,0 +1,22 @@
{ lib, buildPythonPackage, fetchFromGitHub, executor, naturalsort }:
buildPythonPackage rec {
pname = "update-dotdee";
version = "5.0";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-update-dotdee";
rev = version;
sha256 = "1h3m593nwzx6vwa24k0wizb7la49yhqxwn73ipclxgxxi4dfdj01";
};
propagatedBuildInputs = [ executor naturalsort ];
meta = with lib; {
description = "Generic modularized configuration file manager";
homepage = https://github.com/xolox/python-update-dotdee;
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
};
}

View file

@ -0,0 +1,26 @@
{ lib, buildPythonPackage, fetchFromGitHub, pytest, mock }:
buildPythonPackage rec {
pname = "verboselogs";
version = "1.7";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-verboselogs";
rev = version;
sha256 = "10jzm8pkl49as4y2zyiidmfqqj5zmqg3p73jvx4lfxi0gmp1vhl5";
};
# do not run pylint plugin test, as astroid is a old unsupported version
checkPhase = ''
PATH=$PATH:$out/bin pytest . -k "not test_pylint_plugin"
'';
checkInputs = [ pytest mock ];
meta = with lib; {
description = "Verbose logging for Python's logging module";
homepage = https://github.com/xolox/python-verboselogs;
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
};
}

View file

@ -2,7 +2,7 @@
buildBazelPackage rec {
name = "bazel-deps-${version}";
version = "2019-02-01";
version = "2019-07-11";
meta = with stdenv.lib; {
homepage = "https://github.com/johnynek/bazel-deps";
@ -10,13 +10,14 @@ buildBazelPackage rec {
license = licenses.mit;
maintainers = [ maintainers.uri-canva ];
platforms = platforms.all;
broken = true; # global variable '_common_attrs_for_plugin_bootstrapping' is referenced before assignment.
};
src = fetchFromGitHub {
owner = "johnynek";
repo = "bazel-deps";
rev = "6585033409e09028852403ec15ec0c77851234be";
sha256 = "0hypf7mcbpx2djqm92k82vn1k6pbnv564xbnazx8nw60f6ns0x87";
rev = "48fdf7f8bcf3aadfa07f9f7e6f0c9f4247cb0f58";
sha256 = "0wpn5anfgq5wfljfhpn8gbgdmgcp0claffjgqcnv5dh70ch7i0gi";
};
bazelTarget = "//src/scala/com/github/johnynek/bazel_deps:parseproject_deploy.jar";
@ -24,49 +25,7 @@ buildBazelPackage rec {
buildInputs = [ git makeWrapper ];
fetchAttrs = {
preInstall = ''
# Remove all built in external workspaces, Bazel will recreate them when building
rm -rf $bazelOut/external/{bazel_tools,\@bazel_tools.marker,embedded_jdk,\@embedded_jdk.marker,local_*,\@local_*}
# For each external workspace, remove all files that aren't referenced by Bazel
# Many of these files are non-hermetic (for example .git/refs/remotes/origin/HEAD)
files_to_delete=()
for workspace in $(find $bazelOut/external -maxdepth 2 -name "WORKSPACE" -print0 | xargs -0L1 dirname); do
workspaceOut="$NIX_BUILD_TOP/workspaces/$(basename workspace)/output"
workspaceUserRoot="$NIX_BUILD_TOP/workspaces/$(basename workspace)/tmp"
rm -rf $workspace/.git
if ! targets_and_files=$(cd "$workspace" && bazel --output_base="$workspaceOut" --output_user_root="$workspaceUserRoot" query '//...:*' 2> /dev/null | sort -u); then
continue
fi
if ! targets=$(cd "$workspace" && bazel --output_base="$workspaceOut" --output_user_root="$workspaceUserRoot" query '//...:all' 2> /dev/null | sort -u); then
continue
fi
mapfile -t referenced_files < <(comm -23 <(printf '%s' "$targets_and_files") <(printf '%s' "$targets") | sed -e 's,^//:,,g' | sed -e 's,^//,,g' | sed -e 's,:,/,g')
referenced_files+=( "WORKSPACE" )
for referenced_file in "''${referenced_files[@]}"; do
# Some of the referenced files are symlinks to non-referenced files.
# The symlink targets have deterministic contents, but non-deterministic
# paths. Copy them to the referenced path, which is deterministic.
if target=$(readlink "$workspace/$referenced_file"); then
rm "$workspace/$referenced_file"
cp -a "$target" "$workspace/$referenced_file"
fi
done
mapfile -t workspace_files_to_delete < <(find "$workspace" -type f -or -type l | sort -u | comm -23 - <(printf "$workspace/%s\n" "''${referenced_files[@]}" | sort -u))
for workspace_file_to_delete in "''${workspace_files_to_delete[@]}"; do
files_to_delete+=("$workspace_file_to_delete")
done
# We're running bazel in many different workspaces in a loop. Letting the
# daemon shut down on its own would leave several daemons alive at the
# same time, using up a lot of memory. Shut them down explicitly instead.
bazel --output_base="$workspaceOut" --output_user_root="$workspaceUserRoot" shutdown 2> /dev/null
done
for file_to_delete in "''${files_to_delete[@]}"; do
rm "$file_to_delete"
done
find . -type d -empty -delete
'';
sha256 = "1yirrzhhrsmbgd27fg709plhrhyi8pzwqv84yg72sd3799kswh9m";
sha256 = "1r5qxsbw2cgww7vcg5psh7404l3jcxpvc0ndgl3k8vj1x8y93nkf";
};
buildAttrs = {

View file

@ -76,5 +76,6 @@ buildBazelPackage rec {
license = licenses.asl20;
maintainers = [ maintainers.uri-canva ];
platforms = platforms.darwin;
broken = true; # global variable '_layer' is referenced before assignment.
};
}

View file

@ -1,4 +1,5 @@
{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub, runCommand, runCommandCC, makeWrapper
{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub
, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs
# this package (through the fixpoint glass)
, bazel
, lr, xe, zip, unzip, bash, writeCBin, coreutils
@ -11,6 +12,8 @@
, buildJdk, runJdk
, buildJdkName
, runtimeShell
# Downstream packages for tests
, bazel-watcher
# Always assume all markers valid (don't redownload dependencies).
# Also, don't clean up environment variables.
, enableNixHacks ? false
@ -221,10 +224,22 @@ stdenv.mkDerivation rec {
pythonBinPath = callPackage ./python-bin-path-test.nix { inherit runLocal bazelTest; };
bashToolsWithNixHacks = callPackage ./bash-tools-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; };
cppWithNixHacks = callPackage ./cpp-test.nix { inherit runLocal bazelTest bazel-examples; bazel = bazelWithNixHacks; };
javaWithNixHacks = callPackage ./java-test.nix { inherit runLocal bazelTest bazel-examples; bazel = bazelWithNixHacks; };
protobufWithNixHacks = callPackage ./protobuf-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; };
pythonBinPathWithNixHacks = callPackage ./python-bin-path-test.nix { inherit runLocal bazelTest; bazel = bazelWithNixHacks; };
# downstream packages using buildBazelPackage
# fixed-output hashes of the fetch phase need to be spot-checked manually
downstream = recurseIntoAttrs ({
inherit bazel-watcher;
}
# dm-sonnet is only packaged for linux
// (lib.optionalAttrs stdenv.isLinux {
# TODO(timokau) dm-sonnet is broken currently
# dm-sonnet-linux = python3.pkgs.dm-sonnet;
}));
};
# update the list of workspace dependencies

View file

@ -37,13 +37,7 @@ let newPython = python3.override {
sha256 = "c0abe3218b86533cca287e7057a37481883c07acef7814b70583406938214cc8";
};
});
pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec {
version = "3.13";
src = oldAttrs.src.override {
inherit version;
sha256 = "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf";
};
});
pyyaml = super.pyyaml_3;
};
};

View file

@ -46,7 +46,9 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
++ lib.optional udevSupport pkgs.udev
++ lib.optional vulkanSupport pkgs.vulkan-loader
++ lib.optional sdlSupport pkgs.SDL2
++ lib.optionals gstreamerSupport (with pkgs.gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav ])
++ lib.optionals gstreamerSupport (with pkgs.gst_all_1;
[ gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly gst-libav
(gst-plugins-bad.override { enableZbar = false; }) ])
++ lib.optionals gtkSupport [ pkgs.gtk3 pkgs.glib ]
++ lib.optionals openclSupport [ pkgs.opencl-headers pkgs.ocl-icd ]
++ lib.optionals xmlSupport [ pkgs.libxml2 pkgs.libxslt ]

View file

@ -1,4 +1,5 @@
{ fetchgit
, fetchFromGitHub
, lib
, pkgs
, reattach-to-user-namespace
@ -90,6 +91,15 @@ in rec {
};
};
ctrlw = mkDerivation {
pluginName = "ctrlw";
src = fetchgit {
url = "https://github.com/eraserhd/tmux-ctrlw";
rev = "2354b5d56828813d0f7a4b228ca74b6134c2695f";
sha256 = "00hy1axmki8h2285mivsj923z327xkq89wfl2x4dxc71xjhdl216";
};
};
fpp = mkDerivation {
pluginName = "fpp";
src = fetchgit {
@ -215,6 +225,16 @@ in rec {
};
};
tmux-colors-solarized = mkDerivation {
pluginName = "tmuxcolors";
src = fetchFromGitHub {
owner = "seebi";
repo = "tmux-colors-solarized";
rev = "e5e7b4f1af37f8f3fc81ca17eadee5ae5d82cd09";
sha256 = "1l3i82abzi4b395cgdsjg7lcfaq15kyyhijwvrgchzxi95z3hl4x";
};
};
urlview = mkDerivation {
pluginName = "urlview";
src = fetchgit {

View file

@ -8,20 +8,21 @@ Signed-off-by: Austin Seipp <aseipp@pobox.com>
checksec.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/checksec.sh b/checksec.sh
diff --git a/checksec b/checksec
index dd1f72e..63acc29 100644
--- a/checksec.sh
+++ b/checksec.sh
@@ -337,7 +337,8 @@ kernelcheck() {
printf " userspace processes, this option lists the status of kernel configuration\n"
printf " options that harden the kernel itself against attack.\n\n"
printf " Kernel config: "
-
--- a/checksec
+++ b/checksec
@@ -676,7 +676,8 @@ kernelcheck() {
echo_message " userspace processes, this option lists the status of kernel configuration\n" '' '' ''
echo_message " options that harden the kernel itself against attack.\n\n" '' '' ''
echo_message " Kernel config:\n" '' '' '{ "kernel": '
-
+
+ modprobe configs 2> /dev/null
if [ -f /proc/config.gz ] ; then
kconfig="zcat /proc/config.gz"
printf "\033[32m/proc/config.gz\033[m\n\n"
if [[ ! "${1}" == "" ]] ; then
kconfig="cat ${1}"
echo_message " Warning: The config ${1} on disk may not represent running kernel config!\n\n" "${1}" "<kernel config=\"${1}\"" "{ \"KernelConfig\":\"${1}\","
# update the architecture based on the config rather than the system
--
1.8.3.2

View file

@ -1,43 +1,39 @@
{ stdenv, fetchurl, file, findutils, binutils-unwrapped, glibc, coreutils, sysctl }:
{ stdenv, fetchFromGitHub, makeWrapper, file, findutils
, binutils-unwrapped, glibc, coreutils, sysctl, openssl
}:
stdenv.mkDerivation rec {
name = "checksec-${version}";
version = "1.5";
pname = "checksec";
version = "2.0.1";
src = fetchurl {
url = "https://www.trapkit.de/tools/checksec.sh";
sha256 = "0iq9v568mk7g7ksa1939g5f5sx7ffq8s8n2ncvphvlckjgysgf3p";
src = fetchFromGitHub {
owner = "slimm609";
repo = "checksec.sh";
rev = version;
sha256 = "04lzwm24d576h425rgvgjj2wim29i3961jrj35r43wrswmrsc3r2";
};
patches = [ ./0001-attempt-to-modprobe-config-before-checking-kernel.patch ];
nativeBuildInputs = [ makeWrapper ];
unpackPhase = ''
mkdir ${name}
cp $src ${name}/checksec.sh
cd ${name}
'';
installPhase = ''
installPhase = let
path = stdenv.lib.makeBinPath [
findutils file binutils-unwrapped sysctl openssl
];
in ''
mkdir -p $out/bin
cp checksec.sh $out/bin/checksec
chmod +x $out/bin/checksec
substituteInPlace $out/bin/checksec --replace /bin/bash ${stdenv.shell}
install checksec $out/bin
substituteInPlace $out/bin/checksec --replace /lib/libc.so.6 ${glibc.out}/lib/libc.so.6
substituteInPlace $out/bin/checksec --replace find ${findutils}/bin/find
substituteInPlace $out/bin/checksec --replace "file $" "${file}/bin/file $"
substituteInPlace $out/bin/checksec --replace "xargs file" "xargs ${file}/bin/file"
substituteInPlace $out/bin/checksec --replace " readelf -" " ${binutils-unwrapped}/bin/readelf -"
substituteInPlace $out/bin/checksec --replace "(readelf -" "(${binutils-unwrapped}/bin/readelf -"
substituteInPlace $out/bin/checksec --replace "command_exists readelf" "command_exists ${binutils-unwrapped}/bin/readelf"
substituteInPlace $out/bin/checksec --replace "/sbin/sysctl -" "${sysctl}/bin/sysctl -"
substituteInPlace $out/bin/checksec --replace "/usr/bin/id -" "${coreutils}/bin/id -"
wrapProgram $out/bin/checksec \
--prefix PATH : ${path}
'';
meta = {
meta = with stdenv.lib; {
description = "A tool for checking security bits on executables";
homepage = "http://www.trapkit.de/tools/checksec.html";
license = stdenv.lib.licenses.bsd3;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
license = licenses.bsd3;
platforms = platforms.linux;
maintainers = with maintainers; [ thoughtpolice globin ];
};
}

View file

@ -38,15 +38,6 @@ let
sha256 = "0f390693f46173d8ffb95669acbb0e2a3ec54ecce676703510ad47f1a6d9dc83";
};
});
pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec {
version = "5.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95";
};
});
};
};

View file

@ -36,8 +36,6 @@ let
"03f38115dccb266dd96538f94067442a877932c2322661bdc5bf2502c76658af")
(mkOverride "python-slugify" "3.0.2"
"57163ffb345c7e26063435a27add1feae67fa821f1ef4b2f292c25847575d758")
(mkOverride "pyyaml" "3.13"
"3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf")
(mkOverride "requests" "2.21.0"
"502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e")
(mkOverride "ruamel_yaml" "0.15.94"
@ -63,6 +61,10 @@ let
};
})
(self: super: {
pyyaml = super.pyyaml_3;
})
# hass-frontend does not exist in python3.pkgs
(self: super: {
hass-frontend = self.callPackage ./frontend.nix { };
@ -78,7 +80,7 @@ let
};
});
};
py = python3.override {
# Put packageOverrides at the start so they are applied after defaultOverrides
packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([ packageOverrides ] ++ defaultOverrides);

View file

@ -3,13 +3,6 @@
let
python = python3.override {
packageOverrides = self: super: {
pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec {
version = "5.1";
src = oldAttrs.src.override {
inherit version;
sha256 = "436bc774ecf7c103814098159fbb84c2715d25980175292c648f2da143909f95";
};
});
tornado = super.tornado.overridePythonAttrs (oldAttrs: rec {
version = "5.1.1";
src = oldAttrs.src.override {

View file

@ -22,18 +22,7 @@ let
sha256 = "48eb22f4f8461b1df5734a074b57042430fb06e1d61bd1e11b078c0fe6d7a1f1";
};
});
pyyaml = super.pyyaml.overridePythonAttrs (oldAttrs: rec {
version = "3.13";
src = oldAttrs.src.override {
inherit version;
sha256 = "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf";
};
# https://github.com/yaml/pyyaml/issues/298#issuecomment-511990948
patches = lib.singleton (fetchpatch {
url = "https://github.com/yaml/pyyaml/commit/c5b135fe39d41cffbdc006f28ccb2032df6005e0.patch";
sha256 = "0x1v45rkmj194c41d1nqi3ihj9z4rsy8zvpfcd8p960g1fia7fhn";
});
});
pyyaml = super.pyyaml_3;
};
};

View file

@ -26,11 +26,6 @@ stdenv.mkDerivation {
./CVE-2016-9844.patch
./CVE-2018-18384.patch
./dont-hardcode-cc.patch
(fetchurl {
url = "https://github.com/madler/unzip/commit/47b3ceae397d21bf822bc2ac73052a4b1daf8e1c.patch";
name = "CVE-2019-13232.patch";
sha256 = "0iy2wcjyvzwrjk02iszwcpg85fkjxs1bvb9isvdiywszav4yjs32";
})
] ++ stdenv.lib.optional enableNLS
(fetchurl {
url = "http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-arch/unzip/files/unzip-6.0-natspec.patch?revision=1.1";

View file

@ -0,0 +1,23 @@
{ lib, buildPythonPackage, fetchFromGitHub, update-dotdee, simpleeval, dateutil }:
buildPythonPackage rec {
pname = "rotate-backups";
version = "6.0";
src = fetchFromGitHub {
owner = "xolox";
repo = "python-rotate-backups";
rev = version;
sha256 = "0i59qfv1cfm0ss63ab2nrkn5wr4rxpqqmvfd7pf9c3pl9dbfq20c";
};
propagatedBuildInputs = [ update-dotdee simpleeval dateutil ];
meta = with lib; {
description = "Simple command line interface for backup rotation";
homepage = https://github.com/xolox/python-rotate-backups;
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];
};
}

View file

@ -24,7 +24,7 @@ stdenv.mkDerivation {
sourceRoot = ".";
nativeBuildInputs = [ patchelfUnstable ];
nativeBuildInputs = optionals stdenv.isLinux [ patchelfUnstable ];
unpackPhase = "cp $src ngrok";
@ -32,10 +32,10 @@ stdenv.mkDerivation {
installPhase = ''
install -D ngrok $out/bin/ngrok
'' + optionalString stdenv.isLinux ''
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/bin/ngrok
'';
'';
passthru.updateScript = ./update.sh;

View file

@ -1312,6 +1312,8 @@ in
clprover = callPackage ../applications/science/logic/clprover/clprover.nix { };
coloredlogs = with python3Packages; toPythonApplication coloredlogs;
colord-kde = libsForQt5.callPackage ../tools/misc/colord-kde {};
colpack = callPackage ../applications/science/math/colpack { };
@ -2871,6 +2873,8 @@ in
execline = skawarePackages.execline;
executor = with python3Packages; toPythonApplication executor;
exif = callPackage ../tools/graphics/exif { };
exiftags = callPackage ../tools/graphics/exiftags { };
@ -3741,6 +3745,8 @@ in
hubicfuse = callPackage ../tools/filesystems/hubicfuse { };
humanfriendly = with python3Packages; toPythonApplication humanfriendly;
hwinfo = callPackage ../tools/system/hwinfo { };
hybridreverb2 = callPackage ../applications/audio/hybridreverb2 { };
@ -5124,6 +5130,8 @@ in
oppai-ng = callPackage ../tools/misc/oppai-ng { };
update-dotdee = with python3Packages; toPythonApplication update-dotdee;
update-resolv-conf = callPackage ../tools/networking/openvpn/update-resolv-conf.nix { };
opae = callPackage ../development/libraries/opae { };
@ -13160,6 +13168,8 @@ in
rocksdb_lite = rocksdb.override { enableLite = true; };
rotate-backups = with python3Packages; toPythonApplication rotate-backups;
rote = callPackage ../development/libraries/rote { };
ronn = callPackage ../development/tools/ronn { };

View file

@ -434,7 +434,10 @@ let
};
stripDebugList = [ "share" ];
packageRequires = [ emacs ];
nativeBuildInputs = [ external.autoconf external.automake external.pkgconfig external.libtool external.zeromq ];
nativeBuildInputs = [
external.autoconf external.automake external.pkgconfig external.libtool
(external.zeromq.override { enableDrafts = true; })
];
preBuild = ''
make
'';

View file

@ -684,10 +684,12 @@ in {
maxminddb = callPackage ../development/python-modules/maxminddb { };
monty = callPackage ../development/python-modules/monty { };
mininet-python = (toPythonModule (pkgs.mininet.override{ inherit python; })).py;
mkl-service = callPackage ../development/python-modules/mkl-service { };
monty = callPackage ../development/python-modules/monty { };
mpi4py = callPackage ../development/python-modules/mpi4py {
mpi = pkgs.openmpi;
};
@ -1473,6 +1475,8 @@ in {
capstone = callPackage ../development/python-modules/capstone { };
capturer = callPackage ../development/python-modules/capturer { };
cement = callPackage ../development/python-modules/cement {};
cgen = callPackage ../development/python-modules/cgen { };
@ -1497,6 +1501,8 @@ in {
colorcet = callPackage ../development/python-modules/colorcet { };
coloredlogs = callPackage ../development/python-modules/coloredlogs { };
colorclass = callPackage ../development/python-modules/colorclass {};
colorlog = callPackage ../development/python-modules/colorlog { };
@ -2186,6 +2192,8 @@ in {
execnet = callPackage ../development/python-modules/execnet { };
executor = callPackage ../development/python-modules/executor { };
ezdxf = callPackage ../development/python-modules/ezdxf {};
facebook-sdk = callPackage ../development/python-modules/facebook-sdk { };
@ -2460,6 +2468,8 @@ in {
natsort = callPackage ../development/python-modules/natsort { };
naturalsort = callPackage ../development/python-modules/naturalsort { };
ncclient = callPackage ../development/python-modules/ncclient {};
logfury = callPackage ../development/python-modules/logfury { };
@ -2677,6 +2687,8 @@ in {
roman = callPackage ../development/python-modules/roman { };
rotate-backups = callPackage ../tools/backup/rotate-backups { };
librosa = callPackage ../development/python-modules/librosa { };
samplerate = callPackage ../development/python-modules/samplerate { };
@ -4109,6 +4121,8 @@ in {
prettytable = callPackage ../development/python-modules/prettytable { };
property-manager = callPackage ../development/python-modules/property-manager { };
prompt_toolkit = let
filename = if isPy3k then ../development/python-modules/prompt_toolkit else ../development/python-modules/prompt_toolkit/1.nix;
in callPackage filename { };
@ -4440,6 +4454,21 @@ in {
pyyaml = callPackage ../development/python-modules/pyyaml { };
pyyaml_3 = (callPackage ../development/python-modules/pyyaml { }).overridePythonAttrs (oldAttrs: rec {
version = "3.13";
src = oldAttrs.src.override {
inherit version;
sha256 = "3ef3092145e9b70e3ddd2c7ad59bdd0252a94dfe3949721633e41344de00a6bf";
};
# https://github.com/yaml/pyyaml/issues/298#issuecomment-511990948
patches = singleton (pkgs.fetchpatch {
url = "https://github.com/yaml/pyyaml/commit/c5b135fe39d41cffbdc006f28ccb2032df6005e0.patch";
sha256 = "0x1v45rkmj194c41d1nqi3ihj9z4rsy8zvpfcd8p960g1fia7fhn";
});
# https://github.com/yaml/pyyaml/issues/298#issuecomment-511990948
doCheck = false;
});
rabbitpy = callPackage ../development/python-modules/rabbitpy { };
rasterio = callPackage ../development/python-modules/rasterio {
@ -4833,6 +4862,8 @@ in {
update-copyright = callPackage ../development/python-modules/update-copyright {};
update-dotdee = callPackage ../development/python-modules/update-dotdee { };
uritemplate = callPackage ../development/python-modules/uritemplate { };
uproot = callPackage ../development/python-modules/uproot {};
@ -4845,6 +4876,8 @@ in {
user-agents = callPackage ../development/python-modules/user-agents { };
verboselogs = callPackage ../development/python-modules/verboselogs { };
vega_datasets = callPackage ../development/python-modules/vega_datasets { };
virtkey = callPackage ../development/python-modules/virtkey {