mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-07 13:09:27 +03:00
pgmodeler: add darwin build (#301513)
* pgmodeler: add darwin build Signed-off-by: Florian Brandes <florian.brandes@posteo.de> * pgmodeler: add missing library Signed-off-by: Florian Brandes <florian.brandes@posteo.de> * pgmodeler: fix macOS Application generation Signed-off-by: Florian Brandes <florian.brandes@posteo.de> --------- Signed-off-by: Florian Brandes <florian.brandes@posteo.de> Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
This commit is contained in:
parent
c8beb5ccdb
commit
d50ce37b58
@ -7,6 +7,8 @@
|
||||
, qtwayland
|
||||
, qtsvg
|
||||
, postgresql
|
||||
, cups
|
||||
, libxml2
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -21,16 +23,34 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config qmake wrapQtAppsHook ];
|
||||
qmakeFlags = [ "pgmodeler.pro" "CONFIG+=release" ];
|
||||
qmakeFlags = [ "pgmodeler.pro" "CONFIG+=release" ] ++ lib.optionals stdenv.isDarwin [
|
||||
"PGSQL_INC=${postgresql}/include"
|
||||
"PGSQL_LIB=${postgresql.lib}/lib/libpq.dylib"
|
||||
"XML_INC=${libxml2.dev}/include/libxml2"
|
||||
"XML_LIB=${libxml2.out}/lib/libxml2.dylib"
|
||||
"PREFIX=${placeholder "out"}/Applications/pgModeler.app/Contents"
|
||||
];
|
||||
|
||||
# todo: libpq would suffice here. Unfortunately this won't work, if one uses only postgresql.lib here.
|
||||
buildInputs = [ postgresql qtsvg qtwayland ];
|
||||
buildInputs = [ postgresql qtsvg ]
|
||||
++ lib.optionals stdenv.isLinux [ qtwayland ]
|
||||
++ lib.optionals stdenv.isDarwin [ cups libxml2 ];
|
||||
|
||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||
mkdir -p $out/bin
|
||||
for item in pgmodeler pgmodeler-{cli,se,ch}
|
||||
do
|
||||
ln -s $out/Applications/pgModeler.app/Contents/MacOS/$item $out/bin
|
||||
done
|
||||
'';
|
||||
|
||||
dontWrapQtApps = stdenv.isDarwin;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A database modeling tool for PostgreSQL";
|
||||
homepage = "https://pgmodeler.io/";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [ maintainers.esclear ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user