1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Merge pull request #662 from VILLASframework/packaging-nix

packaging-nix: improvements
This commit is contained in:
Steffen Vogel 2023-06-19 18:15:26 +02:00 committed by GitHub
commit 13ff7a6e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 8 deletions

View file

@ -203,7 +203,7 @@ std::optional<ASDUData::Sample> ASDUData::checkASDU(CS101_ASDU const &asdu) cons
}
default:
assert(!"unreachable");
throw RuntimeError { "unsupported asdu type" };
}
std::optional<CP56Time2a> time_cp56;
@ -761,7 +761,7 @@ int SlaveNode::parse(json_t *json, const uuid_t sn_uuid)
break;
default:
assert(!"unreachable");
throw RuntimeError { "unsupported signal type" };
}
} else
initial_value.f = 0.0;

View file

@ -8,6 +8,7 @@ stdenv.mkDerivation {
pname = "lib60870";
version = "villas";
src = src;
separateDebugInfo = true;
nativeBuildInputs = [cmake];
preConfigure = "cd lib60870-C";
meta = with lib; {

View file

@ -12,6 +12,7 @@ stdenv.mkDerivation {
pname = "libdatachannel";
version = "villas";
src = src;
separateDebugInfo = true;
nativeBuildInputs = [cmake pkg-config];
buildInputs = [libnice libpcap openssl];
cmakeFlags = [

View file

@ -8,6 +8,7 @@ stdenv.mkDerivation {
pname = "libiec61850";
version = "villas";
src = src;
separateDebugInfo = true;
nativeBuildInputs = [cmake];
meta = with lib; {
description = "open-source library for the IEC 61850 protocols";

View file

@ -2,6 +2,7 @@
# general configuration
src,
version,
withGpl ? true,
withAllExtras ? false,
withAllFormats ? false,
withAllHooks ? false,
@ -32,6 +33,7 @@
coreutils,
fpga,
graphviz,
jq,
lib,
makeWrapper,
pkg-config,
@ -69,12 +71,14 @@
stdenv.mkDerivation {
inherit src version;
pname = "villas";
cmakeFlags =
[
"-DDOWNLOAD_GO=OFF"
"-DCMAKE_BUILD_TYPE=Release"
]
outputs = ["out" "dev"];
separateDebugInfo = true;
cmakeFlags = []
++ lib.optionals (!withGpl) ["-DWITHOUT_GPL=ON"]
++ lib.optionals withFormatProtobuf ["-DCMAKE_FIND_ROOT_PATH=${protobufcBuildBuild}/bin"];
postPatch = ''
patchShebangs --host ./tools
'';
preConfigure = ''
rm -df common
rm -df fpga
@ -82,9 +86,10 @@ stdenv.mkDerivation {
${lib.optionalString withNodeFpga "ln -s ${fpga} fpga"}
'';
postInstall = ''
patchShebangs --build $out/bin/villas
wrapProgram $out/bin/villas \
--set PATH ${lib.makeBinPath [(placeholder "out") gnugrep coreutils]}
wrapProgram $out/bin/villas-api \
--set PATH ${lib.makeBinPath [coreutils curl jq]}
'';
nativeBuildInputs = [
cmake