mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-30 00:00:11 +01:00
packaging-nix: Update nix flake
Signed-off-by: Philipp Jungkamp <Philipp.Jungkamp@opal-rt.com>
This commit is contained in:
parent
5185c25ba7
commit
7117dc601f
4 changed files with 79 additions and 13 deletions
29
packaging/nix/ethercat.nix
Normal file
29
packaging/nix/ethercat.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
autoconf,
|
||||||
|
automake,
|
||||||
|
cmake,
|
||||||
|
lib,
|
||||||
|
libtool,
|
||||||
|
pkg-config,
|
||||||
|
stdenv,
|
||||||
|
src,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "ethercat";
|
||||||
|
version = "villas";
|
||||||
|
src = src;
|
||||||
|
separateDebugInfo = true;
|
||||||
|
nativeBuildInputs = [autoconf automake libtool pkg-config];
|
||||||
|
preConfigure = ''
|
||||||
|
bash ./bootstrap
|
||||||
|
'';
|
||||||
|
configureFlags = [
|
||||||
|
"--enable-userlib=yes"
|
||||||
|
"--enable-kernel=no"
|
||||||
|
];
|
||||||
|
meta = with lib; {
|
||||||
|
description = "IgH EtherCAT Master for Linux";
|
||||||
|
homepage = "https://etherlab.org/master";
|
||||||
|
license = licenses.gpl2Only;
|
||||||
|
};
|
||||||
|
}
|
35
packaging/nix/flake.lock
generated
35
packaging/nix/flake.lock
generated
|
@ -16,20 +16,36 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ethercat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1689851599,
|
||||||
|
"narHash": "sha256-r829UW4ziY+QUxqjb2j2Bo+xJeUNWn6WiSRK3Gly2Zo=",
|
||||||
|
"owner": "etherlab.org",
|
||||||
|
"repo": "ethercat",
|
||||||
|
"rev": "c8a512ac077f2ab51bb072bfbef1a687f9f1c090",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "etherlab.org",
|
||||||
|
"ref": "stable-1.5",
|
||||||
|
"repo": "ethercat",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
"fpga": {
|
"fpga": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686871446,
|
"lastModified": 1690302379,
|
||||||
"narHash": "sha256-pRFFr72NVge4UgwBvc8gYygnvOHghTSUGI+JtqpRlxo=",
|
"narHash": "sha256-u2u4CUffhA9jxtuk4HokqlmyDQGNz4+LOEJ5Z9DhedU=",
|
||||||
"ref": "refs/heads/villas-node",
|
"ref": "refs/heads/master",
|
||||||
"rev": "ce8612379de62f50a52e172fe8eaee924d5d8822",
|
"rev": "1cac3fafde6ef3098a145f9d5d936a2dc6b7d7c0",
|
||||||
"revCount": 481,
|
"revCount": 532,
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/VILLASframework/fpga.git"
|
"url": "https://github.com/VILLASframework/fpga.git"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"ref": "refs/heads/villas-node",
|
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/VILLASframework/fpga.git"
|
"url": "https://github.com/VILLASframework/fpga.git"
|
||||||
|
@ -90,11 +106,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687354544,
|
"lastModified": 1692254348,
|
||||||
"narHash": "sha256-1Xu+QzyA10AiY21i27Zu9bqQAaxXBacNKbGUA9OZy7Y=",
|
"narHash": "sha256-CyRMA7Rap1X65k4p/uoaLXhbnn+PZvwxNHSeLuiQ9ss=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "876181e3ae452cc6186486f6f7300a8a6de237cb",
|
"rev": "5353604b0affde24dcd75e59d0d22342b1758cfb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -107,6 +123,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"common": "common",
|
"common": "common",
|
||||||
|
"ethercat": "ethercat",
|
||||||
"fpga": "fpga",
|
"fpga": "fpga",
|
||||||
"lib60870": "lib60870",
|
"lib60870": "lib60870",
|
||||||
"libdatachannel": "libdatachannel",
|
"libdatachannel": "libdatachannel",
|
||||||
|
|
|
@ -12,11 +12,15 @@
|
||||||
fpga = {
|
fpga = {
|
||||||
type = "git";
|
type = "git";
|
||||||
url = "https://github.com/VILLASframework/fpga.git";
|
url = "https://github.com/VILLASframework/fpga.git";
|
||||||
ref = "refs/heads/villas-node";
|
|
||||||
submodules = true;
|
submodules = true;
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ethercat = {
|
||||||
|
url = "gitlab:etherlab.org/ethercat/stable-1.5";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
lib60870 = {
|
lib60870 = {
|
||||||
url = "github:mz-automation/lib60870/v2.3.2";
|
url = "github:mz-automation/lib60870/v2.3.2";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
@ -71,7 +75,8 @@
|
||||||
self.overlays.minimal
|
self.overlays.minimal
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
.pkgsCross.${crossSystem};
|
.pkgsCross
|
||||||
|
.${crossSystem};
|
||||||
|
|
||||||
# build villas and its dependencies for the specified `pkgs`
|
# build villas and its dependencies for the specified `pkgs`
|
||||||
packagesWith = pkgs: rec {
|
packagesWith = pkgs: rec {
|
||||||
|
@ -91,6 +96,10 @@
|
||||||
withAllNodes = true;
|
withAllNodes = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ethercat = pkgs.callPackage ./ethercat.nix {
|
||||||
|
src = inputs.ethercat;
|
||||||
|
};
|
||||||
|
|
||||||
lib60870 = pkgs.callPackage ./lib60870.nix {
|
lib60870 = pkgs.callPackage ./lib60870.nix {
|
||||||
src = inputs.lib60870;
|
src = inputs.lib60870;
|
||||||
};
|
};
|
||||||
|
@ -131,7 +140,7 @@
|
||||||
pkgs = pkgsFor system;
|
pkgs = pkgsFor system;
|
||||||
shellHook = ''[ -z "$PS1" ] || exec "$SHELL"'';
|
shellHook = ''[ -z "$PS1" ] || exec "$SHELL"'';
|
||||||
hardeningDisable = ["all"];
|
hardeningDisable = ["all"];
|
||||||
packages = with pkgs; [bashInteractive criterion bc jq];
|
packages = with pkgs; [bashInteractive bc boxfort criterion jq libffi libgit2 pcre];
|
||||||
in rec {
|
in rec {
|
||||||
default = full;
|
default = full;
|
||||||
|
|
||||||
|
|
|
@ -7,17 +7,23 @@
|
||||||
withAllFormats ? false,
|
withAllFormats ? false,
|
||||||
withAllHooks ? false,
|
withAllHooks ? false,
|
||||||
withAllNodes ? false,
|
withAllNodes ? false,
|
||||||
|
# extras
|
||||||
withExtraConfig ? withAllExtras,
|
withExtraConfig ? withAllExtras,
|
||||||
withExtraGraphviz ? withAllExtras,
|
withExtraGraphviz ? withAllExtras,
|
||||||
|
# formats
|
||||||
withFormatProtobuf ? withAllFormats,
|
withFormatProtobuf ? withAllFormats,
|
||||||
|
# hooks
|
||||||
withHookLua ? withAllHooks,
|
withHookLua ? withAllHooks,
|
||||||
|
# nodes
|
||||||
withNodeAmqp ? withAllNodes,
|
withNodeAmqp ? withAllNodes,
|
||||||
withNodeComedi ? withAllNodes,
|
withNodeComedi ? withAllNodes,
|
||||||
withNodeFpga ? withAllNodes,
|
withNodeFpga ? withAllNodes,
|
||||||
|
withNodeEthercat ? withAllNodes,
|
||||||
withNodeIec60870 ? withAllNodes,
|
withNodeIec60870 ? withAllNodes,
|
||||||
withNodeIec61850 ? withAllNodes,
|
withNodeIec61850 ? withAllNodes,
|
||||||
withNodeInfiniband ? withAllNodes,
|
withNodeInfiniband ? withAllNodes,
|
||||||
withNodeKafka ? withAllNodes,
|
withNodeKafka ? withAllNodes,
|
||||||
|
withNodeModbus ? withAllNodes,
|
||||||
withNodeMqtt ? withAllNodes,
|
withNodeMqtt ? withAllNodes,
|
||||||
withNodeNanomsg ? withAllNodes,
|
withNodeNanomsg ? withAllNodes,
|
||||||
withNodeRedis ? withAllNodes,
|
withNodeRedis ? withAllNodes,
|
||||||
|
@ -42,12 +48,14 @@
|
||||||
comedilib,
|
comedilib,
|
||||||
curl,
|
curl,
|
||||||
czmq,
|
czmq,
|
||||||
|
ethercat,
|
||||||
gnugrep,
|
gnugrep,
|
||||||
jansson,
|
jansson,
|
||||||
lib60870,
|
lib60870,
|
||||||
libconfig,
|
libconfig,
|
||||||
libdatachannel,
|
libdatachannel,
|
||||||
libiec61850,
|
libiec61850,
|
||||||
|
libmodbus,
|
||||||
libnl,
|
libnl,
|
||||||
libre,
|
libre,
|
||||||
libsodium,
|
libsodium,
|
||||||
|
@ -73,7 +81,8 @@ stdenv.mkDerivation {
|
||||||
pname = "villas";
|
pname = "villas";
|
||||||
outputs = ["out" "dev"];
|
outputs = ["out" "dev"];
|
||||||
separateDebugInfo = true;
|
separateDebugInfo = true;
|
||||||
cmakeFlags = []
|
cmakeFlags =
|
||||||
|
[]
|
||||||
++ lib.optionals (!withGpl) ["-DWITHOUT_GPL=ON"]
|
++ lib.optionals (!withGpl) ["-DWITHOUT_GPL=ON"]
|
||||||
++ lib.optionals withFormatProtobuf ["-DCMAKE_FIND_ROOT_PATH=${protobufcBuildBuild}/bin"];
|
++ lib.optionals withFormatProtobuf ["-DCMAKE_FIND_ROOT_PATH=${protobufcBuildBuild}/bin"];
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -116,10 +125,12 @@ stdenv.mkDerivation {
|
||||||
++ lib.optionals withHookLua [lua]
|
++ lib.optionals withHookLua [lua]
|
||||||
++ lib.optionals withNodeAmqp [rabbitmq-c]
|
++ lib.optionals withNodeAmqp [rabbitmq-c]
|
||||||
++ lib.optionals withNodeComedi [comedilib]
|
++ lib.optionals withNodeComedi [comedilib]
|
||||||
|
++ lib.optionals withNodeEthercat [ethercat]
|
||||||
++ lib.optionals withNodeIec60870 [lib60870]
|
++ lib.optionals withNodeIec60870 [lib60870]
|
||||||
++ lib.optionals withNodeIec61850 [libiec61850]
|
++ lib.optionals withNodeIec61850 [libiec61850]
|
||||||
++ lib.optionals withNodeInfiniband [rdma-core]
|
++ lib.optionals withNodeInfiniband [rdma-core]
|
||||||
++ lib.optionals withNodeKafka [rdkafka]
|
++ lib.optionals withNodeKafka [rdkafka]
|
||||||
|
++ lib.optionals withNodeModbus [libmodbus]
|
||||||
++ lib.optionals withNodeMqtt [mosquitto]
|
++ lib.optionals withNodeMqtt [mosquitto]
|
||||||
++ lib.optionals withNodeNanomsg [nanomsg]
|
++ lib.optionals withNodeNanomsg [nanomsg]
|
||||||
++ lib.optionals withNodeRedis [redis-plus-plus]
|
++ lib.optionals withNodeRedis [redis-plus-plus]
|
||||||
|
|
Loading…
Add table
Reference in a new issue