2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, postgresql, wxGTK, libxml2, libxslt, openssl, zlib, makeDesktopItem }:
|
2010-07-28 13:55:54 +02:00
|
|
|
|
2009-10-08 11:26:47 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "pgadmin3";
|
2017-10-11 21:52:07 +02:00
|
|
|
version = "1.22.2";
|
2008-01-29 02:24:54 +01:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://ftp.postgresql.org/pub/pgadmin/pgadmin3/v${version}/src/pgadmin3-${version}.tar.gz";
|
2017-10-11 21:52:07 +02:00
|
|
|
sha256 = "1b24b356h8z188nci30xrb57l7kxjqjnh6dq9ws638phsgiv0s4v";
|
2008-01-29 02:24:54 +01:00
|
|
|
};
|
|
|
|
|
2016-03-27 19:56:27 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-04-24 17:22:40 +02:00
|
|
|
buildInputs = [ postgresql wxGTK openssl zlib ];
|
2008-01-29 02:24:54 +01:00
|
|
|
|
2017-10-11 21:52:07 +02:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
sha256 = "09hp7s3zjz80rpx2j3xyznwswwfxzi70z7c05dzrdk74mqjjpkfk";
|
|
|
|
name = "843344.patch";
|
|
|
|
url = "https://sources.debian.net/data/main/p/pgadmin3/1.22.2-1/debian/patches/843344";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2013-08-08 16:49:26 +02:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace pgadmin/ver_svn.sh --replace "bin/bash" "$shell"
|
|
|
|
'';
|
|
|
|
|
2016-04-24 17:22:40 +02:00
|
|
|
configureFlags = [
|
2017-10-11 21:52:07 +02:00
|
|
|
"--with-pgsql=${postgresql}"
|
2016-08-30 01:57:21 +02:00
|
|
|
"--with-libxml2=${libxml2.dev}"
|
2016-08-23 02:34:38 +02:00
|
|
|
"--with-libxslt=${libxslt.dev}"
|
2016-04-24 17:22:40 +02:00
|
|
|
];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2010-07-28 13:55:54 +02:00
|
|
|
description = "PostgreSQL administration GUI tool";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.pgadmin.org";
|
2013-08-08 16:49:26 +02:00
|
|
|
license = licenses.gpl2;
|
2016-05-17 13:57:28 +02:00
|
|
|
maintainers = with maintainers; [ domenkozar wmertens ];
|
2013-08-08 16:49:26 +02:00
|
|
|
platforms = platforms.unix;
|
2010-07-28 13:55:54 +02:00
|
|
|
};
|
2017-07-09 21:04:47 +02:00
|
|
|
|
|
|
|
postFixup = let
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "pgAdmin";
|
|
|
|
desktopName = "pgAdmin III";
|
|
|
|
genericName = "SQL Administration";
|
|
|
|
exec = "pgadmin3";
|
|
|
|
icon = "pgAdmin3";
|
|
|
|
type = "Application";
|
2020-06-25 04:18:37 +02:00
|
|
|
categories = "Development;";
|
2017-07-09 21:04:47 +02:00
|
|
|
mimeType = "text/html";
|
|
|
|
};
|
|
|
|
in ''
|
|
|
|
mkdir -p $out/share/pixmaps;
|
|
|
|
cp pgadmin/include/images/pgAdmin3.png $out/share/pixmaps/;
|
|
|
|
cp -rv ${desktopItem}/share/applications $out/share/
|
|
|
|
'';
|
2008-01-29 02:24:54 +01:00
|
|
|
}
|