From 34fadc6bf0be0580d02caf8748d039b5ae3145b0 Mon Sep 17 00:00:00 2001 From: Philipp Jungkamp Date: Mon, 19 Jun 2023 20:18:27 +0200 Subject: [PATCH] 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 \