Merge remote-tracking branch 'upstream/staging-next' into staging
This commit is contained in:
@@ -1,36 +1,60 @@
|
||||
{ lib, python3, platformio, esptool, git, protobuf3_12, fetchpatch }:
|
||||
{ lib
|
||||
, python3
|
||||
, fetchFromGitHub
|
||||
, platformio
|
||||
, esptool
|
||||
, git
|
||||
}:
|
||||
|
||||
let
|
||||
python = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
protobuf = super.protobuf.override {
|
||||
protobuf = protobuf3_12;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
in python.pkgs.buildPythonApplication rec {
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "esphome";
|
||||
version = "1.16.0";
|
||||
version = "1.17.1";
|
||||
|
||||
src = python.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0pvwzkdcpjqdf7lh1k3xv1la5v60lhjixzykapl7f2xh71fbm144";
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0483glwi155ca1wnffwhmwn17d7kwk4hjwmckb8zs197rfqmb55v";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# remove all version pinning (E.g tornado==5.1.1 -> tornado)
|
||||
sed -i -e "s/==[0-9.]*//" requirements.txt
|
||||
|
||||
# drop coverage testing
|
||||
sed -i '/--cov/d' pytest.ini
|
||||
|
||||
# migrate use of hypothesis internals to be compatible with hypothesis>=5.32.1
|
||||
# https://github.com/esphome/issues/issues/2021
|
||||
substituteInPlace tests/unit_tests/strategies.py --replace \
|
||||
"@st.defines_strategy_with_reusable_values" \
|
||||
"@st.defines_strategy(force_reusable_values=True)"
|
||||
'';
|
||||
|
||||
# Remove esptool and platformio from requirements
|
||||
ESPHOME_USE_SUBPROCESS = "";
|
||||
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
voluptuous pyyaml paho-mqtt colorlog colorama
|
||||
tornado protobuf tzlocal pyserial ifaddr
|
||||
protobuf click
|
||||
# esphome has optional dependencies it does not declare, they are
|
||||
# loaded when certain config blocks are used, like `font`, `image`
|
||||
# or `animation`.
|
||||
# They have validation functions like:
|
||||
# - validate_cryptography_installed
|
||||
# - validate_pillow_installed
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
click
|
||||
colorama
|
||||
cryptography
|
||||
ifaddr
|
||||
paho-mqtt
|
||||
pillow
|
||||
protobuf
|
||||
pyserial
|
||||
pyyaml
|
||||
tornado
|
||||
tzlocal
|
||||
voluptuous
|
||||
];
|
||||
|
||||
# remove all version pinning (E.g tornado==5.1.1 -> tornado)
|
||||
postPatch = ''
|
||||
sed -i -e "s/==[0-9.]*//" requirements.txt
|
||||
'';
|
||||
|
||||
makeWrapperArgs = [
|
||||
# platformio is used in esphomeyaml/platformio_api.py
|
||||
# esptool is used in esphomeyaml/__main__.py
|
||||
@@ -39,16 +63,24 @@ in python.pkgs.buildPythonApplication rec {
|
||||
"--set ESPHOME_USE_SUBPROCESS ''"
|
||||
];
|
||||
|
||||
# Platformio will try to access the network
|
||||
# Instead, run the executable
|
||||
checkPhase = ''
|
||||
checkInputs = with python3.pkgs; [
|
||||
hypothesis
|
||||
mock
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postCheck = ''
|
||||
$out/bin/esphome --help > /dev/null
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Make creating custom firmwares for ESP32/ESP8266 super easy";
|
||||
homepage = "https://esphome.io/";
|
||||
license = licenses.mit;
|
||||
license = with licenses; [
|
||||
mit # The C++/runtime codebase of the ESPHome project (file extensions .c, .cpp, .h, .hpp, .tcc, .ino)
|
||||
gpl3Only # The python codebase and all other parts of this codebase
|
||||
];
|
||||
maintainers = with maintainers; [ globin elseym hexa ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
||||
{ callPackage, lib, stdenv, fetchurl, jre, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "5.0.0";
|
||||
let this = stdenv.mkDerivation rec {
|
||||
version = "5.1.0";
|
||||
pname = "openapi-generator-cli";
|
||||
|
||||
jarfilename = "${pname}-${version}.jar";
|
||||
@@ -12,16 +12,20 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://maven/org/openapitools/${pname}/${version}/${jarfilename}";
|
||||
sha256 = "13kgc84kyrypr0xy4xifrzqcy4qlvcxc7f0jy3n1xkjl3vhav7w3";
|
||||
sha256 = "06dvy4pwgpyf209n0b27qwkjj7zlgadg2czwxapy94fd1wpq9yb2";
|
||||
};
|
||||
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D "$src" "$out/share/java/${jarfilename}"
|
||||
|
||||
makeWrapper ${jre}/bin/java $out/bin/${pname} \
|
||||
--add-flags "-jar $out/share/java/${jarfilename}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
@@ -30,4 +34,9 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.shou ];
|
||||
};
|
||||
}
|
||||
|
||||
passthru.tests.example = callPackage ./example.nix {
|
||||
openapi-generator-cli = this;
|
||||
};
|
||||
};
|
||||
in this
|
||||
|
||||
31
pkgs/tools/networking/openapi-generator-cli/example.nix
Normal file
31
pkgs/tools/networking/openapi-generator-cli/example.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ openapi-generator-cli, fetchurl, runCommand }:
|
||||
|
||||
runCommand "openapi-generator-cli-test" {
|
||||
nativeBuildInputs = [ openapi-generator-cli ];
|
||||
petstore = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/14c0908becbccd78252be49bd92be8c53cd2b9e3/examples/v3.0/petstore.yaml";
|
||||
sha256 = "sha256:1mgdbzv42alv0b1a18dqbabqyvyhrg3brynr5hqsrm3qljfzaq5b";
|
||||
};
|
||||
config = builtins.toJSON {
|
||||
elmVersion = "0.19";
|
||||
elmPrefixCustomTypeVariants = false;
|
||||
};
|
||||
passAsFile = [ "config" ];
|
||||
} ''
|
||||
openapi-generator-cli generate \
|
||||
--input-spec $petstore \
|
||||
--enable-post-process-file \
|
||||
--generator-name elm \
|
||||
--config "$config" \
|
||||
--additional-properties elmEnableCustomBasePaths=true \
|
||||
--output "$out" \
|
||||
;
|
||||
find $out
|
||||
echo >&2 'Looking for some keywords'
|
||||
set -x
|
||||
grep 'module Api.Request.Pets' $out/src/Api/Request/Pets.elm
|
||||
grep 'createPets' $out/src/Api/Request/Pets.elm
|
||||
grep '"limit"' $out/src/Api/Request/Pets.elm
|
||||
set +x
|
||||
echo "Looks OK!"
|
||||
''
|
||||
@@ -1,6 +1,6 @@
|
||||
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
||||
{ callPackage, lib, stdenv, fetchurl, jre, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
let this = stdenv.mkDerivation rec {
|
||||
version = "6.0.0-2021-01-18"; # Also update the fetchurl link
|
||||
pname = "openapi-generator-cli";
|
||||
|
||||
@@ -18,10 +18,14 @@ stdenv.mkDerivation rec {
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D "$src" "$out/share/java/${jarfilename}"
|
||||
|
||||
makeWrapper ${jre}/bin/java $out/bin/${pname} \
|
||||
--add-flags "-jar $out/share/java/${jarfilename}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
@@ -30,5 +34,9 @@ stdenv.mkDerivation rec {
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.shou ];
|
||||
};
|
||||
}
|
||||
|
||||
passthru.tests.example = callPackage ./example.nix {
|
||||
openapi-generator-cli = this;
|
||||
};
|
||||
};
|
||||
in this
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
, withNetfilter ? (!stdenv.isDarwin), libmnl, libnetfilter_acct
|
||||
, withSsl ? true, openssl
|
||||
, withDebug ? false
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
with lib;
|
||||
@@ -15,14 +16,14 @@ with lib;
|
||||
let
|
||||
go-d-plugin = callPackage ./go.d.plugin.nix {};
|
||||
in stdenv.mkDerivation rec {
|
||||
version = "1.29.3";
|
||||
version = "1.30.1";
|
||||
pname = "netdata";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "netdata";
|
||||
repo = "netdata";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-GWIQZEC5agJ+Zw7l58IIAJhXP6dxirCmWVBJulzBO5Q=";
|
||||
sha256 = "0cp6gbn38f1cr0jkr64vvwz005cvnwj3hgfxs147wap9w228k46r";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
@@ -39,6 +40,11 @@ in stdenv.mkDerivation rec {
|
||||
# required to prevent plugins from relying on /etc
|
||||
# and /var
|
||||
./no-files-in-etc-and-var.patch
|
||||
# cgroups: fix network interfaces detection when using virsh
|
||||
(fetchpatch {
|
||||
url = "https://patch-diff.githubusercontent.com/raw/netdata/netdata/pull/11096.patch";
|
||||
sha256 = "0f2rd7kgbwbyq9wyn085d213ifvivnpl3qlx1gjrg42rkbi4n8jj";
|
||||
})
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1";
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "netdata-go.d.plugin";
|
||||
version = "0.26.2";
|
||||
version = "0.28.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "netdata";
|
||||
repo = "go.d.plugin";
|
||||
rev = "v${version}";
|
||||
sha256 = "1jy5pc1ihyrg6sqyw0d48bsqa7kr7kqz10k3845g958vgfmfig59";
|
||||
sha256 = "0i77nvqi3dcby0gr3b06bai170q2ibp5390qfjijrk1yqz6x6sd5";
|
||||
};
|
||||
|
||||
vendorSha256 = "16b6i9cpk8j7292qgjvida70rg7nixi6g94wayzikx01vmdbis5r";
|
||||
vendorSha256 = "1q8z4smaxzqd5iwvbnkkr33c3b94rjwa3xjirwlr595g0wn93wc7";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
||||
@@ -1,28 +1,8 @@
|
||||
From 4ecc1475be94a384c122594b5f7d455beb64a2f0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
|
||||
Date: Sat, 22 Feb 2020 06:42:14 +0000
|
||||
Subject: [PATCH] no files in etc and var
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
|
||||
---
|
||||
collectors/Makefile.am | 2 +-
|
||||
collectors/charts.d.plugin/Makefile.am | 2 +-
|
||||
collectors/node.d.plugin/Makefile.am | 2 +-
|
||||
collectors/python.d.plugin/Makefile.am | 2 +-
|
||||
collectors/statsd.plugin/Makefile.am | 2 +-
|
||||
health/Makefile.am | 2 +-
|
||||
system/Makefile.am | 3 +--
|
||||
web/Makefile.am | 2 +-
|
||||
8 files changed, 8 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/collectors/Makefile.am b/collectors/Makefile.am
|
||||
index 9bb52958..c9799165 100644
|
||||
index 021e2ff23..115b88277 100644
|
||||
--- a/collectors/Makefile.am
|
||||
+++ b/collectors/Makefile.am
|
||||
@@ -32,7 +32,7 @@ usercustompluginsconfigdir=$(configdir)/custom-plugins.d
|
||||
@@ -33,7 +33,7 @@ usercustompluginsconfigdir=$(configdir)/custom-plugins.d
|
||||
usergoconfigdir=$(configdir)/go.d
|
||||
|
||||
# Explicitly install directories to avoid permission issues due to umask
|
||||
@@ -32,7 +12,7 @@ index 9bb52958..c9799165 100644
|
||||
$(INSTALL) -d $(DESTDIR)$(usergoconfigdir)
|
||||
|
||||
diff --git a/collectors/charts.d.plugin/Makefile.am b/collectors/charts.d.plugin/Makefile.am
|
||||
index 03c7f0a9..01985db0 100644
|
||||
index 03c7f0a94..01985db01 100644
|
||||
--- a/collectors/charts.d.plugin/Makefile.am
|
||||
+++ b/collectors/charts.d.plugin/Makefile.am
|
||||
@@ -34,7 +34,7 @@ dist_userchartsconfig_DATA = \
|
||||
@@ -44,8 +24,21 @@ index 03c7f0a9..01985db0 100644
|
||||
$(INSTALL) -d $(DESTDIR)$(userchartsconfigdir)
|
||||
|
||||
chartsconfigdir=$(libconfigdir)/charts.d
|
||||
diff --git a/collectors/ebpf.plugin/Makefile.am b/collectors/ebpf.plugin/Makefile.am
|
||||
index 18b1fc6c8..b4b0c7852 100644
|
||||
--- a/collectors/ebpf.plugin/Makefile.am
|
||||
+++ b/collectors/ebpf.plugin/Makefile.am
|
||||
@@ -13,7 +13,7 @@ SUFFIXES = .in
|
||||
userebpfconfigdir=$(configdir)/ebpf.d
|
||||
|
||||
# Explicitly install directories to avoid permission issues due to umask
|
||||
-install-exec-local:
|
||||
+no-install-exec-local:
|
||||
$(INSTALL) -d $(DESTDIR)$(userebpfconfigdir)
|
||||
|
||||
dist_plugins_SCRIPTS = \
|
||||
diff --git a/collectors/node.d.plugin/Makefile.am b/collectors/node.d.plugin/Makefile.am
|
||||
index c3142d43..95e32445 100644
|
||||
index c3142d433..95e324455 100644
|
||||
--- a/collectors/node.d.plugin/Makefile.am
|
||||
+++ b/collectors/node.d.plugin/Makefile.am
|
||||
@@ -26,7 +26,7 @@ dist_usernodeconfig_DATA = \
|
||||
@@ -58,7 +51,7 @@ index c3142d43..95e32445 100644
|
||||
|
||||
nodeconfigdir=$(libconfigdir)/node.d
|
||||
diff --git a/collectors/python.d.plugin/Makefile.am b/collectors/python.d.plugin/Makefile.am
|
||||
index e678f86a..29a319da 100644
|
||||
index 38eb90f79..ce7079441 100644
|
||||
--- a/collectors/python.d.plugin/Makefile.am
|
||||
+++ b/collectors/python.d.plugin/Makefile.am
|
||||
@@ -32,7 +32,7 @@ dist_userpythonconfig_DATA = \
|
||||
@@ -71,10 +64,10 @@ index e678f86a..29a319da 100644
|
||||
|
||||
pythonconfigdir=$(libconfigdir)/python.d
|
||||
diff --git a/collectors/statsd.plugin/Makefile.am b/collectors/statsd.plugin/Makefile.am
|
||||
index b01302d1..f5b77da4 100644
|
||||
index 71f2d468d..2c9ced2bf 100644
|
||||
--- a/collectors/statsd.plugin/Makefile.am
|
||||
+++ b/collectors/statsd.plugin/Makefile.am
|
||||
@@ -17,5 +17,5 @@ dist_userstatsdconfig_DATA = \
|
||||
@@ -18,5 +18,5 @@ dist_userstatsdconfig_DATA = \
|
||||
$(NULL)
|
||||
|
||||
# Explicitly install directories to avoid permission issues due to umask
|
||||
@@ -82,7 +75,7 @@ index b01302d1..f5b77da4 100644
|
||||
+no-install-exec-local:
|
||||
$(INSTALL) -d $(DESTDIR)$(userstatsdconfigdir)
|
||||
diff --git a/health/Makefile.am b/health/Makefile.am
|
||||
index 853ed0d7..210330a6 100644
|
||||
index b963ea0cd..6979e69bf 100644
|
||||
--- a/health/Makefile.am
|
||||
+++ b/health/Makefile.am
|
||||
@@ -19,7 +19,7 @@ dist_userhealthconfig_DATA = \
|
||||
@@ -95,10 +88,10 @@ index 853ed0d7..210330a6 100644
|
||||
|
||||
healthconfigdir=$(libconfigdir)/health.d
|
||||
diff --git a/system/Makefile.am b/system/Makefile.am
|
||||
index ad68c655..74f032f9 100644
|
||||
index 5323738c9..06e1b6a73 100644
|
||||
--- a/system/Makefile.am
|
||||
+++ b/system/Makefile.am
|
||||
@@ -17,11 +17,10 @@ include $(top_srcdir)/build/subst.inc
|
||||
@@ -20,11 +20,10 @@ include $(top_srcdir)/build/subst.inc
|
||||
SUFFIXES = .in
|
||||
|
||||
dist_config_SCRIPTS = \
|
||||
@@ -112,7 +105,7 @@ index ad68c655..74f032f9 100644
|
||||
|
||||
nodist_noinst_DATA = \
|
||||
diff --git a/web/Makefile.am b/web/Makefile.am
|
||||
index ccaccd76..16a2977e 100644
|
||||
index ccaccd764..16a2977e5 100644
|
||||
--- a/web/Makefile.am
|
||||
+++ b/web/Makefile.am
|
||||
@@ -12,7 +12,7 @@ SUBDIRS = \
|
||||
@@ -124,6 +117,3 @@ index ccaccd76..16a2977e 100644
|
||||
$(INSTALL) -d $(DESTDIR)$(usersslconfigdir)
|
||||
|
||||
dist_noinst_DATA = \
|
||||
--
|
||||
2.25.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user