From de989d4af896253947f6453057d12ac808c6e29d Mon Sep 17 00:00:00 2001 From: Nicolas Hiillos Date: Mon, 23 Oct 2023 15:17:17 +0300 Subject: [PATCH] Rename packages --- modules/linuxcnc.nix | 8 ++++---- .../{linuxcnc-with-ethercat => linuxcnc-base}/default.nix | 6 ++---- .../fix_make.patch | 0 .../pncconf_paths.patch | 0 .../rtapi_app_setuid.patch | 0 packages/linuxcnc-ethercat/default.nix | 4 ++-- packages/linuxcnc/default.nix | 6 ++++-- 7 files changed, 12 insertions(+), 12 deletions(-) rename packages/{linuxcnc-with-ethercat => linuxcnc-base}/default.nix (97%) rename packages/{linuxcnc-with-ethercat => linuxcnc-base}/fix_make.patch (100%) rename packages/{linuxcnc-with-ethercat => linuxcnc-base}/pncconf_paths.patch (100%) rename packages/{linuxcnc-with-ethercat => linuxcnc-base}/rtapi_app_setuid.patch (100%) diff --git a/modules/linuxcnc.nix b/modules/linuxcnc.nix index bdc2584..0454429 100644 --- a/modules/linuxcnc.nix +++ b/modules/linuxcnc.nix @@ -1,12 +1,12 @@ { config, lib, pkgs, ... }: let - cfg = config.local.packages.linuxcnc-base; + cfg = config.local.packages.linuxcnc; inherit (builtins) filter map pathExists listToAttrs; in { options.local.packages.linuxcnc.enable = lib.mkEnableOption "Enable linuxcnc"; config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ linuxcnc-with-ethercat ]; + environment.systemPackages = with pkgs; [ linuxcnc ]; security.wrappers = listToAttrs (map (f: { name = f; @@ -14,8 +14,8 @@ in { setuid = true; owner = "root"; group = "root"; - source = "${pkgs.linuxcnc-with-ethercat}/bin/${f}-nosetuid"; + source = "${pkgs.linuxcnc}/bin/${f}-nosetuid"; }; - }) (filter (f: pathExists "${pkgs.linuxcnc-with-ethercat}/bin/${f}-nosetuid") pkgs.linuxcnc-with-ethercat.setuidApps)); + }) (filter (f: pathExists "${pkgs.linuxcnc}/bin/${f}-nosetuid") pkgs.linuxcnc.setuidApps)); }; } diff --git a/packages/linuxcnc-with-ethercat/default.nix b/packages/linuxcnc-base/default.nix similarity index 97% rename from packages/linuxcnc-with-ethercat/default.nix rename to packages/linuxcnc-base/default.nix index 36966c1..3eb95af 100644 --- a/packages/linuxcnc-with-ethercat/default.nix +++ b/packages/linuxcnc-base/default.nix @@ -1,8 +1,7 @@ { lib, stdenv, autoreconfHook, wrapGAppsHook, qt5, makeWrapper, fetchFromGitHub, libtool, pkgconfig, readline_5, ncurses, libtirpc, systemd, libmodbus, libusb, glib, gtk2, gtk3, procps, kmod, sysctl, util-linux, psmisc, intltool, tcl, tk, bwidget, tkimg, tclx, tkblt, pango, cairo, boost, espeak, gst_all_1, - python3Full, yapps, gobject-introspection, libGLU, xorg, libepoxy, hicolor-icon-theme, glxinfo, bash, - hal-cia402, linuxcnc-ethercat + python3Full, yapps, gobject-introspection, libGLU, xorg, libepoxy, hicolor-icon-theme, glxinfo, bash }: let pythonPkg = (python3Full.withPackages (ps: [ @@ -24,7 +23,7 @@ in stdenv.mkDerivation rec { hardeningDisable = [ "all" ]; enableParallelBuilding = true; - pname = "linuxcnc"; + pname = "linuxcnc-base"; version = "2.9-git"; name = "${pname}-${version}"; @@ -51,7 +50,6 @@ stdenv.mkDerivation rec { psmisc intltool tcl tk bwidget tkimg tclx tkblt pango cairo pythonPkg.pkgs.pygobject3 gobject-introspection boost_python pythonPkg.pkgs.boost pythonPkg qt5.qtbase espeak gst_all_1.gstreamer ncurses readline_5 libGLU xorg.libXmu libepoxy hicolor-icon-theme glxinfo - hal-cia402 linuxcnc-ethercat ]; preAutoreconf = '' diff --git a/packages/linuxcnc-with-ethercat/fix_make.patch b/packages/linuxcnc-base/fix_make.patch similarity index 100% rename from packages/linuxcnc-with-ethercat/fix_make.patch rename to packages/linuxcnc-base/fix_make.patch diff --git a/packages/linuxcnc-with-ethercat/pncconf_paths.patch b/packages/linuxcnc-base/pncconf_paths.patch similarity index 100% rename from packages/linuxcnc-with-ethercat/pncconf_paths.patch rename to packages/linuxcnc-base/pncconf_paths.patch diff --git a/packages/linuxcnc-with-ethercat/rtapi_app_setuid.patch b/packages/linuxcnc-base/rtapi_app_setuid.patch similarity index 100% rename from packages/linuxcnc-with-ethercat/rtapi_app_setuid.patch rename to packages/linuxcnc-base/rtapi_app_setuid.patch diff --git a/packages/linuxcnc-ethercat/default.nix b/packages/linuxcnc-ethercat/default.nix index 36f78cc..23725c1 100644 --- a/packages/linuxcnc-ethercat/default.nix +++ b/packages/linuxcnc-ethercat/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, stdenv, linuxcnc, etherlab }: +{ config, lib, pkgs, stdenv, linuxcnc-base, etherlab }: stdenv.mkDerivation rec { enableParallelBuilding = true; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = with pkgs; [ which expat ]; - buildInputs = [ linuxcnc etherlab.ethercat ]; + buildInputs = [ linuxcnc-base etherlab.ethercat ]; installFlags = [ "DESTDIR=${placeholder "out"}" ]; diff --git a/packages/linuxcnc/default.nix b/packages/linuxcnc/default.nix index 3eb95af..36966c1 100644 --- a/packages/linuxcnc/default.nix +++ b/packages/linuxcnc/default.nix @@ -1,7 +1,8 @@ { lib, stdenv, autoreconfHook, wrapGAppsHook, qt5, makeWrapper, fetchFromGitHub, libtool, pkgconfig, readline_5, ncurses, libtirpc, systemd, libmodbus, libusb, glib, gtk2, gtk3, procps, kmod, sysctl, util-linux, psmisc, intltool, tcl, tk, bwidget, tkimg, tclx, tkblt, pango, cairo, boost, espeak, gst_all_1, - python3Full, yapps, gobject-introspection, libGLU, xorg, libepoxy, hicolor-icon-theme, glxinfo, bash + python3Full, yapps, gobject-introspection, libGLU, xorg, libepoxy, hicolor-icon-theme, glxinfo, bash, + hal-cia402, linuxcnc-ethercat }: let pythonPkg = (python3Full.withPackages (ps: [ @@ -23,7 +24,7 @@ in stdenv.mkDerivation rec { hardeningDisable = [ "all" ]; enableParallelBuilding = true; - pname = "linuxcnc-base"; + pname = "linuxcnc"; version = "2.9-git"; name = "${pname}-${version}"; @@ -50,6 +51,7 @@ stdenv.mkDerivation rec { psmisc intltool tcl tk bwidget tkimg tclx tkblt pango cairo pythonPkg.pkgs.pygobject3 gobject-introspection boost_python pythonPkg.pkgs.boost pythonPkg qt5.qtbase espeak gst_all_1.gstreamer ncurses readline_5 libGLU xorg.libXmu libepoxy hicolor-icon-theme glxinfo + hal-cia402 linuxcnc-ethercat ]; preAutoreconf = ''