summary refs log blame commit diff
path: root/pkgs/development/libraries/sope/default.nix
blob: 25c65d82632df7c77457c81c5a02234dcd308eb1 (plain) (tree)
1
2
3
4
5
6
7
                                                      
                                                  


                                 
                 
                    




                            
                                                                    

    
                                  


                                                             
                                                             












                                                                                    
                                                  








                                                           
                                                                                                            





                                                     
{ gnustep, lib, fetchFromGitHub , libxml2, openssl_1_1
, openldap, mariadb, libmysqlclient, postgresql }:
with lib;

gnustep.stdenv.mkDerivation rec {
  pname = "sope";
  version = "5.1.1";

  src = fetchFromGitHub {
    owner = "inverse-inc";
    repo = pname;
    rev = "SOPE-${version}";
    sha256 = "0pap7c38kgadyp1a6qkmf9xhk69ybpmhfd4kc2n5nafhdbvks985";
  };

  hardeningDisable = [ "format" ];
  nativeBuildInputs = [ gnustep.make ];
  buildInputs = flatten ([ gnustep.base libxml2 openssl_1_1 ]
    ++ 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 ];
  };
}