+
+(define-public cmst
+ (package
+ (name "cmst")
+ (version "2019.01.13")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/andrew-bibb/cmst/releases/download/cmst-"
+ version "/cmst-" version ".tar.xz"))
+ (sha256
+ (base32 "1cn6xz2rpkf5kx5d6p2x2lh85zppjacp59l6gj3n6x12p90al1vl"))))
+ (inputs
+ `(("qtbase" ,qtbase)))
+ (native-inputs
+ `(("qttools" ,qttools)))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (invoke "qmake"
+ (string-append "PREFIX="
+ (assoc-ref outputs "out")))))
+ (add-before 'build 'fix-Makefiles
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (substitute* (find-files "." "Makefile")
+ (("INSTALL_ROOT)")
+ (string-append "INSTALL_ROOT)" out))
+ (("/usr") ""))
+ (substitute* '("apps/cmstapp/cmstapp.pro"
+ "apps/cmstapp/code/control_box/controlbox.cpp"
+ "apps/rootapp/rootapp.pro"
+ "apps/rootapp/system/org.cmst.roothelper.service"
+ "cmst.pri"
+ "cmst.pro")
+ (("/usr") out)
+ (("/etc") (string-append out "/etc")))
+ #t))))))
+ (home-page "https://github.com/andrew-bibb/cmst")
+ (synopsis "Qt frontend for Connman")
+ (description
+ "Cmst is a Qt based frontend for the @code{connman} connection manager.
+This package also provides a systemtray icon.")
+ (license x11)))