summaryrefslogtreecommitdiffstats
path: root/pkgs/desktops/gnustep
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2016-08-16 20:51:27 +0000
committerMatthew Bauer <mjbauer95@gmail.com>2016-08-16 21:53:45 +0000
commit2e5edbfd99c4eb01cdb08e6735879701dbdc2fc7 (patch)
tree14d2fcc8293f1992b98293e3283c4deab0e5b731 /pkgs/desktops/gnustep
parent63bd635f80a033581f4bfa5554b861cb90268792 (diff)
gnustep: move to pkgs/desktops/gnustep
Diffstat (limited to 'pkgs/desktops/gnustep')
-rw-r--r--pkgs/desktops/gnustep/back/default.nix22
-rw-r--r--pkgs/desktops/gnustep/back/fixup-tools.patch14
-rw-r--r--pkgs/desktops/gnustep/base/default.nix38
-rw-r--r--pkgs/desktops/gnustep/base/fixup-base-makefile-installdir.patch29
-rw-r--r--pkgs/desktops/gnustep/base/fixup-paths.patch373
-rw-r--r--pkgs/desktops/gnustep/default.nix21
-rw-r--r--pkgs/desktops/gnustep/gorm/default.nix17
-rw-r--r--pkgs/desktops/gnustep/gorm/fix-gs-makefiles.patch27
-rw-r--r--pkgs/desktops/gnustep/gui/default.nix16
-rw-r--r--pkgs/desktops/gnustep/gui/fixup-all.patch56
-rw-r--r--pkgs/desktops/gnustep/gui/fixup-gui-makefile-installdir.patch28
-rw-r--r--pkgs/desktops/gnustep/gui/fixup-gui-textconverters-preamble.patch11
-rw-r--r--pkgs/desktops/gnustep/gui/fixup-gui-tools-preamble.patch14
-rw-r--r--pkgs/desktops/gnustep/gworkspace/default.nix23
-rw-r--r--pkgs/desktops/gnustep/libobjc2/default.nix28
-rw-r--r--pkgs/desktops/gnustep/make/GNUstep.conf126
-rw-r--r--pkgs/desktops/gnustep/make/builder.sh122
-rw-r--r--pkgs/desktops/gnustep/make/default.nix25
-rw-r--r--pkgs/desktops/gnustep/make/fixup-paths.patch197
-rw-r--r--pkgs/desktops/gnustep/make/gs-makefiles-additional.patch145
-rw-r--r--pkgs/desktops/gnustep/make/gsmakeDerivation.nix19
-rw-r--r--pkgs/desktops/gnustep/make/setup-hook.sh77
-rw-r--r--pkgs/desktops/gnustep/make/wrapper.sh4
-rw-r--r--pkgs/desktops/gnustep/projectcenter/default.nix23
-rw-r--r--pkgs/desktops/gnustep/projectcenter/fixup-preamble.patch14
-rw-r--r--pkgs/desktops/gnustep/systempreferences/default.nix17
26 files changed, 1486 insertions, 0 deletions
diff --git a/pkgs/desktops/gnustep/back/default.nix b/pkgs/desktops/gnustep/back/default.nix
new file mode 100644
index 000000000000..8e11a2862841
--- /dev/null
+++ b/pkgs/desktops/gnustep/back/default.nix
@@ -0,0 +1,22 @@
+{ gsmakeDerivation
+, cairo
+, fetchurl
+, base, gui
+, x11
+, freetype
+, pkgconfig
+}:
+let
+ version = "0.25.0";
+in
+gsmakeDerivation {
+ name = "gnustep-back-${version}";
+ src = fetchurl {
+ url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-back-${version}.tar.gz";
+ sha256 = "14gs1b32ahnihd7mwpjrws2b8hl11rl1wl24a7651d3z2l7f6xj2";
+ };
+ buildInputs = [ cairo base gui freetype pkgconfig x11 ];
+ meta = {
+ description = "A generic backend for GNUstep";
+ };
+}
diff --git a/pkgs/desktops/gnustep/back/fixup-tools.patch b/pkgs/desktops/gnustep/back/fixup-tools.patch
new file mode 100644
index 000000000000..a47de5478e36
--- /dev/null
+++ b/pkgs/desktops/gnustep/back/fixup-tools.patch
@@ -0,0 +1,14 @@
+diff -c gnustep-back-0.24.0/Tools/GNUmakefile.preamble gnustep-back-0.24.0.patched/Tools/GNUmakefile.preamble
+--- gnustep-back-0.24.0/Tools/GNUmakefile.preamble 2013-07-04 22:44:28.000000000 +0600
++++ gnustep-back-0.24.0.patched/Tools/GNUmakefile.preamble 2014-12-01 16:40:37.000000000 +0600
+@@ -52,6 +52,9 @@
+ # Additional libraries when linking applications
+ #ADDITIONAL_GUI_LIBS +=
+
++# Additional libraries when linking tools
++gpbs_TOOL_LIBS += -lgnustep-gui -lgnustep-base $(SYSTEM_LIBS)
++
+ #
+ # Flags dealing with installing and uninstalling
+ #
+
diff --git a/pkgs/desktops/gnustep/base/default.nix b/pkgs/desktops/gnustep/base/default.nix
new file mode 100644
index 000000000000..4d9f763acc4e
--- /dev/null
+++ b/pkgs/desktops/gnustep/base/default.nix
@@ -0,0 +1,38 @@
+{ aspell, audiofile
+, gsmakeDerivation
+, cups
+, fetchurl
+, gmp, gnutls
+, libffi
+, libjpeg, libtiff, libpng, giflib, libungif
+, libxml2, libxslt, libiconv
+, libobjc, libgcrypt
+, icu
+, pkgconfig, portaudio
+}:
+let
+ version = "1.24.9";
+in
+gsmakeDerivation {
+ name = "gnustep-base-${version}";
+ src = fetchurl {
+ url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-base-${version}.tar.gz";
+ sha256 = "1vvjlbqmlwr82b4pf8c62rxjgz475bmg0x2yd0bbkia6yvwhk585";
+ };
+ nativeBuildInputs = [ pkgconfig ];
+ propagatedBuildInputs = [
+ aspell audiofile
+ cups
+ gmp gnutls
+ libffi
+ libjpeg libtiff libpng giflib libungif
+ libxml2 libxslt libiconv
+ libobjc libgcrypt
+ icu
+ portaudio
+ ];
+ patches = [ ./fixup-paths.patch ];
+ meta = {
+ description = "An implementation of AppKit and Foundation libraries of OPENSTEP and Cocoa";
+ };
+}
diff --git a/pkgs/desktops/gnustep/base/fixup-base-makefile-installdir.patch b/pkgs/desktops/gnustep/base/fixup-base-makefile-installdir.patch
new file mode 100644
index 000000000000..482c72a51904
--- /dev/null
+++ b/pkgs/desktops/gnustep/base/fixup-base-makefile-installdir.patch
@@ -0,0 +1,29 @@
+--- gnustep-base-1.24.7/Makefile.postamble 2011-07-15 19:53:45.000000000 +0600
++++ gnustep-base-1.24.7.patched/Makefile.postamble 2014-11-29 22:25:07.000000000 +0600
+@@ -38,13 +38,13 @@
+ # Things to do after compiling
+ # after-all::
+
+-$(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional:
+- $(ECHO_CREATING)$(MKDIRS) $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional$(END_ECHO)
++$(DESTDIR_GNUSTEP_MAKEFILES)/Additional:
++ $(ECHO_CREATING)$(MKDIRS) $(DESTDIR_GNUSTEP_MAKEFILES)/Additional$(END_ECHO)
+
+ # Things to do before installing
+-before-install:: $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
++before-install:: $(DESTDIR_GNUSTEP_MAKEFILES)/Additional
+ $(ECHO_NOTHING)$(INSTALL_DATA) base.make \
+- $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
++ $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
+
+ # Things to do after installing
+ # after-install::
+@@ -54,7 +54,7 @@
+
+ # Things to do after uninstalling
+ after-uninstall::
+- $(ECHO_NOTHING)rm -f $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
++ $(ECHO_NOTHING)rm -f $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
+
+ # Things to do before cleaning
+ # before-clean::
diff --git a/pkgs/desktops/gnustep/base/fixup-paths.patch b/pkgs/desktops/gnustep/base/fixup-paths.patch
new file mode 100644
index 000000000000..fa28412dbf62
--- /dev/null
+++ b/pkgs/desktops/gnustep/base/fixup-paths.patch
@@ -0,0 +1,373 @@
+diff -r -u gnustep-base-1.24.7/Makefile.postamble gnustep-base-1.24.7.patched/Makefile.postamble
+--- gnustep-base-1.24.7/Makefile.postamble 2011-07-15 19:53:45.000000000 +0600
++++ gnustep-base-1.24.7.patched/Makefile.postamble 2014-11-29 22:25:07.000000000 +0600
+@@ -38,13 +38,13 @@
+ # Things to do after compiling
+ # after-all::
+
+-$(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional:
+- $(ECHO_CREATING)$(MKDIRS) $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional$(END_ECHO)
++$(DESTDIR_GNUSTEP_MAKEFILES)/Additional:
++ $(ECHO_CREATING)$(MKDIRS) $(DESTDIR_GNUSTEP_MAKEFILES)/Additional$(END_ECHO)
+
+ # Things to do before installing
+-before-install:: $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
++before-install:: $(DESTDIR_GNUSTEP_MAKEFILES)/Additional
+ $(ECHO_NOTHING)$(INSTALL_DATA) base.make \
+- $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
++ $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
+
+ # Things to do after installing
+ # after-install::
+@@ -54,7 +54,7 @@
+
+ # Things to do after uninstalling
+ after-uninstall::
+- $(ECHO_NOTHING)rm -f $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
++ $(ECHO_NOTHING)rm -f $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/base.make$(END_ECHO)
+
+ # Things to do before cleaning
+ # before-clean::
+diff -r -u gnustep-base-1.24.7/Source/NSPathUtilities.m gnustep-base-1.24.7.patched/Source/NSPathUtilities.m
+--- gnustep-base-1.24.7/Source/NSPathUtilities.m 2014-01-14 13:21:10.000000000 +0600
++++ gnustep-base-1.24.7.patched/Source/NSPathUtilities.m 2015-01-25 13:59:37.000000000 +0600
+@@ -153,16 +153,27 @@
+ static NSString *gnustepLocalUsersDir = nil;
+
+ static NSString *gnustepSystemApps = nil;
++static NSArray *gnustepSystemAppsNix = nil;
+ static NSString *gnustepSystemAdminApps = nil;
++static NSArray *gnustepSystemAdminAppsNix = nil;
+ static NSString *gnustepSystemWebApps = nil;
++static NSArray *gnustepSystemWebAppsNix = nil;
+ static NSString *gnustepSystemTools = nil;
++static NSArray *gnustepSystemToolsNix = nil;
+ static NSString *gnustepSystemAdminTools = nil;
++static NSArray *gnustepSystemAdminToolsNix = nil;
+ static NSString *gnustepSystemLibrary = nil;
++static NSArray *gnustepSystemLibraryNix = nil;
+ static NSString *gnustepSystemLibraries = nil;
++static NSArray *gnustepSystemLibrariesNix = nil;
+ static NSString *gnustepSystemHeaders = nil;
++static NSArray *gnustepSystemHeadersNix = nil;
+ static NSString *gnustepSystemDocumentation = nil;
++static NSArray *gnustepSystemDocumentationNix = nil;
+ static NSString *gnustepSystemDocumentationInfo = nil;
++static NSArray *gnustepSystemDocumentationInfoNix = nil;
+ static NSString *gnustepSystemDocumentationMan = nil;
++static NSArray *gnustepSystemDocumentationManNix = nil;
+
+ static NSString *gnustepNetworkApps = nil;
+ static NSString *gnustepNetworkAdminApps = nil;
+@@ -258,6 +269,18 @@
+ }\
+ })
+
++/* Like ASSIGN_PATH, but permits multiple components in a path
++ */
++#define ASSIGN_PATH_NIX(var, dictionary, key) ({\
++ id val = getPathConfigNix(dictionary, key);\
++ if (val != nil)\
++ {\
++ RELEASE(var);\
++ var = RETAIN(val);\
++ [dictionary removeObjectForKey: key];\
++ }\
++})
++
+ /* Like ASSIGN_PATH(), but permits the result to be a relative path as that
+ * is what we normally use (the path is within the user's home directory).
+ */
+@@ -368,7 +391,7 @@
+ /* Get a full path string */
+ static inline NSString *
+ getPath(NSString *path)
+-{
++{
+ if ([path hasPrefix: @"./"] == YES)
+ {
+ path = [gnustepConfigPath stringByAppendingPathComponent:
+@@ -383,6 +406,33 @@
+ return path;
+ }
+
++static inline NSArray *
++getPathConfigNix(NSDictionary *dict, NSString *key)
++{
++ NSArray *res = nil;
++ NSMutableArray *paths = nil;
++ NSString *path;
++#if defined(__MINGW_)
++ NSString *sep = @";";
++#else
++ NSString *sep = @":";
++#endif
++
++ path = [dict objectForKey: key];
++ if (path != nil)
++ {
++ if ([path rangeOfString:sep].location != NSNotFound)
++ {
++ res = [path componentsSeparatedByString:sep];
++ }
++ else
++ {
++ res = [[NSArray alloc] initWithObjects:path, nil];
++ }
++ }
++ return res;
++}
++
+ /* Get a full path string from a dictionary */
+ static inline NSString *
+ getPathConfig(NSDictionary *dict, NSString *key)
+@@ -468,6 +518,29 @@
+ ASSIGN_PATH(gnustepSystemDocumentationInfo, c,
+ @"GNUSTEP_SYSTEM_DOC_INFO");
+
++ ASSIGN_PATH_NIX(gnustepSystemAppsNix, c,
++ @"NIX_GNUSTEP_SYSTEM_APPS");
++ ASSIGN_PATH_NIX(gnustepSystemAdminAppsNix, c,
++ @"NIX_GNUSTEP_SYSTEM_ADMIN_APPS");
++ ASSIGN_PATH_NIX(gnustepSystemWebAppsNix, c,
++ @"NIX_GNUSTEP_SYSTEM_WEB_APPS");
++ ASSIGN_PATH_NIX(gnustepSystemToolsNix, c,
++ @"NIX_GNUSTEP_SYSTEM_TOOLS");
++ ASSIGN_PATH_NIX(gnustepSystemAdminToolsNix, c,
++ @"NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS");
++ ASSIGN_PATH_NIX(gnustepSystemLibraryNix, c,
++ @"NIX_GNUSTEP_SYSTEM_LIBRARY");
++ ASSIGN_PATH_NIX(gnustepSystemLibrariesNix, c,
++ @"NIX_GNUSTEP_SYSTEM_LIBRARIES");
++ ASSIGN_PATH_NIX(gnustepSystemHeadersNix, c,
++ @"NIX_GNUSTEP_SYSTEM_HEADERS");
++ ASSIGN_PATH_NIX(gnustepSystemDocumentationNix, c,
++ @"NIX_GNUSTEP_SYSTEM_DOC");
++ ASSIGN_PATH_NIX(gnustepSystemDocumentationManNix, c,
++ @"NIX_GNUSTEP_SYSTEM_DOC_MAN");
++ ASSIGN_PATH_NIX(gnustepSystemDocumentationInfoNix, c,
++ @"NIX_GNUSTEP_SYSTEM_DOC_INFO");
++
+ ASSIGN_PATH(gnustepNetworkApps, c,
+ @"GNUSTEP_NETWORK_APPS");
+ ASSIGN_PATH(gnustepNetworkAdminApps, c,
+@@ -1235,6 +1308,18 @@
+ DESTROY(gnustepSystemDocumentationMan);
+ DESTROY(gnustepSystemDocumentationInfo);
+
++ DESTROY(gnustepSystemAppsNix);
++ DESTROY(gnustepSystemAdminAppsNix);
++ DESTROY(gnustepSystemWebAppsNix);
++ DESTROY(gnustepSystemToolsNix);
++ DESTROY(gnustepSystemAdminToolsNix);
++ DESTROY(gnustepSystemLibraryNix);
++ DESTROY(gnustepSystemLibrariesNix);
++ DESTROY(gnustepSystemHeadersNix);
++ DESTROY(gnustepSystemDocumentationNix);
++ DESTROY(gnustepSystemDocumentationManNix);
++ DESTROY(gnustepSystemDocumentationInfoNix);
++
+ DESTROY(gnustepNetworkApps);
+ DESTROY(gnustepNetworkAdminApps);
+ DESTROY(gnustepNetworkWebApps);
+@@ -2183,6 +2268,27 @@
+ if ([add_dir length] > 0 && [paths containsObject: add_dir] == NO) \
+ [paths addObject: add_dir]; \
+ }
++#define ADD_PATH_NIX(mask, base_dirs, add_dir) \
++if ((domainMask & mask) && (base_dirs != nil)) \
++{ \
++ NSEnumerator *e = [base_dirs objectEnumerator]; \
++ NSString *dir = nil; \
++ while (dir = [e nextObject]) { \
++ path = [dir stringByAppendingPathComponent: add_dir]; \
++ if ([path length] > 0 && [paths containsObject: path] == NO) \
++ [paths addObject: path]; \
++ } \
++}
++#define ADD_PLATFORM_PATH_NIX(mask, add_dirs) \
++if ((domainMask & mask) && (add_dirs != nil)) \
++{ \
++ NSEnumerator *e = [add_dirs objectEnumerator]; \
++ NSString *dir = nil; \
++ while (dir = [e nextObject]) { \
++ if ([dir length] > 0 && [paths containsObject: dir] == NO) \
++ [paths addObject:dir]; \
++ } \
++}
+
+ switch (directoryKey)
+ {
+@@ -2191,11 +2297,13 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAppsNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
+
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserAdminApps);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalAdminApps);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkAdminApps);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminAppsNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemAdminApps);
+ }
+ break;
+@@ -2205,6 +2313,7 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAppsNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
+ }
+ break;
+@@ -2214,6 +2323,7 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAppsNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
+
+ /* I imagine if ever wanted a separate Demo directory, the
+@@ -2231,6 +2341,7 @@
+
+ case NSCoreServicesDirectory:
+ {
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix, @"CoreServices");
+ ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"CoreServices");
+ }
+ break;
+@@ -2248,6 +2359,7 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserApps);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalApps);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkApps);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAppsNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemApps);
+ }
+ break;
+@@ -2257,6 +2369,7 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserAdminApps);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalAdminApps);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkAdminApps);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminAppsNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemAdminApps);
+ }
+ break;
+@@ -2266,6 +2379,7 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserLibrary);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalLibrary);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkLibrary);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibrary);
+ }
+ break;
+@@ -2281,6 +2395,7 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserLibrary);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalLibrary);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkLibrary);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibrary);
+ }
+ break;
+@@ -2418,6 +2533,7 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserDocumentation);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalDocumentation);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkDocumentation);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemDocumentationNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemDocumentation);
+ }
+ break;
+@@ -2449,6 +2565,7 @@
+ ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Caches");
+ ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Caches");
+ ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Caches");
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix, @"Caches");
+ ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Caches");
+ }
+ break;
+@@ -2460,6 +2577,8 @@
+ @"ApplicationSupport");
+ ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary,
+ @"ApplicationSupport");
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix,
++ @"ApplicationSupport");
+ ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary,
+ @"ApplicationSupport");
+ }
+@@ -2471,6 +2590,7 @@
+ ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Frameworks");
+ ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Frameworks");
+ ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Frameworks");
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix, @"Frameworks");
+ ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Frameworks");
+ }
+ break;
+@@ -2480,6 +2600,7 @@
+ ADD_PATH(NSUserDomainMask, gnustepUserLibrary, @"Fonts");
+ ADD_PATH(NSLocalDomainMask, gnustepLocalLibrary, @"Fonts");
+ ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibrary, @"Fonts");
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibraryNix, @"Fonts");
+ ADD_PATH(NSSystemDomainMask, gnustepSystemLibrary, @"Fonts");
+ }
+ break;
+@@ -2518,6 +2639,12 @@
+ if (part)
+ ADD_PATH(NSNetworkDomainMask, gnustepNetworkLibraries, part);
+
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemLibrariesNix);
++ if (full)
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibrariesNix, full);
++ if (part)
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemLibrariesNix, part);
++
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemLibraries);
+ if (full)
+ ADD_PATH(NSSystemDomainMask, gnustepSystemLibraries, full);
+@@ -2560,6 +2687,12 @@
+ if (part)
+ ADD_PATH(NSNetworkDomainMask, gnustepNetworkTools, part);
+
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemToolsNix);
++ if (full)
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemToolsNix, full);
++ if (part)
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemToolsNix, part);
++
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemTools);
+ if (full)
+ ADD_PATH(NSSystemDomainMask, gnustepSystemTools, full);
+@@ -2602,6 +2735,18 @@
+ if (part)
+ ADD_PATH(NSNetworkDomainMask, gnustepNetworkAdminTools, part);
+
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix);
++ if (full)
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix, full);
++ if (part)
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix, part);
++
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix);
++ if (full)
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix, full);
++ if (part)
++ ADD_PATH_NIX(NSSystemDomainMask, gnustepSystemAdminToolsNix, part);
++
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemAdminTools);
+ if (full)
+ ADD_PATH(NSSystemDomainMask, gnustepSystemAdminTools, full);
+@@ -2615,6 +2760,7 @@
+ ADD_PLATFORM_PATH(NSUserDomainMask, gnustepUserWebApps);
+ ADD_PLATFORM_PATH(NSLocalDomainMask, gnustepLocalWebApps);
+ ADD_PLATFORM_PATH(NSNetworkDomainMask, gnustepNetworkWebApps);
++ ADD_PLATFORM_PATH_NIX(NSSystemDomainMask, gnustepSystemWebAppsNix);
+ ADD_PLATFORM_PATH(NSSystemDomainMask, gnustepSystemWebApps);
+ }
+ break;
+@@ -2622,6 +2768,8 @@
+
+ #undef ADD_PATH
+ #undef ADD_PLATFORM_PATH
++#undef ADD_PATH_NIX
++#undef ADD_PLATFORM_PATH_NIX
+
+ count = [paths count];
+ for (i = 0; i < count; i++)
diff --git a/pkgs/desktops/gnustep/default.nix b/pkgs/desktops/gnustep/default.nix
new file mode 100644
index 000000000000..ac324bc89a85
--- /dev/null
+++ b/pkgs/desktops/gnustep/default.nix
@@ -0,0 +1,21 @@
+{ pkgs, newScope }:
+
+let
+ callPackage = newScope self;
+
+ self = rec {
+ stdenv = pkgs.clangStdenv;
+
+ gsmakeDerivation = callPackage ./make/gsmakeDerivation.nix {};
+ gorm = callPackage ./gorm {};
+ projectcenter = callPackage ./projectcenter {};
+ system_preferences = callPackage ./systempreferences {};
+ libobjc = callPackage ./libobjc2 {};
+ make = callPackage ./make {};
+ back = callPackage ./back {};
+ base = callPackage ./base { giflib = pkgs.giflib_4_1; };
+ gui = callPackage ./gui {};
+ gworkspace = callPackage ./gworkspace {};
+ };
+
+in self
diff --git a/pkgs/desktops/gnustep/gorm/default.nix b/pkgs/desktops/gnustep/gorm/default.nix
new file mode 100644
index 000000000000..5075ec5500c1
--- /dev/null
+++ b/pkgs/desktops/gnustep/gorm/default.nix
@@ -0,0 +1,17 @@
+{ fetchurl, base, back, gsmakeDerivation, gui }:
+let
+ version = "1.2.22";
+in
+gsmakeDerivation {
+ name = "gorm-${version}";
+
+ src = fetchurl {
+ url = "ftp://ftp.gnustep.org/pub/gnustep/dev-apps/gorm-${version}.tar.gz";
+ sha256 = "1mq5n65xd9bc4kppx19iijsgpz4crvhg7bfwbi9k78j159vclnmi";
+ };
+ buildInputs = [ base back gui ];
+
+ meta = {
+ description = "Graphical Object Relationship Modeller is an easy-to-use interface designer for GNUstep";
+ };
+}
diff --git a/pkgs/desktops/gnustep/gorm/fix-gs-makefiles.patch b/pkgs/desktops/gnustep/gorm/fix-gs-makefiles.patch
new file mode 100644
index 000000000000..c4b3d1e1d815
--- /dev/null
+++ b/pkgs/desktops/gnustep/gorm/fix-gs-makefiles.patch
@@ -0,0 +1,27 @@
+diff -ru gorm-1.2.20/GNUmakefile gorm-1.2.20.patched/GNUmakefile
+--- gorm-1.2.20/GNUmakefile 2010-05-30 12:55:26.000000000 +0600
++++ gorm-1.2.20.patched/GNUmakefile 2014-12-10 22:21:18.000000000 +0600
+@@ -24,6 +24,23 @@
+ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ #
+
++ifeq ($(GNUSTEP_MAKEFILES),)
++ GNUSTEP_MAKEFILES := $(shell gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null)
++ ifeq ($(GNUSTEP_MAKEFILES),)
++ $(warning )
++ $(warning Unable to obtain GNUSTEP_MAKEFILES setting from gnustep-config!)
++ $(warning Perhaps gnustep-make is not properly installed,)
++ $(warning so gnustep-config is not in your PATH.)
++ $(warning )
++ $(warning Your PATH is currently $(PATH))
++ $(warning )
++ endif
++endif
++
++ifeq ($(GNUSTEP_MAKEFILES),)
++ $(error You need to set GNUSTEP_MAKEFILES before compiling!)
++endif
++
+ PACKAGE_NAME = gorm
+ export PACKAGE_NAME
+ include $(GNUSTEP_MAKEFILES)/common.make
diff --git a/pkgs/desktops/gnustep/gui/default.nix b/pkgs/desktops/gnustep/gui/default.nix
new file mode 100644
index 000000000000..a28fef8f3d99
--- /dev/null
+++ b/pkgs/desktops/gnustep/gui/default.nix
@@ -0,0 +1,16 @@
+{ gsmakeDerivation, fetchurl, base }:
+let
+ version = "0.25.0";
+in
+gsmakeDerivation {
+ name = "gnustep-gui-${version}";
+ src = fetchurl {
+ url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-gui-${version}.tar.gz";
+ sha256 = "10jf3xir59qzbhhl0bvs9wdw40fsmvv6mdv5akdkia1rnck60xf5";
+ };
+ buildInputs = [ base ];
+ patches = [ ./fixup-all.patch ];
+ meta = {
+ description = "A GUI class library of GNUstep";
+ };
+}
diff --git a/pkgs/desktops/gnustep/gui/fixup-all.patch b/pkgs/desktops/gnustep/gui/fixup-all.patch
new file mode 100644
index 000000000000..4b412db409ae
--- /dev/null
+++ b/pkgs/desktops/gnustep/gui/fixup-all.patch
@@ -0,0 +1,56 @@
+diff -r -u gnustep-gui-0.24.0/GNUmakefile.postamble gnustep-gui-0.24.0.patched/GNUmakefile.postamble
+--- gnustep-gui-0.24.0/GNUmakefile.postamble 2010-05-17 22:38:59.000000000 +0600
++++ gnustep-gui-0.24.0.patched/GNUmakefile.postamble 2014-12-01 13:44:05.000000000 +0600
+@@ -40,20 +40,20 @@
+ # The following rule is important mainly for packaging, because in that case
+ # you install into a fake system tree, and the directory is not there.
+ #
+-$(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional:
+- $(MKDIRS) $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
++$(DESTDIR_GNUSTEP_MAKEFILES)/Additional:
++ $(MKDIRS) $(DESTDIR_GNUSTEP_MAKEFILES)/Additional
+
+ # Things to do before installing
+-before-install:: $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
++before-install:: $(DESTDIR_GNUSTEP_MAKEFILES)/Additional
+ $(INSTALL_DATA) gui.make \
+- $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/gui.make
++ $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/gui.make
+
+ # Things to do after installing
+ # after-install::
+
+ # Things to do before uninstalling
+ before-uninstall::
+- rm -f $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/gui.make
++ rm -f $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/gui.make
+
+ # Things to do after uninstalling
+ # after-uninstall::
+diff -r -u gnustep-gui-0.24.0/TextConverters/RTF/GNUmakefile.preamble gnustep-gui-0.24.0.patched/TextConverters/RTF/GNUmakefile.preamble
+--- gnustep-gui-0.24.0/TextConverters/RTF/GNUmakefile.preamble 2008-06-10 10:01:49.000000000 +0600
++++ gnustep-gui-0.24.0.patched/TextConverters/RTF/GNUmakefile.preamble 2014-12-01 13:02:11.000000000 +0600
+@@ -49,7 +49,7 @@
+ ADDITIONAL_INCLUDE_DIRS +=-I../../Headers/Additions -I../../Headers
+
+ # Additional LDFLAGS to pass to the linker
+-#ADDITIONAL_LDFLAGS +=
++ADDITIONAL_LDFLAGS += -lgnustep-gui
+
+ # Additional library directories the linker should search
+ ADDITIONAL_LIB_DIRS += -L../../Source/$(GNUSTEP_OBJ_DIR)
+diff -r -u gnustep-gui-0.24.0/Tools/GNUmakefile.preamble gnustep-gui-0.24.0.patched/Tools/GNUmakefile.preamble
+--- gnustep-gui-0.24.0/Tools/GNUmakefile.preamble 2006-02-22 12:43:48.000000000 +0600
++++ gnustep-gui-0.24.0.patched/Tools/GNUmakefile.preamble 2014-12-01 12:52:41.000000000 +0600
+@@ -32,9 +32,11 @@
+ ADDITIONAL_LIB_DIRS += -L../Source/$(GNUSTEP_OBJ_DIR) -L../Model/$(GNUSTEP_OBJ_DIR)
+
+ # Additional libraries when linking tools
++make_services_TOOL_LIBS += -lgnustep-base
+ gpbs_TOOL_LIBS += -lgnustep-gui $(SYSTEM_LIBS)
+ set_show_service_TOOL_LIBS += -lgnustep-gui $(SYSTEM_LIBS)
+ gopen_TOOL_LIBS += -lgnustep-gui $(SYSTEM_LIBS)
++gclose_TOOL_LIBS += -lgnustep-base
+ gcloseall_TOOL_LIBS += -lgnustep-gui $(SYSTEM_LIBS)
+ GSspell_TOOL_LIBS += $(ADDITIONAL_DEPENDS)
+
diff --git a/pkgs/desktops/gnustep/gui/fixup-gui-makefile-installdir.patch b/pkgs/desktops/gnustep/gui/fixup-gui-makefile-installdir.patch
new file mode 100644
index 000000000000..30c6f56c032c
--- /dev/null
+++ b/pkgs/desktops/gnustep/gui/fixup-gui-makefile-installdir.patch
@@ -0,0 +1,28 @@
+--- gnustep-gui-0.24.0/GNUmakefile.postamble 2010-05-17 22:38:59.000000000 +0600
++++ gnustep-gui-0.24.0.patched/GNUmakefile.postamble 2014-12-01 13:44:05.000000000 +0600
+@@ -40,20 +40,20 @@
+ # The following rule is important mainly for packaging, because in that case
+ # you install into a fake system tree, and the directory is not there.
+ #
+-$(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional:
+- $(MKDIRS) $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
++$(DESTDIR_GNUSTEP_MAKEFILES)/Additional:
++ $(MKDIRS) $(DESTDIR_GNUSTEP_MAKEFILES)/Additional
+
+ # Things to do before installing
+-before-install:: $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional
++before-install:: $(DESTDIR_GNUSTEP_MAKEFILES)/Additional
+ $(INSTALL_DATA) gui.make \
+- $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/gui.make
++ $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/gui.make
+
+ # Things to do after installing
+ # after-install::
+
+ # Things to do before uninstalling
+ before-uninstall::
+- rm -f $(DESTDIR)$(GNUSTEP_MAKEFILES)/Additional/gui.make
++ rm -f $(DESTDIR_GNUSTEP_MAKEFILES)/Additional/gui.make
+
+ # Things to do after uninstalling
+ # after-uninstall::
diff --git a/pkgs/desktops/gnustep/gui/fixup-gui-textconverters-preamble.patch b/pkgs/desktops/gnustep/gui/fixup-gui-textconverters-preamble.patch
new file mode 100644
index 000000000000..23ec2db0fbd3
--- /dev/null
+++ b/pkgs/desktops/gnustep/gui/fixup-gui-textconverters-preamble.patch
@@ -0,0 +1,11 @@
+--- gnustep-gui-0.24.0/TextConverters/RTF/GNUmakefile.preamble 2008-06-10 10:01:49.000000000 +0600
++++ gnustep-gui-0.24.0.patched/TextConverters/RTF/GNUmakefile.preamble 2014-12-01 13:02:11.000000000 +0600
+@@ -49,7 +49,7 @@
+ ADDITIONAL_INCLUDE_DIRS +=-I../../Headers/Additions -I../../Headers
+
+ # Additional LDFLAGS to pass to the linker
+-#ADDITIONAL_LDFLAGS +=
++ADDITIONAL_LDFLAGS += -lgnustep-gui
+
+ # Additional library directories the linker should search
+ ADDITIONAL_LIB_DIRS += -L../../Source/$(GNUSTEP_OBJ_DIR)
diff --git a/pkgs/desktops/gnustep/gui/fixup-gui-tools-preamble.patch b/pkgs/desktops/gnustep/gui/fixup-gui-tools-preamble.patch
new file mode 100644
index 000000000000..e57ddec75ad2
--- /dev/null
+++ b/pkgs/desktops/gnustep/gui/fixup-gui-tools-preamble.patch
@@ -0,0 +1,14 @@
+--- gnustep-gui-0.24.0/Tools/GNUmakefile.preamble 2006-02-22 12:43:48.000000000 +0600
++++ gnustep-gui-0.24.0.patched/Tools/GNUmakefile.preamble 2014-12-01 12:52:41.000000000 +0600
+@@ -32,9 +32,11 @@
+ ADDITIONAL_LIB_DIRS += -L../Source/$(GNUSTEP_OBJ_DIR) -L../Model/$(GNUSTEP_OBJ_DIR)
+
+ # Ad