linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / sope / default.nix
blobb956967ee88e799bacacf2c5916dbd48cc334209
1 { gnustep, lib, fetchFromGitHub , libxml2, openssl_1_1
2 , openldap, mariadb, libmysqlclient, postgresql }:
3 with lib;
5 gnustep.stdenv.mkDerivation rec {
6   pname = "sope";
7   version = "5.0.1";
9   src = fetchFromGitHub {
10     owner = "inverse-inc";
11     repo = pname;
12     rev = "SOPE-${version}";
13     sha256 = "031m8ydr4jhh29332mfbsw0i5d0cjfqfyfs55jm832dlmv4447gb";
14   };
16   hardeningDisable = [ "format" ];
17   nativeBuildInputs = [ gnustep.make ];
18   buildInputs = flatten ([ gnustep.base libxml2 openssl_1_1 ]
19     ++ optional (openldap != null) openldap
20     ++ optionals (mariadb != null) [ libmysqlclient mariadb ]
21     ++ optional (postgresql != null) postgresql);
23   postPatch = ''
24     # Exclude NIX_ variables
25     sed -i 's/grep GNUSTEP_/grep ^GNUSTEP_/g' configure
26   '';
28   preConfigure = ''
29     export DESTDIR="$out"
30   '';
32   configureFlags = [ "--prefix=" "--disable-debug" "--enable-xml" "--with-ssl=ssl" ]
33     ++ optional (openldap != null) "--enable-openldap"
34     ++ optional (mariadb != null) "--enable-mysql"
35     ++ optional (postgresql != null) "--enable-postgresql";
37   # Yes, this is ugly.
38   preFixup = ''
39     cp -rlPa $out/nix/store/*/* $out
40     rm -rf $out/nix/store
41   '';
43   meta = {
44     description = "An extensive set of frameworks which form a complete Web application server environment";
45     license = licenses.publicDomain;
46     homepage = "https://github.com/inverse-inc/sope";
47     platforms = platforms.linux;
48     maintainers = with maintainers; [ ajs124 das_j ];
49   };