Unverified Commit ba6e8b69 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #312404 from mweinelt/evcc-0.126.3

evcc: 0.126.2 -> 0.126.3
parents 62f1d8e7 e17488e8
Loading
Loading
Loading
Loading
+31 −12
Original line number Diff line number Diff line
{ lib
, stdenv
, buildGo122Module
, fetchFromGitHub
, fetchNpmDeps
@@ -11,7 +12,6 @@
, npmHooks
, nix-update-script
, nixosTests
, stdenv
}:

let
@@ -21,20 +21,20 @@ in

buildGoModule rec {
  pname = "evcc";
  version = "0.126.2";
  version = "0.126.3";

  src = fetchFromGitHub {
    owner = "evcc-io";
    repo = "evcc";
    rev = version;
    hash = "sha256-jeOlBHCPn+k+rXADm0hcGqg+7qn8FOJKnCfSwZazRl8=";
    hash = "sha256-Q+g/XEfIfpGchIZQdouoP9muqq6l0xixOLmIntgIWe0=";
  };

  vendorHash = "sha256-jJOxFkoVBT1NrnhntHPa2/irjHD09zKbtNDQoyelJp4=";
  vendorHash = "sha256-tFj1cPBB1qeuwz1RXVVDVNJRfFFKPH6mdMnaiM3jwUc=";

  npmDeps = fetchNpmDeps {
    inherit src;
    hash = "sha256-KW2aVK3Ui5sGBcNhTsNXUr9HyHcm0iJxxzBUjrNWrqw=";
    hash = "sha256-ghDLmsmcG+qDItiqaZy8MTYw/AU58bZfUzYY32XKNyk=";
  };

  nativeBuildInputs = [
@@ -72,14 +72,33 @@ buildGoModule rec {
    make ui
  '';

  doCheck = !stdenv.isDarwin; # tries to bind to local network, doesn't work in darwin sandbox
  doCheck = !stdenv.isDarwin; # darwin sandbox limitations around network access, access to /etc/protocols and likely more

  preCheck = ''
    # requires network access
    rm meter/template_test.go
    rm charger/template_test.go
    rm tariff/template_test.go
  '';
  checkFlags = let
    skippedTests = [
      # network access
      "TestOctopusConfigParse"
      "TestTemplates/allinpower"
      "TestTemplates/electricitymaps"
      "TestTemplates/elering"
      "TestTemplates/energinet"
      "TestTemplates/grünstromindex"
      "TestTemplates/pun"
      "TestTemplates/entsoe"
      "TestTemplates/ngeso"
      "TestTemplates/tibber"
      "TestTemplates/groupe-e"
      "TestTemplates/awattar"
      "TestTemplates/energy-charts-api"
      "TestTemplates/polestar"
      "TestTemplates/sma-inverter-speedwire/battery"
      "TestTemplates/sma-inverter-speedwire/pv"
      "TestTemplates/smartenergy"
      "TestTemplates/tibber-pulse/grid"

    ];
  in
  [ "-skip=^${lib.concatStringsSep "$|^" skippedTests}$" ];

  passthru = {
    tests = {