depot/third_party/nixpkgs/pkgs/development/libraries/sope/default.nix
Default email a6d62be0d1 Project import generated by Copybara.
GitOrigin-RevId: ac169ec6371f0d835542db654a65e0f2feb07838
2021-12-26 18:43:05 +01:00

50 lines
1.4 KiB
Nix

{ gnustep, lib, fetchFromGitHub , libxml2, openssl
, openldap, mariadb, libmysqlclient, postgresql }:
with lib;
gnustep.stdenv.mkDerivation rec {
pname = "sope";
version = "5.4.0";
src = fetchFromGitHub {
owner = "inverse-inc";
repo = pname;
rev = "SOPE-${version}";
sha256 = "sha256-jOF429Gaf1Qo3bx9mUogBQ0u/tBUxnX7VZxJjxF24Rg=";
};
hardeningDisable = [ "format" ];
nativeBuildInputs = [ gnustep.make ];
buildInputs = flatten ([ gnustep.base libxml2 openssl ]
++ optional (openldap != null) openldap
++ optionals (mariadb != null) [ libmysqlclient mariadb ]
++ optional (postgresql != null) postgresql);
postPatch = ''
# Exclude NIX_ variables
sed -i 's/grep GNUSTEP_/grep ^GNUSTEP_/g' configure
'';
preConfigure = ''
export DESTDIR="$out"
'';
configureFlags = [ "--prefix=" "--disable-debug" "--enable-xml" "--with-ssl=ssl" ]
++ optional (openldap != null) "--enable-openldap"
++ optional (mariadb != null) "--enable-mysql"
++ optional (postgresql != null) "--enable-postgresql";
# Yes, this is ugly.
preFixup = ''
cp -rlPa $out/nix/store/*/* $out
rm -rf $out/nix/store
'';
meta = {
description = "An extensive set of frameworks which form a complete Web application server environment";
license = licenses.publicDomain;
homepage = "https://github.com/inverse-inc/sope";
platforms = platforms.linux;
maintainers = with maintainers; [ ajs124 das_j ];
};
}