From 184454b69580ed8baf430aa8d5e783ee031d64fb Mon Sep 17 00:00:00 2001 From: Nicolas Hiillos Date: Wed, 27 Sep 2023 18:09:55 +0300 Subject: [PATCH] Add linuxcnc-ethercat --- modules/linuxcnc.nix | 2 +- packages/linuxcnc-ethercat/default.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 packages/linuxcnc-ethercat/default.nix diff --git a/modules/linuxcnc.nix b/modules/linuxcnc.nix index 0454429..d3cd7e6 100644 --- a/modules/linuxcnc.nix +++ b/modules/linuxcnc.nix @@ -6,7 +6,7 @@ in { options.local.packages.linuxcnc.enable = lib.mkEnableOption "Enable linuxcnc"; config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ linuxcnc ]; + environment.systemPackages = with pkgs; [ linuxcnc linuxcnc-ethercat ]; security.wrappers = listToAttrs (map (f: { name = f; diff --git a/packages/linuxcnc-ethercat/default.nix b/packages/linuxcnc-ethercat/default.nix new file mode 100644 index 0000000..ce8229a --- /dev/null +++ b/packages/linuxcnc-ethercat/default.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, stdenv, linuxcnc, fetchGit }: + +stdenv.mkDerivation rec { + enableParalellBuilding = true; + + pname = "linuxcnc-ethercat"; + version = "5ad53da25b"; + name = "${pname}-${version}"; + + src = fetchGit { + url = "https://git.dripco.eu/nic/linuxcnc-ethercat.git"; + ref = "master"; + rev = "5ad53da25bdb5633e39ae1b9b8bfa9e5acb10674"; + #ref = "refs/tags/1.9"; + #sha256 = lib.fakeSha256; + }; + + buildInputs = [ linuxcnc ]; + + meta = with lib; { + description = "LinuxCNC ethercat interop"; + platforms = platforms.linux; + }; + +}