summary refs log tree commit diff
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2020-11-06 00:39:50 -0800
committerBernardo Meurer <bernardo@meurer.org>2020-11-06 00:39:50 -0800
commit7fede29d8339ad4efebfe8f9e050e89611ebb4af (patch)
tree1f4eea468f6ab95781d5a7f6b6e244cc5edb453a
parent1d78dc8a8bfc928bcfa7c0aa5df076c6b8e677e8 (diff)
downloadnixpkgs-7fede29d8339ad4efebfe8f9e050e89611ebb4af.tar
nixpkgs-7fede29d8339ad4efebfe8f9e050e89611ebb4af.tar.gz
nixpkgs-7fede29d8339ad4efebfe8f9e050e89611ebb4af.tar.bz2
nixpkgs-7fede29d8339ad4efebfe8f9e050e89611ebb4af.tar.lz
nixpkgs-7fede29d8339ad4efebfe8f9e050e89611ebb4af.tar.xz
nixpkgs-7fede29d8339ad4efebfe8f9e050e89611ebb4af.tar.zst
nixpkgs-7fede29d8339ad4efebfe8f9e050e89611ebb4af.zip
nixos/octoprint: remove references to deprecated/removed m33-fio plugin
-rw-r--r--nixos/modules/services/misc/octoprint.nix2
-rw-r--r--pkgs/applications/misc/octoprint/m33-fio-one-library.patch175
2 files changed, 1 insertions, 176 deletions
diff --git a/nixos/modules/services/misc/octoprint.nix b/nixos/modules/services/misc/octoprint.nix
index e2fbd3b401c..a69e6507305 100644
--- a/nixos/modules/services/misc/octoprint.nix
+++ b/nixos/modules/services/misc/octoprint.nix
@@ -68,7 +68,7 @@ in
       plugins = mkOption {
         default = plugins: [];
         defaultText = "plugins: []";
-        example = literalExample "plugins: with plugins; [ m33-fio stlviewer ]";
+        example = literalExample "plugins: with plugins; [ themeify stlviewer ]";
         description = "Additional plugins to be used. Available plugins are passed through the plugins input.";
       };
 
diff --git a/pkgs/applications/misc/octoprint/m33-fio-one-library.patch b/pkgs/applications/misc/octoprint/m33-fio-one-library.patch
deleted file mode 100644
index 24c9c4a80f5..00000000000
--- a/pkgs/applications/misc/octoprint/m33-fio-one-library.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 314bcebfcd1759981ce12255be29d8ae68cd400b Mon Sep 17 00:00:00 2001
-From: Nikolay Amiantov <ab@fmap.me>
-Date: Wed, 23 Nov 2016 00:40:48 +0300
-Subject: [PATCH] Build and use one version of preprocessor library
-
----
- octoprint_m33fio/__init__.py   | 73 ++----------------------------------------
- shared library source/Makefile | 62 +++--------------------------------
- 2 files changed, 6 insertions(+), 129 deletions(-)
-
-diff --git a/octoprint_m33fio/__init__.py b/octoprint_m33fio/__init__.py
-index 054870a..4d5ecc1 100755
---- a/octoprint_m33fio/__init__.py
-+++ b/octoprint_m33fio/__init__.py
-@@ -1189,78 +1189,9 @@ class M33FioPlugin(
- 		# Check if using shared library or checking if it is usable
- 		if self._settings.get_boolean(["UseSharedLibrary"]) or isUsable :
- 	
--			# Check if running on Linux
--			if platform.uname()[0].startswith("Linux") :
--
--				# Check if running on a Raspberry Pi 1
--				if platform.uname()[4].startswith("armv6l") and self.getCpuHardware() == "BCM2708" :
--	
--					# Set shared library
--					self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_arm1176jzf-s.so")
--	
--				# Otherwise check if running on a Raspberry Pi 2 or Raspberry Pi 3
--				elif platform.uname()[4].startswith("armv7l") and self.getCpuHardware() == "BCM2709" :
--	
--					# Set shared library
--					self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_arm_cortex-a7.so")
--	
--				# Otherwise check if running on an ARM7 device
--				elif platform.uname()[4].startswith("armv7") :
--	
--					# Set shared library
--					self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_arm7.so")
--	
--				# Otherwise check if using an i386 or x86-64 device
--				elif platform.uname()[4].endswith("86") or platform.uname()[4].endswith("64") :
--
--					# Check if Python is running as 32-bit
--					if platform.architecture()[0].startswith("32") :
--		
--						# Set shared library
--						self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_i386.so")
--	
--					# Otherwise check if Python is running as 64-bit
--					elif platform.architecture()[0].startswith("64") :
--		
--						# Set shared library
--						self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_x86-64.so")
--
--			# Otherwise check if running on Windows and using an i386 or x86-64 device
--			elif platform.uname()[0].startswith("Windows") and (platform.uname()[4].endswith("86") or platform.uname()[4].endswith("64")) :
-+			# Set shared library
-+			self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace('\\', '/') + "/static/libraries/libpreprocessor.so")
- 
--				# Check if Python is running as 32-bit
--				if platform.architecture()[0].startswith("32") :
--	
--					# Set shared library
--					self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_i386.dll")
--
--				# Otherwise check if Python is running as 64-bit
--				elif platform.architecture()[0].startswith("64") :
--	
--					# Set shared library
--					self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_x86-64.dll")
--
--			# Otherwise check if running on macOS and using an i386 or x86-64 device
--			elif platform.uname()[0].startswith("Darwin") and (platform.uname()[4].endswith("86") or platform.uname()[4].endswith("64")) :
--
--				# Check if Python is running as 32-bit
--				if platform.architecture()[0].startswith("32") :
--	
--					# Set shared library
--					self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_i386.dylib")
--
--				# Otherwise check if Python is running as 64-bit
--				elif platform.architecture()[0].startswith("64") :
--	
--					# Set shared library
--					self.sharedLibrary = ctypes.cdll.LoadLibrary(self._basefolder.replace("\\", "/") + "/static/libraries/preprocessor_x86-64.dylib")
--			
--			# Otherwise check if running FreeBSD
--			elif platform.uname()[0].startswith("FreeBSD") :
--			
--				# TODO: Compile FreeBSD shared library pre-processors
--				pass
--			
- 			# Check if shared library was set
- 			if self.sharedLibrary :
- 
-diff --git a/shared library source/Makefile b/shared library source/Makefile
-index 792b4f4..4c74f5c 100755
---- a/shared library source/Makefile	
-+++ b/shared library source/Makefile	
-@@ -1,68 +1,14 @@
--# Target platform options: LINUX32, LINUX64, WINDOWS32, WINDOWS64, PI, PI2, ARM7, MACOS32, MACOS64
--LIBRARY_NAME = preprocessor
--TARGET_PLATFORM = LINUX64
-+LIBRARY_NAME = libpreprocessor
- VER = .1
- 
--ifeq ($(TARGET_PLATFORM), LINUX32)
--	PROG = $(LIBRARY_NAME)_i386.so
--	CC = g++
--	CFLAGS = -fPIC -m32 -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
--endif
--
--ifeq ($(TARGET_PLATFORM), LINUX64)
--	PROG = $(LIBRARY_NAME)_x86-64.so
--	CC = g++
--	CFLAGS = -fPIC -m64 -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
--endif
--
--ifeq ($(TARGET_PLATFORM), WINDOWS32)
--	PROG = $(LIBRARY_NAME)_i386.dll
--	CC = i686-w64-mingw32-g++
--	CFLAGS = -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
--endif
--
--ifeq ($(TARGET_PLATFORM), WINDOWS64)
--	PROG = $(LIBRARY_NAME)_x86-64.dll
--	CC = x86_64-w64-mingw32-g++
--	CFLAGS = -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
--endif
--
--ifeq ($(TARGET_PLATFORM), PI)
--	PROG = $(LIBRARY_NAME)_arm1176jzf-s.so
--	CC = /opt/arm-toolchain/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
--	CFLAGS = -fPIC -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
--endif
--
--ifeq ($(TARGET_PLATFORM), PI2)
--	PROG = $(LIBRARY_NAME)_arm_cortex-a7.so
--	CC = /opt/arm-toolchain/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++
--	CFLAGS = -fPIC -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
--endif
--
--ifeq ($(TARGET_PLATFORM), ARM7)
--	PROG = $(LIBRARY_NAME)_arm7.so
--	CC = /opt/arm-toolchain/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++
--	CFLAGS = -fPIC -mcpu=generic-armv7-a -mfpu=vfp -mfloat-abi=hard -static-libgcc -O3 -Wl,-soname,$(PROG)$(VER) -static-libstdc++
--endif
--
--ifeq ($(TARGET_PLATFORM), MACOS32)
--	PROG = $(LIBRARY_NAME)_i386.dylib
--	CC = clang++
--	CFLAGS = -fPIC -m32 -stdlib=libc++ -O3 -Wl,-install_name,$(PROG)$(VER)
--
--endif
--
--ifeq ($(TARGET_PLATFORM), MACOS64)
--	PROG = $(LIBRARY_NAME)_x86-64.dylib
--	CC = clang++
--	CFLAGS = -fPIC -m64 -stdlib=libc++ -O3 -Wl,-install_name,$(PROG)$(VER)
--endif
-+PROG = $(LIBRARY_NAME).so
-+CFLAGS = -fPIC -O3 -Wl,-soname,$(PROG)$(VER)
- 
- SRCS = preprocessor.cpp gcode.cpp vector.cpp
- CFLAGS += -Wall -std=c++11 -fvisibility=hidden -shared
- 
- all:
--	$(CC) $(CFLAGS) -o ../octoprint_m33fio/static/libraries/$(PROG) $(SRCS)
-+	$(CXX) $(CFLAGS) -o ../octoprint_m33fio/static/libraries/$(PROG) $(SRCS)
- 
- clean:
- 	rm -f ../octoprint_m33fio/static/libraries/$(PROG)
--- 
-2.14.1
-