1515 nixosTests ,
1616} :
1717
18- buildGoModule rec {
19- pname = "evcc" ;
20- version = "0.131.12" ;
18+ let
19+ version = "0.132.0" ;
2120
2221 src = fetchFromGitHub {
2322 owner = "evcc-io" ;
2423 repo = "evcc" ;
25- rev = version ;
26- hash = "sha256-wctSgB5NRuS1+g+MEiHDS4oyFVNdwP2WFJF5kj9nFig=" ;
24+ tag = version ;
25+ hash = "sha256-9HF9Beu2nLUoRViFluEc4kqGah2NfN/K0hqTZ4Bmo5c=" ;
26+ } ;
27+
28+ vendorHash = "sha256-xxE/KBZvPBMd9cLE/uU74iyLaOYRd6m9HokTDi0FnRg=" ;
29+
30+ commonMeta = with lib ; {
31+ license = licenses . mit ;
32+ maintainers = with maintainers ; [ hexa ] ;
33+ } ;
34+
35+ decorate = buildGoModule {
36+ pname = "evcc-decorate" ;
37+ inherit version src vendorHash ;
38+
39+ subPackages = "cmd/decorate" ;
40+
41+ meta = commonMeta // {
42+ description = "EVCC decorate helper" ;
43+ homepage = "https://github.com/evcc-io/evcc/tree/master/cmd/decorate" ;
44+ } ;
2745 } ;
46+ in
2847
29- vendorHash = "sha256-xravbTVzmS7loLKtzuT3Yw7FkEnDFLw+GrwnAVV36Yw=" ;
48+ buildGoModule rec {
49+ pname = "evcc" ;
50+ inherit version src vendorHash ;
3051
3152 npmDeps = fetchNpmDeps {
3253 inherit src ;
@@ -40,6 +61,7 @@ buildGoModule rec {
4061
4162 overrideModAttrs = _ : {
4263 nativeBuildInputs = [
64+ decorate
4365 enumer
4466 go
4567 git
@@ -59,7 +81,7 @@ buildGoModule rec {
5981
6082 ldflags = [
6183 "-X github.com/evcc-io/evcc/server.Version=${ version } "
62- "-X github.com/evcc-io/evcc/server.Commit=${ src . rev } "
84+ "-X github.com/evcc-io/evcc/server.Commit=${ src . tag } "
6385 "-s"
6486 "-w"
6587 ] ;
@@ -82,17 +104,16 @@ buildGoModule rec {
82104 [ "-skip=^${ lib . concatStringsSep "$|^" skippedTests } $" ] ;
83105
84106 passthru = {
107+ inherit decorate ;
85108 tests = {
86109 inherit ( nixosTests ) evcc ;
87110 } ;
88111 updateScript = nix-update-script { } ;
89112 } ;
90113
91- meta = with lib ; {
114+ meta = commonMeta // {
92115 description = "EV Charge Controller" ;
93116 homepage = "https://evcc.io" ;
94117 changelog = "https://github.com/evcc-io/evcc/releases/tag/${ version } " ;
95- license = licenses . mit ;
96- maintainers = with maintainers ; [ hexa ] ;
97118 } ;
98119}
0 commit comments