From 1f9c89f559a6b07b698e9b651107441e79c7de23 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 19 Jun 2023 19:47:22 +0200 Subject: [PATCH 1/3] update fpga submodule Signed-off-by: Philipp Jungkamp --- fpga | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpga b/fpga index 4a2c860e0..ce8612379 160000 --- a/fpga +++ b/fpga @@ -1 +1 @@ -Subproject commit 4a2c860e05b94825000627c0b115f627a2e666b9 +Subproject commit ce8612379de62f50a52e172fe8eaee924d5d8822 From c77adf6847bd1087be9fe450dfa24e258612370f Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 19 Jun 2023 19:47:50 +0200 Subject: [PATCH 2/3] villas-relay: inhibit gcc warning false positive Signed-off-by: Philipp Jungkamp --- src/villas-relay.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/villas-relay.hpp b/src/villas-relay.hpp index 5d0bb2fe1..ad3037384 100644 --- a/src/villas-relay.hpp +++ b/src/villas-relay.hpp @@ -31,6 +31,7 @@ typedef std::string Identifier; class Frame : public std::vector { public: Frame() { + reserve(LWS_PRE); /* lws_write() requires LWS_PRE bytes in front of the payload */ insert(end(), LWS_PRE, 0); } From 34fadc6bf0be0580d02caf8748d039b5ae3145b0 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 19 Jun 2023 20:18:27 +0200 Subject: [PATCH 3/3] packaging-nix: fix fpga node and enable it by default Signed-off-by: Philipp Jungkamp --- packaging/nix/flake.lock | 11 ++++++----- packaging/nix/flake.nix | 5 ++++- packaging/nix/villas.nix | 6 +++++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packaging/nix/flake.lock b/packaging/nix/flake.lock index 6b77027d9..c9bc3fc81 100644 --- a/packaging/nix/flake.lock +++ b/packaging/nix/flake.lock @@ -19,16 +19,17 @@ "fpga": { "flake": false, "locked": { - "lastModified": 1679417867, - "narHash": "sha256-HHIsOnuQOq0Ytd22VMSHpTbecHpcheF1xLkslqxXOsk=", - "ref": "refs/heads/master", - "rev": "29f81016b2317667a2b21fbcf74ea66986a84c03", - "revCount": 530, + "lastModified": 1686871446, + "narHash": "sha256-pRFFr72NVge4UgwBvc8gYygnvOHghTSUGI+JtqpRlxo=", + "ref": "refs/heads/villas-node", + "rev": "ce8612379de62f50a52e172fe8eaee924d5d8822", + "revCount": 481, "submodules": true, "type": "git", "url": "https://github.com/VILLASframework/fpga.git" }, "original": { + "ref": "refs/heads/villas-node", "submodules": true, "type": "git", "url": "https://github.com/VILLASframework/fpga.git" diff --git a/packaging/nix/flake.nix b/packaging/nix/flake.nix index e058f57d5..d8e6dd8d1 100644 --- a/packaging/nix/flake.nix +++ b/packaging/nix/flake.nix @@ -10,7 +10,10 @@ }; fpga = { - url = "git+https://github.com/VILLASframework/fpga.git?submodules=1"; + type = "git"; + url = "https://github.com/VILLASframework/fpga.git"; + ref = "refs/heads/villas-node"; + submodules = true; flake = false; }; diff --git a/packaging/nix/villas.nix b/packaging/nix/villas.nix index 534967fcc..711793fab 100644 --- a/packaging/nix/villas.nix +++ b/packaging/nix/villas.nix @@ -13,7 +13,7 @@ withHookLua ? withAllHooks, withNodeAmqp ? withAllNodes, withNodeComedi ? withAllNodes, - withNodeFpga ? false, # submodule commit has warnings and master broke the interface + withNodeFpga ? withAllNodes, withNodeIec60870 ? withAllNodes, withNodeIec61850 ? withAllNodes, withNodeInfiniband ? withAllNodes, @@ -86,6 +86,10 @@ stdenv.mkDerivation { ${lib.optionalString withNodeFpga "ln -s ${fpga} fpga"} ''; postInstall = '' + if [ -d $out/include/villas/ ] && [ -d $dev/include/villas/ ]; then + mv $out/include/villas/* $dev/include/villas/ + rm -d $out/include/villas + fi wrapProgram $out/bin/villas \ --set PATH ${lib.makeBinPath [(placeholder "out") gnugrep coreutils]} wrapProgram $out/bin/villas-api \