Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2021-10-07 00:05:39 +00:00 committed by GitHub
commit a5ad1bc37f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 198 additions and 37 deletions

View File

@ -82,6 +82,15 @@ in
nix = {
enable = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable Nix.
Disabling Nix makes the system hard to modify and the Nix programs and configuration will not be made available by NixOS itself.
'';
};
package = mkOption {
type = types.package;
default = pkgs.nix;
@ -499,7 +508,7 @@ in
###### implementation
config = {
config = mkIf cfg.enable {
nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ];
nix.binaryCaches = [ "https://cache.nixos.org/" ];

View File

@ -478,6 +478,7 @@ in
wasabibackend = handleTest ./wasabibackend.nix {};
wiki-js = handleTest ./wiki-js.nix {};
wireguard = handleTest ./wireguard {};
without-nix = handleTest ./without-nix.nix {};
wmderland = handleTest ./wmderland.nix {};
wpa_supplicant = handleTest ./wpa_supplicant.nix {};
wordpress = handleTest ./wordpress.nix {};

View File

@ -0,0 +1,23 @@
import ./make-test-python.nix ({ lib, ... }: {
name = "without-nix";
meta = with lib.maintainers; {
maintainers = [ ericson2314 ];
};
nixpkgs.overlays = [
(self: super: {
nix = throw "don't want to use this";
})
];
nodes.machine = { ... }: {
nix.enable = false;
};
testScript = ''
start_all()
machine.succeed("which which")
machine.fail("which nix")
'';
})

View File

@ -2,7 +2,7 @@
, extra-cmake-modules, kdoctools
, qtscript, qtsvg, qtquickcontrols, qtwebengine
, krunner, shared-mime-info, kparts, knewstuff
, gpsd, perl
, gpsd, perl, fetchpatch
}:
mkDerivation {
@ -18,6 +18,15 @@ mkDerivation {
qtscript qtsvg qtquickcontrols qtwebengine shared-mime-info krunner kparts
knewstuff gpsd
];
patches = [
(fetchpatch {
# Backport fix to allow compilation with gpsd 3.23.1
# Remove when marble compiles without the patch.
# See: https://invent.kde.org/education/marble/-/merge_requests/57
url = "https://invent.kde.org/education/marble/-/commit/8aadc3eb8f9484a65d497d442cd8c61fe1462bef.diff";
sha256 = "sha256-ZkPXyunVItSRctv6SLGIonvyZwLDhCz+wfJrIXeHcDo=";
})
];
preConfigure = ''
cmakeFlags+=" -DINCLUDE_INSTALL_DIR=''${!outputDev}/include"
'';

View File

@ -6,8 +6,8 @@ let
srcs = {
foxtrot = fetchbzr {
url = "lp:foxtrotgps";
rev = "329";
sha256 = "0fwgnsrah63h1xdgm5xdi5ancrz89shdp5sdzw1qc1m7i9a03rid";
rev = "331";
sha256 = "sha256-/kJv6a3MzAzzwIl98Mqi7jrUJC1kDvouigf9kGtv868=";
};
screenshots = fetchbzr {
url = "lp:foxtrotgps/screenshots";
@ -17,7 +17,7 @@ let
};
in stdenv.mkDerivation rec {
pname = "foxtrotgps";
version = "1.2.2+329";
version = "1.2.2+331";
# Pull directly from bzr because gpsd API version 9 is not supported on latest release
src = srcs.foxtrot;
@ -39,12 +39,20 @@ in stdenv.mkDerivation rec {
];
postUnpack = ''
cp -R ${srcs.screenshots} $sourceRoot/doc/screenshots
chmod -R u+w $sourceRoot/doc/screenshots
cp -R ${srcs.screenshots} $sourceRoot/doc/screenshots
chmod -R u+w $sourceRoot/doc/screenshots
'';
# Remove when foxtrotgps supports gpsd 3.23.1
# Patch for compatibility with gpsd 3.23.1. This was added for foxtrotgps
# 1.2.2+331. The command can be removed if the build of a newer version
# succeeds without it.
postPatch = ''
substituteInPlace src/gps_functions.c --replace "STATUS_NO_FIX" "STATUS_UNK"
'';
preConfigure = ''
intltoolize --automake --copy --force
intltoolize --automake --copy --force
'';
meta = with lib; {

View File

@ -47,7 +47,7 @@ let
k3sCommit = "3e250fdbab72d88f7e6aae57446023a0567ffc97"; # k3s git commit at the above version
k3sRepoSha256 = "1w7drvk0bmlmqrxh1y6dxjy7dk6bdrl72pkd25lc1ir6wbzb05h9";
traefikChartVersion = "9.18.2"; # taken from ./scripts/download at TRAEFIK_VERSION
traefikChartVersion = "9.18.2"; # taken from ./manifests/traefik.yaml at spec.version
traefikChartSha256 = "sha256-9d7p0ngyMN27u4OPgz7yI14Zj9y36t9o/HMX5wyDpUI=";
k3sRootVersion = "0.9.1"; # taken from ./scripts/download at ROOT_VERSION

View File

@ -10,19 +10,16 @@ cd $(dirname "${BASH_SOURCE[0]}")
LATEST_TAG_RAWFILE=${WORKDIR}/latest_tag.json
curl --silent ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
https://api.github.com/repos/k3s-io/k3s/releases/latest > ${LATEST_TAG_RAWFILE}
LATEST_TAG_NAME=$(jq -r '.tag_name' ${LATEST_TAG_RAWFILE})
https://api.github.com/repos/k3s-io/k3s/releases > ${LATEST_TAG_RAWFILE}
LATEST_TAG_NAME=$(jq 'map(.tag_name)' ${LATEST_TAG_RAWFILE} | grep -v -e rc -e engine | sed 's/["|,| ]//g' | sort -r | head -n1)
K3S_VERSION=$(echo ${LATEST_TAG_NAME} | sed 's/^v//')
LATEST_TAG_TARBALL_URL=$(jq -r '.tarball_url' ${LATEST_TAG_RAWFILE})
K3S_COMMIT=$(curl --silent ${GITHUB_TOKEN:+"-u \":$GITHUB_TOKEN\""} \
https://api.github.com/repos/k3s-io/k3s/tags \
| jq -r "map(select(.name == \"${LATEST_TAG_NAME}\")) | .[0] | .commit.sha")
K3S_REPO_SHA256=$(nix-prefetch-url --quiet --unpack ${LATEST_TAG_TARBALL_URL})
K3S_REPO_SHA256=$(nix-prefetch-url --quiet --unpack https://github.com/k3s-io/k3s/archive/refs/tags/${LATEST_TAG_NAME}.tar.gz)
FILE_SCRIPTS_DOWNLOAD=${WORKDIR}/scripts-download
curl --silent https://raw.githubusercontent.com/k3s-io/k3s/${K3S_COMMIT}/scripts/download > $FILE_SCRIPTS_DOWNLOAD
@ -30,16 +27,19 @@ curl --silent https://raw.githubusercontent.com/k3s-io/k3s/${K3S_COMMIT}/scripts
FILE_SCRIPTS_VERSION=${WORKDIR}/scripts-version.sh
curl --silent https://raw.githubusercontent.com/k3s-io/k3s/${K3S_COMMIT}/scripts/version.sh > $FILE_SCRIPTS_VERSION
TRAEFIK_CHART_VERSION=$(grep TRAEFIK_VERSION= $FILE_SCRIPTS_DOWNLOAD \
| cut -d'=' -f2 | cut -d' ' -f1)
FILE_MANIFESTS_TRAEFIK=${WORKDIR}/manifests-traefik.yaml
curl --silent https://raw.githubusercontent.com/k3s-io/k3s/${K3S_COMMIT}/manifests/traefik.yaml > $FILE_MANIFESTS_TRAEFIK
TRAEFIK_CHART_VERSION=$(awk -F/ '/traefik-([[:digit:]]+\.)/ {sub(/traefik-/, "", $6) ; sub(/\.tgz/, "", $6); print $6}' $FILE_MANIFESTS_TRAEFIK)
TRAEFIK_CHART_SHA256=$(nix-prefetch-url --quiet "https://helm.traefik.io/traefik/traefik-${TRAEFIK_CHART_VERSION}.tgz")
K3S_ROOT_VERSION=$(grep ROOT_VERSION= $FILE_SCRIPTS_DOWNLOAD \
K3S_ROOT_VERSION=$(grep 'ROOT_VERSION=' ${FILE_SCRIPTS_DOWNLOAD} \
| cut -d'=' -f2 | cut -d' ' -f1 | sed 's/^v//')
K3S_ROOT_SHA256=$(nix-prefetch-url --quiet --unpack \
"https://github.com/k3s-io/k3s-root/releases/download/v${K3S_ROOT_VERSION}/k3s-root-amd64.tar")
CNIPLUGINS_VERSION=$(grep VERSION_CNIPLUGINS= $FILE_SCRIPTS_VERSION \
CNIPLUGINS_VERSION=$(grep 'VERSION_CNIPLUGINS=' ${FILE_SCRIPTS_VERSION} \
| cut -d'=' -f2 | cut -d' ' -f1 | sed -e 's/"//g' -e 's/^v//')
CNIPLUGINS_SHA256=$(nix-prefetch-url --quiet --unpack \
"https://github.com/rancher/plugins/archive/refs/tags/v${CNIPLUGINS_VERSION}.tar.gz")

View File

@ -118,7 +118,6 @@ stdenv.mkDerivation rec {
'';
platforms = platforms.all;
hydraPlatforms = platforms.linux;
maintainers = with maintainers; [ peti ] ++ teams.sage.members;
};

View File

@ -15,8 +15,9 @@
"--remap-path-prefix=$NIX_BUILD_TOP=/"
(mkRustcDepArgs dependencies crateRenames)
(mkRustcFeatureArgs crateFeatures)
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"--target" (rust.toRustTargetSpec stdenv.hostPlatform)
] ++ extraRustcOpts
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "--target ${rust.toRustTargetSpec stdenv.hostPlatform} -C linker=${stdenv.hostPlatform.config}-gcc"
# since rustc 1.42 the "proc_macro" crate is part of the default crate prelude
# https://github.com/rust-lang/cargo/commit/4d64eb99a4#diff-7f98585dbf9d30aa100c8318e2c77e79R1021-R1022
++ lib.optional (lib.elem "proc-macro" crateType) "--extern proc_macro"

View File

@ -13,7 +13,7 @@
, crateRenames
, crateVersion
, extraLinkFlags
, extraRustcOpts
, extraRustcOptsForBuildRs
, libName
, libPath
, release
@ -24,7 +24,7 @@ let version_ = lib.splitString "-" crateVersion;
version = lib.splitVersion (lib.head version_);
rustcOpts = lib.foldl' (opts: opt: opts + " " + opt)
(if release then "-C opt-level=3" else "-C debuginfo=2")
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOpts);
(["-C codegen-units=$NIX_BUILD_CORES"] ++ extraRustcOptsForBuildRs);
buildDeps = mkRustcDepArgs buildDependencies crateRenames;
authors = lib.concatStringsSep ":" crateAuthors;
optLevel = if release then 3 else 0;

View File

@ -172,6 +172,11 @@ crate_: lib.makeOverridable
# Example: [ "-Z debuginfo=2" ]
# Default: []
, extraRustcOpts
# A list of extra options to pass to rustc when building a build.rs.
#
# Example: [ "-Z debuginfo=2" ]
# Default: []
, extraRustcOptsForBuildRs
# Whether to enable building tests.
# Use true to enable.
# Default: false
@ -228,6 +233,7 @@ crate_: lib.makeOverridable
nativeBuildInputs_ = nativeBuildInputs;
buildInputs_ = buildInputs;
extraRustcOpts_ = extraRustcOpts;
extraRustcOptsForBuildRs_ = extraRustcOptsForBuildRs;
buildTests_ = buildTests;
# crate2nix has a hack for the old bash based build script that did split
@ -308,12 +314,16 @@ crate_: lib.makeOverridable
lib.optionals (crate ? extraRustcOpts) crate.extraRustcOpts
++ extraRustcOpts_
++ (lib.optional (edition != null) "--edition ${edition}");
extraRustcOptsForBuildRs =
lib.optionals (crate ? extraRustcOptsForBuildRs) crate.extraRustcOptsForBuildRs
++ extraRustcOptsForBuildRs_
++ (lib.optional (edition != null) "--edition ${edition}");
configurePhase = configureCrate {
inherit crateName buildDependencies completeDeps completeBuildDeps crateDescription
crateFeatures crateRenames libName build workspace_member release libPath crateVersion
extraLinkFlags extraRustcOpts
extraLinkFlags extraRustcOptsForBuildRs
crateAuthors crateHomepage verbose colors;
};
buildPhase = buildCrate {
@ -337,6 +347,7 @@ crate_: lib.makeOverridable
release = crate_.release or true;
verbose = crate_.verbose or true;
extraRustcOpts = [ ];
extraRustcOptsForBuildRs = [ ];
features = [ ];
nativeBuildInputs = [ ];
buildInputs = [ ];

View File

@ -0,0 +1,52 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchurl
, pytestCheckHook
, python
}:
let
table = fetchurl {
# See https://github.com/dahlia/iso4217/blob/main/setup.py#L18
url = "http://www.currency-iso.org/dam/downloads/lists/list_one.xml";
sha256 = "0frhicc7s8gqglr41hzx61fic3ckvr4sg773ahp1s28n5by3y7ac";
};
in
buildPythonPackage rec {
pname = "iso4217";
version = "1.6";
src = fetchFromGitHub {
owner = "dahlia";
repo = pname;
rev = version;
sha256 = "0mdpf5a0xr5lrcfgvqi1sdn7ln2w6pkc3lg0laqkbx5mhxky0fla";
};
checkInputs = [
pytestCheckHook
];
preBuild = ''
# The table is already downloaded
export ISO4217_DOWNLOAD=0
# Copy the table file to satifiy the build process
cp -r ${table} $pname/table.xml
'';
postInstall = ''
# Copy the table file
cp -r ${table} $out/${python.sitePackages}/$pname/table.xml
'';
pytestFlagsArray = [ "$pname/test.py" ];
pythonImportsCheck = [ "iso4217" ];
meta = with lib; {
description = "ISO 4217 currency data package for Python";
homepage = "https://github.com/dahlia/iso4217";
license = with licenses; [ publicDomain ];
maintainers = with maintainers; [ fab ];
};
}

View File

@ -8,12 +8,12 @@
buildPythonPackage rec {
pname = "mypy-boto3-s3";
version = "1.18.54";
version = "1.18.55";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "fdbb7ff1687fba8e7ac521502cb2d2ca4b845e1a331f5b4fe55aff7c17e1f985";
sha256 = "45519e811bbd284fc7d69e932abcaa9c551071db4fb6e69502736b81dcc72a7d";
};
propagatedBuildInputs = [

View File

@ -0,0 +1,42 @@
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, iso4217
, pytestCheckHook
, pythonOlder
, pytz
}:
buildPythonPackage rec {
pname = "pyefergy";
version = "0.1.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "tkdrob";
repo = pname;
rev = version;
sha256 = "0nm7dc5q4wvdpqxpirlc4nwm68lf3n2df6j5yy4m8wr294yb7a1k";
};
propagatedBuildInputs = [
aiohttp
iso4217
pytz
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [ "pyefergy" ];
meta = with lib; {
description = "Python API library for Efergy energy meters";
homepage = "https://github.com/tkdrob/pyefergy";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}

View File

@ -11,11 +11,11 @@
buildPythonPackage rec {
pname = "urlextract";
version = "1.3.0";
version = "1.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-yxOuiswFOJnAvxwTT++Zhk8nZWK2f4ePsQpUYI7EYS4=";
sha256 = "669f07192584b841b49ba8868fbd6b00e7ddc28367d36a3d8ca8c8e429420748";
};
propagatedBuildInputs = [

View File

@ -22,7 +22,7 @@ let
doCheck ? true,
requireX ? false,
broken ? false,
hydraPlatforms ? R.meta.hydraPlatforms
hydraPlatforms ? R.meta.platforms
}: buildRPackage {
name = "${name}-${version}";
src = fetchurl {

View File

@ -1,6 +1,7 @@
{ lib, buildPackages, fetchFromGitHub, fetchpatch, perl, buildLinux, ... } @ args:
buildLinux (args // {
# NOTE: bcachefs-tools should be updated simultaneously to preserve compatibility
version = "5.13.0-2021.10.01";
modDirVersion = "5.13.0";

View File

@ -10,13 +10,13 @@
stdenv.mkDerivation rec {
pname = "ser2net";
version = "4.3.3";
version = "4.3.4";
src = fetchFromGitHub {
owner = "cminyard";
repo = pname;
rev = "v${version}";
sha256 = "sha256-p8iQifCf/IXXPdbjB3pgcw8FgkqRLShHSSeTzJ83Ecg=";
sha256 = "sha256-J95WDF6x6nHF+r+97E4WdTkXWF98/lx1OSauZTy1/3Q=";
};
passthru = {

View File

@ -22,20 +22,21 @@
stdenv.mkDerivation {
pname = "bcachefs-tools";
version = "unstable-2021-07-08";
version = "unstable-2021-10-01";
src = fetchFromGitHub {
owner = "koverstreet";
repo = "bcachefs-tools";
rev = "050d5f7bcf08bd02f5077a1c5559f352fa449e1e";
sha256 = "15bl9ni0ckmvs5d7hi6v26z690rrmkb7dx00skn6gwq87ffz3imw";
rev = "37850436dd7dfbe67738749c4d4a2506ffff1ec3";
sha256 = "040vgxrimahmfs9rhlggfwg0bzl7h9j2ksx3563rh63asjwlhnhi";
};
postPatch = ''
substituteInPlace Makefile \
--replace "pytest-3" "pytest --verbose" \
--replace "INITRAMFS_DIR=/etc/initramfs-tools" \
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools"
"INITRAMFS_DIR=${placeholder "out"}/etc/initramfs-tools" \
--replace "doc/macro2rst.py" "python3 doc/macro2rst.py"
'';
nativeBuildInputs = [ pkg-config docutils ];

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "vsh";
version = "0.12.0";
version = "0.12.1";
src = fetchFromGitHub {
owner = "fishi0x01";
repo = "vsh";
rev = "v${version}";
sha256 = "059zzsg94287sxlk5clz6in7jscqaq530c84xqgy537f6cq3vr2p";
sha256 = "0skd16j969mb2kgq503wskaw8clyhkw135ny2nsqv5j2zjpr71ap";
};
# vendor directory is part of repository

View File

@ -3767,6 +3767,8 @@ in {
iso-639 = callPackage ../development/python-modules/iso-639 { };
iso4217 = callPackage ../development/python-modules/iso4217 { };
iso8601 = callPackage ../development/python-modules/iso8601 { };
isodate = callPackage ../development/python-modules/isodate { };
@ -6200,6 +6202,8 @@ in {
pyee = callPackage ../development/python-modules/pyee { };
pyefergy = callPackage ../development/python-modules/pyefergy { };
pyeight = callPackage ../development/python-modules/pyeight { };
pyelftools = callPackage ../development/python-modules/pyelftools { };