From 04d283ecda196e8b208f983480f6d981554ae535 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sat, 18 Aug 2018 20:32:12 +0200 Subject: [PATCH] molden: patch to deactivate extension installer script --- .../science/chemistry/molden/default.nix | 2 ++ .../molden/dont_register_file_types.patch | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/applications/science/chemistry/molden/dont_register_file_types.patch diff --git a/pkgs/applications/science/chemistry/molden/default.nix b/pkgs/applications/science/chemistry/molden/default.nix index 3880b69fa19..76a19d410ef 100644 --- a/pkgs/applications/science/chemistry/molden/default.nix +++ b/pkgs/applications/science/chemistry/molden/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ which ]; buildInputs = [ gfortran libGLU xorg.libX11 xorg.libXmu ]; + patches = [ ./dont_register_file_types.patch ]; + postPatch = '' substituteInPlace ./makefile --replace '-L/usr/X11R6/lib' "" \ --replace '-I/usr/X11R6/include' "" \ diff --git a/pkgs/applications/science/chemistry/molden/dont_register_file_types.patch b/pkgs/applications/science/chemistry/molden/dont_register_file_types.patch new file mode 100644 index 00000000000..75ce593ed29 --- /dev/null +++ b/pkgs/applications/science/chemistry/molden/dont_register_file_types.patch @@ -0,0 +1,29 @@ +diff --git a/makefile b/makefile +index 58a9e74..64615b6 100644 +--- a/makefile ++++ b/makefile +@@ -32,8 +32,6 @@ os := + ifeq ($(uname), Linux) + os := $(shell head -n 1 /etc/issue | cut -d" " -f1) + ifeq ($(os), Ubuntu) +- EXTEN = exten +- EXTENZ = exten2 + LIBSG = -L/usr/X11R6/lib -lGLU -lGL -lX11 -lm + endif + ifeq ($(os), Debian) +@@ -278,7 +276,7 @@ LIBSOGL = -lglut -lGLU -lGL -lXmu -lX11 -lm + # + #LIBSG = -L/usr/X11R6/lib -Wl,-framework -Wl,GLUT -Wl,-framework -Wl,OpenGL -Wl,-framework -Wl,Cocoa -lGLU -lGL -lXmu -lX11 -lm + +-all: molden gmolden ambfor/ambfor ambfor/ambmd surf/surf $(EXTEN) ++all: molden gmolden ambfor/ambfor ambfor/ambmd surf/surf + xwin.o: xwin.c rots.h + xwingl.o: xwin.c rots.h + +@@ -344,5 +342,5 @@ exten: + exten2: + ./register_extension.sh /usr/local/bin + +-install: $(EXTENZ) ++install: + sudo install -t /usr/local/bin -m 755 molden gmolden ambfor/ambfor ambfor/ambmd surf/surf