mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
gnustep: replace custom builder with hooks
This commit is contained in:
parent
e5c677c31e
commit
4d3910b480
@ -1,9 +1,10 @@
|
||||
{ lib
|
||||
, clangStdenv
|
||||
, fetchurl
|
||||
, gnustep
|
||||
}:
|
||||
|
||||
gnustep.gsmakeDerivation rec {
|
||||
clangStdenv.mkDerivation rec {
|
||||
pname = "pikopixel";
|
||||
version = "1.0-b10";
|
||||
|
||||
@ -14,6 +15,11 @@ gnustep.gsmakeDerivation rec {
|
||||
|
||||
sourceRoot = "PikoPixel.Sources.${version}/PikoPixel";
|
||||
|
||||
nativeBuildInputs = [
|
||||
gnustep.make
|
||||
gnustep.wrapGNUstepAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gnustep.base
|
||||
gnustep.gui
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, clangStdenv
|
||||
, fetchFromGitHub
|
||||
, gnustep
|
||||
, libxkbcommon
|
||||
@ -12,9 +12,10 @@
|
||||
assert wayland.withLibraries;
|
||||
|
||||
let
|
||||
mkDerivation = if stdenv.isDarwin then stdenv.mkDerivation else gnustep.gsmakeDerivation;
|
||||
stdenv = clangStdenv;
|
||||
in
|
||||
mkDerivation {
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "owl-compositor";
|
||||
version = "unstable-2021-11-10";
|
||||
|
||||
@ -43,6 +44,7 @@ mkDerivation {
|
||||
darwin.bootstrap_cmds
|
||||
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||
gnustep.make
|
||||
gnustep.wrapGNUstepAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
@ -1,7 +1,11 @@
|
||||
{ gsmakeDerivation
|
||||
{ lib
|
||||
, stdenv
|
||||
, make
|
||||
, wrapGNUstepAppsHook
|
||||
, cairo
|
||||
, fetchzip
|
||||
, base, gui
|
||||
, base
|
||||
, gui
|
||||
, fontconfig
|
||||
, freetype
|
||||
, pkg-config
|
||||
@ -9,18 +13,23 @@
|
||||
, libXmu
|
||||
}:
|
||||
|
||||
gsmakeDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gnustep-back";
|
||||
version = "0.30.0";
|
||||
|
||||
src = fetchzip {
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/${pname}-${version}.tar.gz";
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-back-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "sha256-HD4PLdkE573nPWqFwffUmcHw8VYIl5rLiPKWrbnwpCI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [ make pkg-config wrapGNUstepAppsHook ];
|
||||
buildInputs = [ cairo base gui fontconfig freetype libXft libXmu ];
|
||||
|
||||
meta = {
|
||||
description = "A generic backend for GNUstep";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,26 +1,40 @@
|
||||
{ aspell, audiofile
|
||||
, gsmakeDerivation
|
||||
{ lib
|
||||
, stdenv
|
||||
, aspell
|
||||
, audiofile
|
||||
, make
|
||||
, wrapGNUstepAppsHook
|
||||
, cups
|
||||
, fetchzip
|
||||
, fetchpatch
|
||||
, gmp, gnutls
|
||||
, libffi, binutils-unwrapped
|
||||
, libjpeg, libtiff, libpng, giflib
|
||||
, libxml2, libxslt, libiconv
|
||||
, libobjc, libgcrypt
|
||||
, gmp
|
||||
, gnutls
|
||||
, libffi
|
||||
, binutils-unwrapped
|
||||
, libjpeg
|
||||
, libtiff
|
||||
, libpng
|
||||
, giflib
|
||||
, libxml2
|
||||
, libxslt
|
||||
, libiconv
|
||||
, libobjc
|
||||
, libgcrypt
|
||||
, icu
|
||||
, pkg-config, portaudio
|
||||
, pkg-config
|
||||
, portaudio
|
||||
, libiberty
|
||||
}:
|
||||
gsmakeDerivation rec {
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gnustep-base";
|
||||
version = "1.29.0";
|
||||
src = fetchzip {
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/${pname}-${version}.tar.gz";
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-base-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-4fjdsLBsYEDxLOFrq17dKii2sLKvOaFCu0cw3qQtM5U=";
|
||||
};
|
||||
outputs = [ "out" "dev" "lib" ];
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [ pkg-config make wrapGNUstepAppsHook ];
|
||||
propagatedBuildInputs = [
|
||||
aspell audiofile
|
||||
cups
|
||||
@ -55,7 +69,11 @@ gsmakeDerivation rec {
|
||||
];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/gnustep/libs-base/releases/tag/base-${builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
|
||||
description = "An implementation of AppKit and Foundation libraries of OPENSTEP and Cocoa";
|
||||
changelog = "https://github.com/gnustep/libs-base/releases/tag/base-${builtins.replaceStrings [ "." ] [ "_" ] version}";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -5,18 +5,21 @@
|
||||
let
|
||||
callPackage = newScope self;
|
||||
|
||||
self = rec {
|
||||
self = {
|
||||
stdenv = llvmPackages.stdenv;
|
||||
|
||||
gsmakeDerivation = callPackage ./make/gsmakeDerivation.nix {};
|
||||
wrapGNUstepAppsHook = callPackage ./wrapGNUstepAppsHook.nix {};
|
||||
|
||||
make = callPackage ./make {};
|
||||
|
||||
libobjc = callPackage ./libobjc2 {};
|
||||
base = callPackage ./base {};
|
||||
back = callPackage ./back {};
|
||||
gui = callPackage ./gui {};
|
||||
|
||||
gorm = callPackage ./gorm {};
|
||||
projectcenter = callPackage ./projectcenter {};
|
||||
system_preferences = callPackage ./systempreferences {};
|
||||
libobjc = callPackage ./libobjc2 {};
|
||||
make = callPackage ./make {};
|
||||
back = callPackage ./back {};
|
||||
base = callPackage ./base { };
|
||||
gui = callPackage ./gui {};
|
||||
gworkspace = callPackage ./gworkspace {};
|
||||
};
|
||||
|
||||
|
@ -1,15 +1,31 @@
|
||||
{ fetchzip, base, back, gsmakeDerivation, gui }:
|
||||
gsmakeDerivation rec {
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, base
|
||||
, back
|
||||
, make
|
||||
, wrapGNUstepAppsHook
|
||||
, gui
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gorm";
|
||||
version = "1.3.1";
|
||||
|
||||
src = fetchzip {
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/dev-apps/gorm-${version}.tar.gz";
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/dev-apps/gorm-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "sha256-W+NgbvLjt1PpDiauhzWFaU1/CUhmDACQz+GoyRUyWB8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ make wrapGNUstepAppsHook ];
|
||||
buildInputs = [ base back gui ];
|
||||
|
||||
meta = {
|
||||
description = "Graphical Object Relationship Modeller is an easy-to-use interface designer for GNUstep";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
mainProgram = "Gorm";
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,19 +1,32 @@
|
||||
{ gsmakeDerivation, fetchzip, base }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, make
|
||||
, wrapGNUstepAppsHook
|
||||
, fetchzip
|
||||
, base
|
||||
}:
|
||||
|
||||
gsmakeDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
version = "0.30.0";
|
||||
pname = "gnustep-gui";
|
||||
|
||||
src = fetchzip {
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/${pname}-${version}.tar.gz";
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-gui-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "sha256-24hL4TeIY6izlhQUcxKI0nXITysAPfRrncRqsDm2zNk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ make wrapGNUstepAppsHook ];
|
||||
buildInputs = [ base ];
|
||||
|
||||
patches = [
|
||||
./fixup-all.patch
|
||||
];
|
||||
meta = {
|
||||
changelog = "https://github.com/gnustep/libs-gui/releases/tag/gui-${builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
|
||||
description = "A GUI class library of GNUstep";
|
||||
changelog = "https://github.com/gnustep/libs-gui/releases/tag/gui-${builtins.replaceStrings [ "." ] [ "_" ] version}";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,22 +1,36 @@
|
||||
{ back, base, gui, gsmakeDerivation
|
||||
{ lib
|
||||
, stdenv
|
||||
, back
|
||||
, base
|
||||
, gui
|
||||
, make
|
||||
, wrapGNUstepAppsHook
|
||||
, fetchurl
|
||||
, system_preferences
|
||||
}:
|
||||
let
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gworkspace";
|
||||
version = "1.0.0";
|
||||
in
|
||||
gsmakeDerivation {
|
||||
name = "gworkspace-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/usr-apps/gworkspace-${version}.tar.gz";
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/usr-apps/gworkspace-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "sha256-M7dV7RVatw8gdYHQlRi5wNBd6MGT9GqW04R/DoKNu6I=";
|
||||
};
|
||||
|
||||
# additional dependencies:
|
||||
# - PDFKit framework from http://gap.nongnu.org/
|
||||
# - TODO: to --enable-gwmetadata, need libDBKit as well as sqlite!
|
||||
nativeBuildInputs = [ make wrapGNUstepAppsHook ];
|
||||
buildInputs = [ back base gui system_preferences ];
|
||||
configureFlags = [ "--with-inotify" ];
|
||||
|
||||
meta = {
|
||||
description = "A workspace manager for GNUstep";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
mainProgram = "GWorkspace";
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,13 +1,17 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libobjc2";
|
||||
version = "2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnustep";
|
||||
repo = "libobjc2";
|
||||
rev = "v${version}";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-iDOVEDnTAfg9r3/kdHp7hzX2oIjO1ovaqgrlIV7V68M=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
@ -19,9 +23,9 @@ stdenv.mkDerivation rec {
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "Objective-C runtime for use with GNUstep";
|
||||
homepage = "http://gnustep.org/";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ashalkhakov matthewbauer ];
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,127 +0,0 @@
|
||||
if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi
|
||||
source $stdenv/setup
|
||||
|
||||
providedPreConfigure="$preConfigure";
|
||||
|
||||
preConfigure() {
|
||||
eval "$providedPreConfigure"
|
||||
|
||||
. $GNUSTEP_MAKEFILES/GNUstep.sh
|
||||
}
|
||||
|
||||
wrapGSMake() {
|
||||
local program="$1"
|
||||
local config="$2"
|
||||
local wrapped="$(dirname $program)/.$(basename $program)-wrapped"
|
||||
|
||||
mv "$program" "$wrapped"
|
||||
|
||||
cat > "$program"<<EOF
|
||||
#! $SHELL -e
|
||||
|
||||
export GNUSTEP_CONFIG_FILE="$config"
|
||||
|
||||
exec "$wrapped" "\$@"
|
||||
EOF
|
||||
chmod +x "$program"
|
||||
}
|
||||
|
||||
postInstall() {
|
||||
local conf="$out/share/.GNUstep.conf"
|
||||
|
||||
mkdir -p "$out/share"
|
||||
touch $conf
|
||||
|
||||
# add the current package to the paths
|
||||
local tmp="$out/lib/GNUstep/Applications"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_APPS" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_APPS "$tmp"
|
||||
fi
|
||||
tmp="$out/lib/GNUstep/Applications"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_ADMIN_APPS" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_APPS "$tmp"
|
||||
fi
|
||||
tmp="$out/lib/GNUstep/WebApplications"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_WEB_APPS" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_WEB_APPS "$tmp"
|
||||
fi
|
||||
tmp="$out/bin"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_TOOLS" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_TOOLS "$tmp"
|
||||
fi
|
||||
tmp="$out/sbin"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS "$tmp"
|
||||
fi
|
||||
tmp="$out/lib/GNUstep"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_LIBRARY" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARY "$tmp"
|
||||
fi
|
||||
tmp="$out/include"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_HEADERS" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
if [ -z "$NIX_GNUSTEP_SYSTEM_HEADERS" ]; then
|
||||
export NIX_GNUSTEP_SYSTEM_HEADERS="$tmp"
|
||||
else
|
||||
export NIX_GNUSTEP_SYSTEM_HEADERS+=" $tmp"
|
||||
fi
|
||||
fi
|
||||
tmp="$out/lib"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_LIBRARIES" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARIES "$tmp"
|
||||
fi
|
||||
tmp="$out/share/GNUstep/Documentation"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_DOC" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC "$tmp"
|
||||
fi
|
||||
tmp="$out/share/man"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_DOC_MAN" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC_MAN "$tmp"
|
||||
fi
|
||||
tmp="$out/share/info"
|
||||
if [ -d "$tmp" ] && case "$NIX_GNUSTEP_SYSTEM_DOC_INFO" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC_INFO "$tmp"
|
||||
fi
|
||||
|
||||
# write the config file
|
||||
echo GNUSTEP_MAKEFILES=$GNUSTEP_MAKEFILES >> $conf
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_APPS" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_APPS="$NIX_GNUSTEP_SYSTEM_APPS"
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_ADMIN_APPS" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_ADMIN_APPS="$NIX_GNUSTEP_SYSTEM_ADMIN_APPS" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_WEB_APPS" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_WEB_APPS="$NIX_GNUSTEP_SYSTEM_WEB_APPS" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_TOOLS" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_TOOLS="$NIX_GNUSTEP_SYSTEM_TOOLS" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS="$NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_LIBRARY" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_LIBRARY="$NIX_GNUSTEP_SYSTEM_LIBRARY" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_HEADERS" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_HEADERS="$NIX_GNUSTEP_SYSTEM_HEADERS" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_LIBRARIES" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_LIBRARIES="$NIX_GNUSTEP_SYSTEM_LIBRARIES" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_DOC" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_DOC="$NIX_GNUSTEP_SYSTEM_DOC" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_DOC_MAN" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_DOC_MAN="$NIX_GNUSTEP_SYSTEM_DOC_MAN" >> $conf
|
||||
fi
|
||||
if [ -n "$NIX_GNUSTEP_SYSTEM_DOC_INFO" ]; then
|
||||
echo NIX_GNUSTEP_SYSTEM_DOC_INFO="$NIX_GNUSTEP_SYSTEM_DOC_INFO" >> $conf
|
||||
fi
|
||||
|
||||
for i in $out/bin/*; do
|
||||
echo "wrapping $(basename $i)"
|
||||
wrapGSMake "$i" "$out/share/.GNUstep.conf"
|
||||
done
|
||||
}
|
||||
|
||||
genericBuild
|
@ -1,11 +1,16 @@
|
||||
{ lib, stdenv, fetchurl, clang, which, libobjc }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, which
|
||||
, libobjc
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gnustep-make";
|
||||
version = "2.9.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-${version}.tar.gz";
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/core/gnustep-make-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "sha256-w9bnDPFWsn59HtJQHFffP5bidIjOLzUbk+R5xYwB6uc=";
|
||||
};
|
||||
|
||||
@ -22,17 +27,19 @@ stdenv.mkDerivation rec {
|
||||
"GNUSTEP_INSTALLATION_DOMAIN=SYSTEM"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ clang which ];
|
||||
buildInputs = [ libobjc ];
|
||||
|
||||
propagatedBuildInputs = [ which ];
|
||||
|
||||
patches = [ ./fixup-paths.patch ];
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/gnustep/tools-make/releases/tag/make-${builtins.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
|
||||
description = "A build manager for GNUstep";
|
||||
homepage = "http://gnustep.org/";
|
||||
changelog = "https://github.com/gnustep/tools-make/releases/tag/make-${builtins.replaceStrings [ "." ] [ "_" ] version}";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer ];
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,19 +0,0 @@
|
||||
{ lib, stdenv, make, makeWrapper, which }:
|
||||
{ nativeBuildInputs ? [], ...} @ args:
|
||||
stdenv.mkDerivation (args // {
|
||||
nativeBuildInputs = [ makeWrapper make which ] ++ nativeBuildInputs;
|
||||
|
||||
builder = ./builder.sh;
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
GNUSTEP_MAKEFILES = "${make}/share/GNUstep/Makefiles";
|
||||
|
||||
meta = {
|
||||
homepage = "http://gnustep.org/";
|
||||
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer ];
|
||||
platforms = lib.platforms.linux;
|
||||
} // (lib.optionalAttrs (builtins.hasAttr "meta" args) args.meta);
|
||||
})
|
@ -20,62 +20,52 @@ addGnustepInstallFlags() {
|
||||
|
||||
preInstallPhases+=" addGnustepInstallFlags"
|
||||
|
||||
addEnvVars() {
|
||||
addGNUstepEnvVars() {
|
||||
local filename
|
||||
|
||||
gsAddToSearchPath() {
|
||||
if [[ -d "$2" && "${!1-}" != *"$2"* ]]; then
|
||||
addToSearchPath "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
gsAddToIncludeSearchPath() {
|
||||
local -n ref="$1"
|
||||
|
||||
# NOTE: contrary to the one in wrapGNUstepAppsHook, use -e here instead of -d since it's also used for the makefiles
|
||||
if [[ -e "$2" && "${ref-}" != *"$2"* ]]; then
|
||||
if [[ "${ref-}" != "" ]]; then
|
||||
ref+=" "
|
||||
fi
|
||||
|
||||
ref+="$2"
|
||||
fi
|
||||
}
|
||||
|
||||
for filename in $1/share/GNUstep/Makefiles/Additional/*.make ; do
|
||||
if case "${NIX_GNUSTEP_MAKEFILES_ADDITIONAL-}" in *"{$filename}"*) false;; *) true;; esac; then
|
||||
export NIX_GNUSTEP_MAKEFILES_ADDITIONAL+=" $filename"
|
||||
fi
|
||||
gsAddToIncludeSearchPath NIX_GNUSTEP_MAKEFILES_ADDITIONAL "$filename"
|
||||
done
|
||||
|
||||
local tmp="$1/lib/GNUstep/Applications"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_APPS-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_APPS "$tmp"
|
||||
fi
|
||||
tmp="$1/lib/GNUstep/Applications"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_ADMIN_APPS-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_APPS "$tmp"
|
||||
fi
|
||||
tmp="$1/lib/GNUstep/WebApplications"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_WEB_APPS-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_WEB_APPS "$tmp"
|
||||
fi
|
||||
tmp="$1/bin"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_TOOLS-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_TOOLS "$tmp"
|
||||
fi
|
||||
tmp="$1/sbin"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS "$tmp"
|
||||
fi
|
||||
tmp="$1/lib/GNUstep"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_LIBRARY-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARY "$tmp"
|
||||
fi
|
||||
tmp="$1/include"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_HEADERS-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
if [ -z "${NIX_GNUSTEP_SYSTEM_HEADERS-}" ]; then
|
||||
export NIX_GNUSTEP_SYSTEM_HEADERS="$tmp"
|
||||
else
|
||||
export NIX_GNUSTEP_SYSTEM_HEADERS+=" $tmp"
|
||||
fi
|
||||
fi
|
||||
tmp="$1/lib"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_LIBRARIES-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARIES "$tmp"
|
||||
fi
|
||||
tmp="$1/share/GNUstep/Documentation"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_DOC-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC "$tmp"
|
||||
fi
|
||||
tmp="$1/share/man"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_DOC_MAN-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC_MAN "$tmp"
|
||||
fi
|
||||
tmp="$1/share/info"
|
||||
if [ -d "$tmp" ] && case "${NIX_GNUSTEP_SYSTEM_DOC_INFO-}" in *"${tmp}"*) false;; *) true;; esac; then
|
||||
addToSearchPath NIX_GNUSTEP_SYSTEM_DOC_INFO "$tmp"
|
||||
fi
|
||||
export NIX_GNUSTEP_MAKEFILES_ADDITIONAL
|
||||
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_APPS "$1/lib/GNUstep/Applications"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_APPS "$1/lib/GNUstep/Applications"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_WEB_APPS "$1/lib/GNUstep/WebApplications"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_TOOLS "$1/bin"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS "$1/sbin"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARY "$1/lib/GNUstep"
|
||||
gsAddToIncludeSearchPath NIX_GNUSTEP_SYSTEM_HEADERS "$1/include"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARIES "$1/lib"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_DOC "$1/share/GNUstep/Documentation"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_DOC_MAN "$1/share/man"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_DOC_INFO "$1/share/info"
|
||||
}
|
||||
addEnvHooks "$targetOffset" addEnvVars
|
||||
addEnvHooks "$targetOffset" addGNUstepEnvVars
|
||||
|
||||
gsmakeSetup() {
|
||||
export GNUSTEP_MAKEFILES="$(gnustep-config --variable=GNUSTEP_MAKEFILES)"
|
||||
|
||||
. $GNUSTEP_MAKEFILES/GNUstep.sh
|
||||
}
|
||||
|
||||
preConfigureHooks+=(gsmakeSetup)
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. $GNUSTEP_MAKEFILES/GNUstep.sh
|
||||
$1
|
@ -1,21 +1,29 @@
|
||||
{ lib, fetchFromGitHub
|
||||
, base, back, gsmakeDerivation, gui, gorm
|
||||
, gnumake, gdb
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, make
|
||||
, wrapGNUstepAppsHook
|
||||
, base
|
||||
, back
|
||||
, gui
|
||||
, gorm
|
||||
, gnumake
|
||||
, gdb
|
||||
}:
|
||||
let
|
||||
version = "0.7.0";
|
||||
in
|
||||
gsmakeDerivation {
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "projectcenter";
|
||||
inherit version;
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnustep";
|
||||
repo = "apps-projectcenter";
|
||||
rev = "projectcenter-${lib.replaceStrings [ "." ] [ "_" ] version}";
|
||||
rev = "projectcenter-${lib.replaceStrings [ "." ] [ "_" ] finalAttrs.version}";
|
||||
hash = "sha256-uXT2UUvMZNc6Fqi2BUXQimbZk8b3IqXzB+A2btBOmms=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ make wrapGNUstepAppsHook ];
|
||||
|
||||
# NOTE: need a patch for ProjectCenter to help it locate some necessary tools:
|
||||
# 1. Framework/PCProjectLauncher.m, locate gdb (say among NIX_GNUSTEP_SYSTEM_TOOLS)
|
||||
# 2. Framework/PCProjectBuilder.m, locate gmake (similar)
|
||||
@ -23,5 +31,10 @@ gsmakeDerivation {
|
||||
|
||||
meta = {
|
||||
description = "GNUstep's integrated development environment";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
mainProgram = "ProjectCenter";
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
@ -1,17 +1,31 @@
|
||||
{ back, base, gui, gsmakeDerivation, fetchurl }:
|
||||
let
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, make
|
||||
, wrapGNUstepAppsHook
|
||||
, back
|
||||
, base
|
||||
, gui
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "system-preferences";
|
||||
version = "1.2.0";
|
||||
in
|
||||
gsmakeDerivation {
|
||||
name = "system_preferences-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/usr-apps/SystemPreferences-${version}.tar.gz";
|
||||
url = "ftp://ftp.gnustep.org/pub/gnustep/usr-apps/SystemPreferences-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "1fg7c3ihfgvl6n21rd17fs9ivx3l8ps874m80vz86n1callgs339";
|
||||
};
|
||||
# GNUSTEP_MAKEFILES = "${gnustep_make}/share/GNUstep/Makefiles";
|
||||
|
||||
nativeBuildInputs = [ make wrapGNUstepAppsHook ];
|
||||
buildInputs = [ back base gui ];
|
||||
# propagatedBuildInputs = [ gnustep_back gnustep_base gnustep_gui ];
|
||||
|
||||
meta = {
|
||||
description = "The settings manager for the GNUstep environment and its applications";
|
||||
homepage = "https://gnustep.github.io/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
mainProgram = "SystemPreferences";
|
||||
maintainers = with lib.maintainers; [ ashalkhakov matthewbauer dblsaiko ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
8
pkgs/desktops/gnustep/wrapGNUstepAppsHook.nix
Normal file
8
pkgs/desktops/gnustep/wrapGNUstepAppsHook.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{makeBinaryWrapper, makeSetupHook}:
|
||||
|
||||
makeSetupHook
|
||||
{
|
||||
name = "wrapGNUstepAppsHook";
|
||||
propagatedBuildInputs = [makeBinaryWrapper];
|
||||
}
|
||||
./wrapGNUstepAppsHook.sh
|
96
pkgs/desktops/gnustep/wrapGNUstepAppsHook.sh
Normal file
96
pkgs/desktops/gnustep/wrapGNUstepAppsHook.sh
Normal file
@ -0,0 +1,96 @@
|
||||
if [[ -z "${__nix_wrapGNUstepAppsHook-}" ]]; then
|
||||
__nix_wrapGNUstepAppsHook=1 # Don't run this hook more than once.
|
||||
|
||||
# Inherit arguments given in mkDerivation
|
||||
gnustepWrapperArgs=(${gnustepWrapperArgs-})
|
||||
|
||||
gnustepConfigVars+=(
|
||||
GNUSTEP_MAKEFILES
|
||||
NIX_GNUSTEP_SYSTEM_APPS
|
||||
NIX_GNUSTEP_SYSTEM_ADMIN_APPS
|
||||
NIX_GNUSTEP_SYSTEM_WEB_APPS
|
||||
NIX_GNUSTEP_SYSTEM_TOOLS
|
||||
NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS
|
||||
NIX_GNUSTEP_SYSTEM_LIBRARY
|
||||
NIX_GNUSTEP_SYSTEM_HEADERS
|
||||
NIX_GNUSTEP_SYSTEM_LIBRARIES
|
||||
NIX_GNUSTEP_SYSTEM_DOC
|
||||
NIX_GNUSTEP_SYSTEM_DOC_MAN
|
||||
NIX_GNUSTEP_SYSTEM_DOC_INFO
|
||||
)
|
||||
|
||||
wrapGNUstepApp() {
|
||||
wrapProgram "$1" \
|
||||
--set GNUSTEP_CONFIG_FILE "$out/GNUstep.conf" \
|
||||
"${gnustepWrapperArgs[@]}"
|
||||
}
|
||||
|
||||
ensureGNUstepConfig() (
|
||||
if [[ -f "$out/GNUstep.conf" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "writing GNUstep config file"
|
||||
|
||||
gsAddToSearchPath() {
|
||||
if [[ -d "$2" && "${!1-}" != *"$2"* ]]; then
|
||||
addToSearchPath "$1" "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
gsAddToIncludeSearchPath() {
|
||||
local -n ref="$1"
|
||||
|
||||
if [[ -d "$2" && "${ref-}" != *"$2"* ]]; then
|
||||
if [[ "${ref-}" != "" ]]; then
|
||||
ref+=" "
|
||||
fi
|
||||
|
||||
ref+="$2"
|
||||
fi
|
||||
}
|
||||
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_APPS "$out/lib/GNUstep/Applications"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_APPS "$out/lib/GNUstep/Applications"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_WEB_APPS "$out/lib/GNUstep/WebApplications"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_TOOLS "$out/bin"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_ADMIN_TOOLS "$out/sbin"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARY "$out/lib/GNUstep"
|
||||
gsAddToIncludeSearchPath NIX_GNUSTEP_SYSTEM_HEADERS "$out/include"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_LIBRARIES "$out/lib"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_DOC "$out/share/GNUstep/Documentation"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_DOC_MAN "$out/share/man"
|
||||
gsAddToSearchPath NIX_GNUSTEP_SYSTEM_DOC_INFO "$out/share/info"
|
||||
|
||||
for var in "${gnustepConfigVars[@]}"; do
|
||||
if [[ -n "${!var-}" ]]; then
|
||||
printf '%s="%s"\n' "$var" "${!var}"
|
||||
fi
|
||||
done > "$out/GNUstep.conf"
|
||||
)
|
||||
|
||||
# Note: $gnustepWrapperArgs still gets defined even if ${dontWrapGNUstepApps-} is set.
|
||||
wrapGNUstepAppsHook() {
|
||||
# skip this hook when requested
|
||||
[[ -z "${dontWrapGNUstepApps-}" ]] || return 0
|
||||
|
||||
# guard against running multiple times (e.g. due to propagation)
|
||||
[[ -z "$wrapGNUstepAppsHookHasRun" ]] || return 0
|
||||
wrapGNUstepAppsHookHasRun=1
|
||||
|
||||
local targetDirs=("$prefix/bin")
|
||||
echo "wrapping GNUstep applications in ${targetDirs[@]}"
|
||||
|
||||
for targetDir in "${targetDirs[@]}"; do
|
||||
[[ -d "$targetDir" ]] || continue
|
||||
|
||||
while IFS= read -r -d '' file; do
|
||||
ensureGNUstepConfig
|
||||
echo "wrapping $file"
|
||||
wrapGNUstepApp "$file"
|
||||
done < <(find "$targetDir" ! -type d -executable -print0)
|
||||
done
|
||||
}
|
||||
|
||||
fixupOutputHooks+=(wrapGNUstepAppsHook)
|
||||
fi
|
Loading…
Reference in New Issue
Block a user