gnustep: cleanup
Cleaning up. Adding GNUstep package builder for abstracting out GNUstep compilation specifics (with thanks to GitHub user lethalman). The rules for using build_gnustep_package are as simple: any GNUstep-based package that the package being compiled depends upon are to be put in [deps] (this is used for setting up a buildEnv), while other dependencies are put into [buildInputs] as usual.
This commit is contained in:
committed by
Matthew Bauer
parent
5db3f3ee61
commit
d39e5372dc
@@ -0,0 +1,126 @@
|
||||
# These GNUSTEP_*_ROOT variables are obsolete, and will be removed.
|
||||
#GNUSTEP_SYSTEM_ROOT=/nix/store/ky64z3j9l18wjcssb9pxnc792ihh3bvw-gnustep-make-2.6.6/System
|
||||
#GNUSTEP_LOCAL_ROOT=/nix/store/ky64z3j9l18wjcssb9pxnc792ihh3bvw-gnustep-make-2.6.6/Local
|
||||
#GNUSTEP_NETWORK_ROOT=/nix/store/ky64z3j9l18wjcssb9pxnc792ihh3bvw-gnustep-make-2.6.6/Network
|
||||
|
||||
# The name of the user config file. This file can override
|
||||
# some settings in this file. Usually used by users that want
|
||||
# to install things into their GNUstep user domain and/or have
|
||||
# many such domains.
|
||||
GNUSTEP_USER_CONFIG_FILE=.GNUstep.conf
|
||||
|
||||
# The name of the user directory, if any. This is obsolete,
|
||||
# and will be removed.
|
||||
GNUSTEP_USER_DIR=GNUstep
|
||||
|
||||
# The name of the user directory where defaults (eg, preferences) are
|
||||
# stored. If it does not start with a '/', it will be considered
|
||||
# relative to the user home directory.
|
||||
GNUSTEP_USER_DEFAULTS_DIR=GNUstep/Defaults
|
||||
|
||||
|
||||
# This is where the gnustep-make Makefiles are installed.
|
||||
# Traditionally, this is /usr/GNUstep/System/Library/Makefiles
|
||||
GNUSTEP_MAKEFILES=@gnustepMakefiles@
|
||||
|
||||
# This is where the user home directories are. Only used to provide
|
||||
# NSUserDirectory in gnustep-base. Never used anywhere else.
|
||||
GNUSTEP_SYSTEM_USERS_DIR=/home
|
||||
GNUSTEP_NETWORK_USERS_DIR=/home
|
||||
GNUSTEP_LOCAL_USERS_DIR=/home
|
||||
|
||||
|
||||
# This is where System GUI Applications get installed.
|
||||
# Traditionally it is /usr/GNUstep/System/Applications.
|
||||
GNUSTEP_SYSTEM_APPS=@systemApps@
|
||||
|
||||
# This is where System GUI Applications that only the
|
||||
# Administrator can use get installed.
|
||||
# Traditionally it is /usr/GNUstep/System/Applications/Admin.
|
||||
GNUSTEP_SYSTEM_ADMIN_APPS=@systemAdminApps@
|
||||
|
||||
# This is where System Web Applications (GSWeb, SOPE) get
|
||||
# installed.
|
||||
# Traditionally it is /usr/GNUstep/System/Library/WebApplications.
|
||||
GNUSTEP_SYSTEM_WEB_APPS=@systemWebApps@
|
||||
|
||||
# This is where System Command-Line Tools get installed.
|
||||
# Traditionally it is /usr/GNUstep/System/Tools.
|
||||
GNUSTEP_SYSTEM_TOOLS=@systemTools@
|
||||
|
||||
# This is where System Command-Line Tools that only the
|
||||
# Administrator can use get installed. Important: this
|
||||
# should not be in the PATH of normal users.
|
||||
# Traditionally it is /usr/GNUstep/System/Tools/Admin.
|
||||
GNUSTEP_SYSTEM_ADMIN_TOOLS=@systemAdminTools@
|
||||
|
||||
# This is where System resources get installed. This directory will
|
||||
# contain a lot of executable code since *step traditionally likes to
|
||||
# bundle executables and resources together.
|
||||
# Traditionally it is /usr/GNUstep/System/Library.
|
||||
GNUSTEP_SYSTEM_LIBRARY=@systemLibrary@
|
||||
|
||||
# This is where System headers get installed. They are the
|
||||
# library .h headers.
|
||||
# Traditionally it is /usr/GNUstep/System/Library/Headers.
|
||||
GNUSTEP_SYSTEM_HEADERS=@systemHeaders@
|
||||
|
||||
# This is where System libraries get installed. By libraries we mean
|
||||
# the shared/static object files that you can link into programs.
|
||||
# Traditionally it is /usr/GNUstep/System/Library/Libraries.
|
||||
GNUSTEP_SYSTEM_LIBRARIES=@systemLibraries@
|
||||
|
||||
# This is where System documentation get installed. This is known
|
||||
# not to contain any executable, so we keep it separate.
|
||||
# Traditionally it is /usr/GNUstep/System/Library/Documentation.
|
||||
GNUSTEP_SYSTEM_DOC=@systemDoc@
|
||||
|
||||
# This is where System man pages get installed.
|
||||
# Traditionally it is /usr/GNUstep/System/Library/Documentation/man.
|
||||
GNUSTEP_SYSTEM_DOC_MAN=@systemDocMan@
|
||||
|
||||
# This is where System info pages get installed.
|
||||
# Traditionally it is /usr/GNUstep/System/Library/Documentation/info.
|
||||
GNUSTEP_SYSTEM_DOC_INFO=@systemDocInfo@
|
||||
|
||||
|
||||
GNUSTEP_NETWORK_APPS=@systemApps@
|
||||
GNUSTEP_NETWORK_ADMIN_APPS=@systemAdminApps@
|
||||
GNUSTEP_NETWORK_WEB_APPS=@systemWebApps@
|
||||
GNUSTEP_NETWORK_TOOLS=@systemTools@
|
||||
GNUSTEP_NETWORK_ADMIN_TOOLS=@systemAdminTools@
|
||||
GNUSTEP_NETWORK_LIBRARY=@systemLibrary@
|
||||
GNUSTEP_NETWORK_HEADERS=@systemHeaders@
|
||||
GNUSTEP_NETWORK_LIBRARIES=@systemLibraries@
|
||||
GNUSTEP_NETWORK_DOC=@systemDoc@
|
||||
GNUSTEP_NETWORK_DOC_MAN=@systemDocMan@
|
||||
GNUSTEP_NETWORK_DOC_INFO=@systemDocInfo@
|
||||
|
||||
GNUSTEP_LOCAL_APPS=@systemApps@
|
||||
GNUSTEP_LOCAL_ADMIN_APPS=@systemAdminApps@
|
||||
GNUSTEP_LOCAL_WEB_APPS=@systemWebApps@
|
||||
GNUSTEP_LOCAL_TOOLS=@systemTools@
|
||||
GNUSTEP_LOCAL_ADMIN_TOOLS=@systemAdminTools@
|
||||
GNUSTEP_LOCAL_LIBRARY=@systemLibrary@
|
||||
GNUSTEP_LOCAL_HEADERS=@systemHeaders@
|
||||
GNUSTEP_LOCAL_LIBRARIES=@systemLibraries@
|
||||
GNUSTEP_LOCAL_DOC=@systemDoc@
|
||||
GNUSTEP_LOCAL_DOC_MAN=@systemDocMan@
|
||||
GNUSTEP_LOCAL_DOC_INFO=@systemDocInfo@
|
||||
|
||||
# Important: settings in the User should normally be relative paths,
|
||||
# and will be interpreted as relative to the user's directory. This
|
||||
# allows each user to have their own domain to install things. You
|
||||
# can set them to be absolute, mostly if you want to disable them
|
||||
# by setting them equal to the ones in the Network domain.
|
||||
GNUSTEP_USER_DIR_APPS=GNUstep/Applications
|
||||
GNUSTEP_USER_DIR_ADMIN_APPS=GNUstep/Applications/Admin
|
||||
GNUSTEP_USER_DIR_WEB_APPS=GNUstep/WebApplications
|
||||
GNUSTEP_USER_DIR_TOOLS=GNUstep/Tools
|
||||
GNUSTEP_USER_DIR_ADMIN_TOOLS=GNUstep/Tools/Admin
|
||||
GNUSTEP_USER_DIR_LIBRARY=GNUstep/Library
|
||||
GNUSTEP_USER_DIR_HEADERS=GNUstep/Library/Headers
|
||||
GNUSTEP_USER_DIR_LIBRARIES=GNUstep/Library/Libraries
|
||||
GNUSTEP_USER_DIR_DOC=GNUstep/Library/Documentation
|
||||
GNUSTEP_USER_DIR_DOC_MAN=GNUstep/Library/Documentation/man
|
||||
GNUSTEP_USER_DIR_DOC_INFO=GNUstep/Library/Documentation/info
|
||||
@@ -0,0 +1,44 @@
|
||||
{ stdenv, gnustep_make, buildEnv}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
{
|
||||
mkDerivation =
|
||||
args @ { name, src, deps ? [], buildInputs, ... }:
|
||||
let
|
||||
GNUSTEP_env =
|
||||
# buildEnv fails if there is only one path to symlink
|
||||
if deps == null || length deps < 2 then gnustep_make
|
||||
else buildEnv {
|
||||
name = "gnustep-env-${name}";
|
||||
paths = deps;
|
||||
pathsToLink = [ "/bin" "/sbin" "/lib" "/include" "/share" ];
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (args // {
|
||||
GNUSTEP_conf = gnustep_make.gnustepConfigTemplate;
|
||||
inherit GNUSTEP_env;
|
||||
GNUSTEP_MAKEFILES = "${GNUSTEP_env}/share/GNUstep/Makefiles";
|
||||
GNUSTEP_INSTALLATION_DOMAIN = "SYSTEM";
|
||||
buildInputs = args.buildInputs ++ deps;
|
||||
preConfigure = ''
|
||||
cp $GNUSTEP_conf $(pwd)/GNUstep-build.conf
|
||||
substituteInPlace $(pwd)/GNUstep-build.conf \
|
||||
--subst-var-by gnustepMakefiles $GNUSTEP_MAKEFILES \
|
||||
--subst-var-by systemApps "$GNUSTEP_env/lib/GNUstep/Applications" \
|
||||
--subst-var-by systemAdminApps "$GNUSTEP_env/lib/GNUstep/Applications" \
|
||||
--subst-var-by systemWebApps "$GNUSTEP_env/lib/GNUstep/WebApplications" \
|
||||
--subst-var-by systemTools "$GNUSTEP_env/bin" \
|
||||
--subst-var-by systemAdminTools "$GNUSTEP_env/sbin" \
|
||||
--subst-var-by systemLibrary "$GNUSTEP_env/lib" \
|
||||
--subst-var-by systemHeaders "$GNUSTEP_env/include" \
|
||||
--subst-var-by systemLibraries "$GNUSTEP_env/lib" \
|
||||
--subst-var-by systemDoc "$GNUSTEP_env/share/GNUstep/Documentation" \
|
||||
--subst-var-by systemDocMan "$GNUSTEP_env/share/man" \
|
||||
--subst-var-by systemDocInfo "$GNUSTEP_env/share/info"
|
||||
export GNUSTEP_CONFIG_FILE=$(pwd)/GNUstep-build.conf
|
||||
. $GNUSTEP_MAKEFILES/GNUstep.sh
|
||||
'';
|
||||
installFlags = "GNUSTEP_SYSTEM_APPS=\${out}/lib/GNUstep/Applications GNUSTEP_SYSTEM_ADMIN_APPS=\${out}/lib/GNUstep/Applications GNUSTEP_SYSTEM_WEB_APPS=\${out}/lib/GNUstep/WebApplications GNUSTEP_SYSTEM_TOOLS=\${out}/bin GNUSTEP_SYSTEM_ADMIN_TOOLS=\${out}/sbin GNUSTEP_SYSTEM_LIBRARY=\${out}/lib GNUSTEP_SYSTEM_HEADERS=\${out}/include GNUSTEP_SYSTEM_LIBRARIES=\${out}/lib GNUSTEP_SYSTEM_DOC=\${out}/share/GNUstep/Documentation GNUSTEP_SYSTEM_DOC_MAN=\${out}/share/man GNUSTEP_SYSTEM_DOC_INFO=\${out}/share/info GNUSTEP_SYSTEM_LIBRARIES=\${out}/lib GNUSTEP_HEADERS=\${out}/include DESTDIR_GNUSTEP_MAKEFILES=\${out}/share/GNUstep/Makefiles";
|
||||
});
|
||||
}
|
||||
@@ -8,8 +8,9 @@ stdenv.mkDerivation rec {
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-2.6.6.tar.gz";
|
||||
sha256 = "07cqr8x17bia9w6clbmiv7ay6r9nplrjz2cyzinv4w7zfpc19vxw";
|
||||
};
|
||||
configureFlags = "--with-layout=fhs-system";
|
||||
configureFlags = "--with-installation-domain=SYSTEM";
|
||||
buildInputs = [ clang which libobjc2 ];
|
||||
gnustepConfigTemplate = ./GNUstep.conf;
|
||||
meta = {
|
||||
description = "GNUstep-make is a build manager for GNUstep.";
|
||||
|
||||
@@ -18,6 +19,6 @@ stdenv.mkDerivation rec {
|
||||
license = stdenv.lib.licenses.lgpl2Plus;
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ ashalkhakov ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user