at 18.03-beta 58 lines 1.7 kB view raw
1{ stdenv, fetchurl, fetchpatch, postgresql, wxGTK, libxml2, libxslt, openssl, zlib, makeDesktopItem }: 2 3stdenv.mkDerivation rec { 4 name = "pgadmin3-${version}"; 5 version = "1.22.2"; 6 7 src = fetchurl { 8 url = "http://ftp.postgresql.org/pub/pgadmin/pgadmin3/v${version}/src/pgadmin3-${version}.tar.gz"; 9 sha256 = "1b24b356h8z188nci30xrb57l7kxjqjnh6dq9ws638phsgiv0s4v"; 10 }; 11 12 enableParallelBuilding = true; 13 14 buildInputs = [ postgresql wxGTK openssl zlib ]; 15 16 patches = [ 17 (fetchpatch { 18 sha256 = "09hp7s3zjz80rpx2j3xyznwswwfxzi70z7c05dzrdk74mqjjpkfk"; 19 name = "843344.patch"; 20 url = "https://sources.debian.net/data/main/p/pgadmin3/1.22.2-1/debian/patches/843344"; 21 }) 22 ]; 23 24 preConfigure = '' 25 substituteInPlace pgadmin/ver_svn.sh --replace "bin/bash" "$shell" 26 ''; 27 28 configureFlags = [ 29 "--with-pgsql=${postgresql}" 30 "--with-libxml2=${libxml2.dev}" 31 "--with-libxslt=${libxslt.dev}" 32 ]; 33 34 meta = with stdenv.lib; { 35 description = "PostgreSQL administration GUI tool"; 36 homepage = https://www.pgadmin.org; 37 license = licenses.gpl2; 38 maintainers = with maintainers; [ domenkozar wmertens ]; 39 platforms = platforms.unix; 40 }; 41 42 postFixup = let 43 desktopItem = makeDesktopItem { 44 name = "pgAdmin"; 45 desktopName = "pgAdmin III"; 46 genericName = "SQL Administration"; 47 exec = "pgadmin3"; 48 icon = "pgAdmin3"; 49 type = "Application"; 50 categories = "Application;Development;"; 51 mimeType = "text/html"; 52 }; 53 in '' 54 mkdir -p $out/share/pixmaps; 55 cp pgadmin/include/images/pgAdmin3.png $out/share/pixmaps/; 56 cp -rv ${desktopItem}/share/applications $out/share/ 57 ''; 58}