summaryrefslogtreecommitdiff
path: root/digilent-agent.scm
diff options
context:
space:
mode:
Diffstat (limited to 'digilent-agent.scm')
-rw-r--r--digilent-agent.scm91
1 files changed, 49 insertions, 42 deletions
diff --git a/digilent-agent.scm b/digilent-agent.scm
index b42c73d..c834550 100644
--- a/digilent-agent.scm
+++ b/digilent-agent.scm
@@ -1,65 +1,72 @@
(define-module (digilent-agent)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
- #:use-module (guix build-system cmake)
+ #:use-module (guix build-system qt)
#:use-module (gnu packages qt))
(define-public digilent-agent
- (let ((commit-ref "ff1d7539d714f4e8883448475adb1955eec83706"))
+ (let ((revision "2")
+ (commit "0fdfa84e9cdc101731b17cc59df8bd22cdbc6e68"))
(package
(name "digilent-agent")
- (version commit-ref)
+ (version (git-version "1.0.1" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
;; It's my own fork, not the Digilent official one
;; because I removed tracking
(url "https://github.com/ekaitz-zarraga/digilent-agent")
- (commit commit-ref)
+ (commit commit)
(recursive? #t)))
(file-name (git-file-name name version))
(sha256
- (base32 "1rm6iysdba9p2iqd1yig02dav4z0h3ppwcqy5chhd229ma4c7173"))))
- (build-system cmake-build-system)
+ (base32 "1nzkfj5wpazpi3r49s47i923kbcbw34qp81b8s8l9v3p8cq8s2j0"))))
+ (build-system qt-build-system)
(native-inputs
- `(("qtserialport" ,qtserialport)
- ("qtbase" ,qtbase)))
+ `(("qtserialport" ,qtserialport-5)
+ ("qtbase" ,qtbase-5)))
(arguments
- `(#:tests? #f
+ (list
+ #:tests? #f
#:phases
- (modify-phases
- %standard-phases
- (replace
- 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- ; Need o overwrite stuff in digilent-agent.pro from:
- ; 8< ----
- ; TARGET = digilent-agent
- ; target.path = /usr/bin
- ;
- ; wwwRoot.path = /usr/share/digilent-agent/www
- ; wwwRoot.files = www/*
- ;
- ; INSTALLS += target
- ; INSTALLS += wwwRoot
- ; ---- >8
- ; Where it says /usr/ we need to add our output dir
- (substitute* "digilent-agent.pro"
- (("\\/usr\\/bin")
- (string-append out "/bin"))
- (("\\/usr\\/share")
- (string-append out "/share")))
- (substitute* "src/main.cpp"
- (("\\/usr\\/share")
- (string-append out "/share")))
- (invoke "qmake")))))))
- (synopsis "Digilent connector for Digilent devices such as OpenScope
- MZ")
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'fix-pro
+ (lambda _
+ (let ((out #$output))
+ ; Need o overwrite stuff in digilent-agent.pro from:
+ ; 8< ----
+ ; TARGET = digilent-agent
+ ; target.path = /usr/bin
+ ;
+ ; wwwRoot.path = /usr/share/digilent-agent/www
+ ; wwwRoot.files = www/*
+ ;
+ ; INSTALLS += target
+ ; INSTALLS += wwwRoot
+ ; ---- >8
+ ; Where it says /usr/ we need to add our output dir
+ (substitute* "digilent-agent.pro"
+ (("\\/usr\\/bin")
+ (string-append out "/bin"))
+ (("\\/usr\\/share")
+ (string-append out "/share")))
+ (substitute* "src/main.cpp"
+ (("\\/usr\\/share")
+ (string-append out "/share")))
+ (substitute* "share/applications/digilent-agent.desktop"
+ (("\\/usr\\/bin")
+ (string-append out "/bin"))))))
+ (replace 'configure
+ (lambda _ (invoke "qmake")))
+ (add-after 'install 'install-desktop
+ (lambda _ (copy-recursively "share"
+ (string-append #$output "/share")))))))
+ (synopsis "Digilent connector for Digilent devices such as OpenScope MZ")
(description "The Digilent Agent is a service that runs in the system
- tray and enables browser based applications to communicate with
- Digilent hardware.")
+tray and enables browser based applications to communicate with Digilent
+hardware.")
(home-page
- "https://reference.digilentinc.com/reference/software/digilent-agent/start")
- (license license:lgpl3))))
+"https://digilent.com/reference/software/digilent-agent/start")
+ (license (list license:gpl3 license:expat)))))