Skip to content

Commit

Permalink
openleadr-rs: init at v0.0.3
Browse files Browse the repository at this point in the history
openleadr-rs is an implementation of the OpenADR 3.0 standard, which
allows distributed energy resources (DERs) to communicate price and
control signals to electric power utilities and system operators as part
of a smart grid. It's currently a work in progress and is an upgrade of
the existing openleadr-python project that supported the OpenADR 2.0
standard. It's backed by the Linux Foundation.

The package currently builds both client (ven) and server (vtn)
binaries.

See https://github.com/OpenLEADR/openleadr-rs
and https://github.com/OpenLEADR/openleadr-python
and https://openleadr.org/
and https://lfenergy.org/projects/openleadr/
and https://www.openadr.org/overview
and https://en.wikipedia.org/wiki/Distributed_generation
  • Loading branch information
benjaminedwardwebb committed Dec 30, 2024
1 parent d836dc6 commit f5170d4
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions pkgs/by-name/op/openleadr-rs/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:

rustPlatform.buildRustPackage rec {
pname = "openleadr-rs";
version = "v0.0.3";
src = fetchFromGitHub {
owner = "OpenLEADR";
repo = "openleadr-rs";
rev = version;
hash = "sha256-KB7RthkF7bm74ziXlM1L/RfFOlF8YNvED/Vw5CMWZJk=";
};
cargoHash = "sha256-03/LfhrWvrq8Jw8Zb8T5jQbuJJmtedcTUCtXnvrMgLM=";
# Disable compile-time checks of SQL queries against live database.
#
# The sqlx rust crate's query*! macros require a live database connection
# during compilation (ugh!) in order to support compile-time checked queries
# (yay!). We disable this feature for now within the nix build context. Not
# doing so yields errors like
#
# error: error communicating with database: Connection refused (os error 111)
#
# during compilation.
#
# See https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/README.md#force-building-in-offline-mode
# and https://docs.rs/sqlx/latest/sqlx/macro.query.html#offline-mode
SQLX_OFFLINE = "true";
# Disable tests.
#
# Several tests in the client require a live database connection. Testing
# without a database yields errors like
#
# failed to connect to setup test database: PoolTimedOut
#
# and
#
# error: test failed, to rerun pass `-p openadr-client --test basic-read`
#
# We avoid this by disabling all tests. This is bad, and there is an
# outstanding issue on the upstream project's board to avoid depending on
# live database connections inside tests. We may also be able to find a way
# to spin up a database in the context of the nix build for testing.
#
# See https://github.com/orgs/OpenLEADR/projects/1?pane=issue&itemId=83420564
doCheck = false;
meta = {
description = "Work-in-progress implementation of the OpenADR 3.0 specification";
longDescription = ''
This is a work-in-progress implementation of the OpenADR 3.0
specification. OpenADR is a protocol for automatic demand-response in
electricity grids, like dynamic pricing or load shedding.
'';
homepage = "https://github.com/OpenLEADR/openleadr-rs";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [ benjaminedwardwebb ];
platforms = lib.platforms.linux;
};
}

0 comments on commit f5170d4

Please sign in to comment.