44 lines
929 B
Nix
44 lines
929 B
Nix
{ config, lib, pkgs, stdenv, linuxcnc, ethercat }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
enableParallelBuilding = true;
|
|
|
|
pname = "linuxcnc-ethercat";
|
|
version = "5ad53da25b";
|
|
name = "${pname}-${version}";
|
|
|
|
src = pkgs.fetchgit {
|
|
url = "https://git.dripco.eu/nic/linuxcnc-ethercat.git";
|
|
rev = "5ad53da25bdb5633e39ae1b9b8bfa9e5acb10674";
|
|
sha256 = "SjFkcNl/4AlsMeIw5Hg9Kp5mIIV9KFUYodXV6lAi3/A=";
|
|
};
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
autoPatchelfHook
|
|
which
|
|
expat
|
|
];
|
|
|
|
buildInputs = [ linuxcnc ethercat ];
|
|
|
|
preBuild = ''
|
|
#addAutoPatchelfSearchPath ${placeholder "out"}/lib/linuxcnc/modules/
|
|
'';
|
|
|
|
installFlags = [
|
|
"prefix=${placeholder "out"}"
|
|
#"RUN_IN_PLACE=YES"
|
|
"DESTDIR=${placeholder "out"}"
|
|
"EMC2_HOME=''"
|
|
"LIBDIR=''"
|
|
"RTLIBDIR='/lib/linuxcnc/modules'"
|
|
];
|
|
|
|
|
|
meta = with lib; {
|
|
description = "LinuxCNC ethercat interop";
|
|
platforms = platforms.linux;
|
|
};
|
|
|
|
}
|