unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* WIP pgmodeler
@ 2017-05-16  8:09 Catonano
  0 siblings, 0 replies; only message in thread
From: Catonano @ 2017-05-16  8:09 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 637 bytes --]

I have this patch for pgmodeler

https://www.pgmodeler.com.br/

It builds.

I would say that 20% of the work is done, now the remaining 80% is
integration work

It has some somewhat bizarre runtime requirements and procedures, it
probably needs some search paths to be set and probably a desktop file
should be written

I'm not keen to see after this stuff

So, I post it here, I'd be glad if anyone is willing to chip in some bits
and pieces

Thanks

P.S. I'm not sure if Potluck could cover this use case, but  I was thinking
that maybe a guix-wip mailing list like the guix-patches one could be
useful for half baked things like this

[-- Attachment #1.2: Type: text/html, Size: 856 bytes --]

[-- Attachment #2: pgmodeler.patch --]
[-- Type: text/x-patch, Size: 3795 bytes --]

From 61d847dc95c0a28fbbbf5981deb1d637d9f6d9fd Mon Sep 17 00:00:00 2001
From: Adriano Peluso <catonano@gmail.com>
Date: Fri, 28 Apr 2017 09:50:07 +0200
Subject: [PATCH 1/1] gnu: Add pgmodeler.

* gnu/packages/databases.scm (pgmodeler) New variable.
---
 gnu/packages/databases.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 26706b827..4bd2f2f33 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -61,11 +61,13 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages popt)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages qt) ;; for pgmodeler
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xml)
+  #:use-module (gnu packages zip)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -1530,3 +1532,62 @@ file format to other databases such as MySQL, Oracle, Sybase, PostgreSQL,
 etc., and an SQL engine for performing simple SQL queries.")
     (license (list license:lgpl2.0
                    license:gpl2+))))
+
+(define-public pgmodeler
+  (package ;(inherit qtbase)
+    (name "pgmodeler")
+    (version "0.8.2")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "https://github.com/pgmodeler/pgmodeler/archive/v"
+                                 version
+                                 ".zip"
+                                 ))
+             (file-name (string-append name "-" version ".zip"))
+             (sha256
+              (base32
+               "1qyh56dxh7jwnrqy61qcmay38ifs7s9n2b3y2p9ia92fk01gd78k"))))
+    (native-inputs
+     `(
+       ;;("qtbase" ,qtbase)
+       ;;("zlib" ,zlib)
+       ("unzip" ,unzip)
+       ("pkg-config" ,pkg-config)       
+       ))
+    (inputs
+     `(("qtbase" ,qtbase)
+       ("postgresql" ,postgresql)
+       ("libxlm" ,libxml2)
+       ("qtsvg" ,qtsvg)))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (postgres (assoc-ref inputs "postgresql")))
+               (zero? (system* "qmake" "pgmodeler.pro"
+                               (string-append "LIBS += -L" postgres "/lib" "-lpq")
+                               (string-append "INCLUDEPATH  += " postgres "/include"))))))
+         (add-before 'configure 'fix-project-files
+                     (lambda* (#:key inputs outputs #:allow-other-keys)
+                       (let ((out    (assoc-ref outputs "out"))
+                             (qtbase (assoc-ref inputs "qtbase")))
+                         (substitute* "pgmodeler.pri"
+                           (("PREFIX = /usr/local")
+                            (string-append "PREFIX = "
+                                           out "/usr/local"))))))                            
+         (add-before 'check 'set-display
+                     (lambda _
+                       ;; make Qt render "offscreen", required for tests
+                       (setenv "QT_QPA_PLATFORM" "offscreen")
+                       #t)))))
+    (synopsis "Graphical modeler for Postgresql")
+    (description "Easily create and edit database models
+with simple and intuitive interface.
+The software's forms indicate which fields
+must be filled in order to provide
+the correct generation of SQL code.")
+    (home-page "https://www.pgmodeler.com.br")
+    (license license:gpl3)))
-- 
2.13.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-16  8:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-16  8:09 WIP pgmodeler Catonano

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).