2023-03-24 00:07:29 +00:00
|
|
|
{ gnustep, lib, fetchFromGitHub, fetchpatch, libxml2, openssl
|
2021-04-05 15:23:46 +00:00
|
|
|
, openldap, mariadb, libmysqlclient, postgresql }:
|
2020-10-11 12:50:04 +00:00
|
|
|
|
|
|
|
gnustep.stdenv.mkDerivation rec {
|
2020-05-29 06:06:01 +00:00
|
|
|
pname = "sope";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "5.9.0";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "inverse-inc";
|
|
|
|
repo = pname;
|
|
|
|
rev = "SOPE-${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-JZh8sC/w2MRy3UyWYGMvU47XtWKGnLuUlCsVyyxd7zg=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
patches = [
|
2024-01-02 11:29:13 +00:00
|
|
|
(fetchpatch { # https://github.com/Alinto/sope/pull/66
|
|
|
|
name = "sope-fix-gnustep-1.29.0+.patch";
|
|
|
|
url = "https://github.com/Alinto/sope/pull/66/commits/9ec2744cc851b11886c3ebb723138e4d672bd5c7.patch";
|
|
|
|
hash = "sha256-JgYRwjmjlitgzYz9Jfei5XJRThP1TunPjI0g5M2wZPA=";
|
2023-03-24 00:07:29 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
nativeBuildInputs = [ gnustep.make ];
|
2023-03-24 00:07:29 +00:00
|
|
|
buildInputs = [ gnustep.base libxml2 openssl ]
|
2023-02-02 18:25:31 +00:00
|
|
|
++ lib.optional (openldap != null) openldap
|
|
|
|
++ lib.optionals (mariadb != null) [ libmysqlclient mariadb ]
|
2023-03-24 00:07:29 +00:00
|
|
|
++ lib.optional (postgresql != null) postgresql;
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
# Configure directories where files are installed to. Everything is automatically
|
|
|
|
# put into $out (thanks GNUstep) apart from the makefiles location which is where
|
|
|
|
# makefiles are read from during build but also where the SOPE makefiles are
|
|
|
|
# installed to in the install phase. We move them over after the installation.
|
2020-05-29 06:06:01 +00:00
|
|
|
preConfigure = ''
|
2023-03-24 00:07:29 +00:00
|
|
|
mkdir -p /build/Makefiles
|
|
|
|
ln -s ${gnustep.make}/share/GNUstep/Makefiles/* /build/Makefiles
|
|
|
|
cat <<EOF > /build/GNUstep.conf
|
|
|
|
GNUSTEP_MAKEFILES=/build/Makefiles
|
|
|
|
EOF
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [ "--prefix=" "--disable-debug" "--enable-xml" "--with-ssl=ssl" ]
|
2023-02-02 18:25:31 +00:00
|
|
|
++ lib.optional (openldap != null) "--enable-openldap"
|
|
|
|
++ lib.optional (mariadb != null) "--enable-mysql"
|
|
|
|
++ lib.optional (postgresql != null) "--enable-postgresql";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
env = {
|
|
|
|
GNUSTEP_CONFIG_FILE = "/build/GNUstep.conf";
|
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
|
|
|
|
};
|
2023-03-24 00:07:29 +00:00
|
|
|
|
|
|
|
# Move over the makefiles (see comment over preConfigure)
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/GNUstep/Makefiles
|
|
|
|
find /build/Makefiles -mindepth 1 -maxdepth 1 -not -type l -exec cp -r '{}' $out/share/GNUstep/Makefiles \;
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Extensive set of frameworks which form a complete Web application server environment";
|
2020-05-29 06:06:01 +00:00
|
|
|
license = licenses.publicDomain;
|
|
|
|
homepage = "https://github.com/inverse-inc/sope";
|
|
|
|
platforms = platforms.linux;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|