Skip to content

Commit

Permalink
add ESS ADS driver support (Beckhoff TwinCAT)
Browse files Browse the repository at this point in the history
  • Loading branch information
agaget committed Dec 21, 2023
1 parent f2b354f commit b805579
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ See `<nixpkgs/maintainers/scripts/check-maintainer-github-handles.sh>` for an ex
email = "[email protected]";
name = "Stéphane Tzvetkov";
};
agaget = {
email = "[email protected]";
name = "Alexis Gaget";
};
}
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ in
# EPICS support modules

support = recurseExtensible (_self: {
ads = callPackage ./epnix/support/ads {};
asyn = callPackage ./epnix/support/asyn {};
autosave = callPackage ./epnix/support/autosave {};
calc = callPackage ./epnix/support/calc {};
Expand Down
45 changes: 45 additions & 0 deletions pkgs/epnix/support/ads/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
lib,
epnixLib,
epnix,
mkEpicsPackage,
fetchFromGitLab,
local_config_site ? {},
local_release ? {},
}:
mkEpicsPackage rec {
pname = "ads";
version = "2023.08.20";
varname = "ADS";

inherit local_config_site local_release;

src = fetchFromGitLab {
domain = "gitlab.esss.lu.se";
owner = "epics-modules";
repo = "epics-twincat-ads";
rev = "f07f73cd20320e40e908ed281527a81a4799bbce";
fetchSubmodules = true;
sha256 = "sha256-NCuT2EpEBEVMzQw4cU8l0AUYVXa9fUtEOGpynG5Z85M=";
};

# Patch used to fix parallelization compilation issue caused by EPNix compare to standard compilation.
# Wait for PR https://gitlab.esss.lu.se/epics-modules/epics-twincat-ads/-/merge_requests/3
patches = [./fixDep.patch];

propagatedBuildInputs = with epnix.support; [asyn calc];

preBuild = ''
touch configure/RELEASE_PATHS.local
touch configure/RELEASE_LIBS.local
'';

meta = {
description = "Module providing EPICS support for ADS Protocol (Automation Device Specification)";
homepage = "https://www.beckhoff.com/en-en/products/automation/twincat/tc1xxx-twincat-3-base/tc1000.html";
# Wait for ESS team answer about the license : https://gitlab.esss.lu.se/epics-modules/epics-twincat-ads/-/issues/1
# lib.licenses.free don't work in EPNIX for now
license = epnixLib.licenses.epics;
maintainers = with epnixLib.maintainers; [agaget];
};
}
12 changes: 12 additions & 0 deletions pkgs/epnix/support/ads/fixDep.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/Makefile.epics b/Makefile.epics
index ef5c909..a709c05 100644
--- a/Makefile.epics
+++ b/Makefile.epics
@@ -10,6 +10,7 @@ endef
$(foreach dir, $(filter-out configure,$(DIRS)),$(eval $(call DIR_template,$(dir))))

iocBoot_DEPEND_DIRS += $(filter %App,$(DIRS))
+adsExApp_DEPEND_DIRS += adsApp

include $(TOP)/configure/RULES_TOP

0 comments on commit b805579

Please sign in to comment.