summaryrefslogtreecommitdiff
path: root/modules/freya/packages/qt.scm
blob: 9f0f327a119a66814d2783559996fa9cdc229ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
(define-module (freya packages qt)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix utils)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages base)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages xorg)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages qt))

(define-public qt5-styleplugins
  (let ((commit "7bd6205398b2d89b3ac083b2f6f00b197f40057a")
    (revision "1"))
  (package
    (name "qt5-styleplugins")
    (version (git-version "5.0.0" revision commit))
    (source (origin
        (method git-fetch)
        (uri (git-reference
             (url "https://github.com/qt/qtstyleplugins")
             (commit commit)))
        (file-name (git-file-name name version))
                (sha256
                 (base32
                  "0pi30l6g8bk1z83n6q6khjcm789szzz52aq1r9va6285i5j8ykac"))))
    (build-system gnu-build-system)
    (arguments
    `(#:phases (modify-phases %standard-phases
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
                (invoke "qmake"
                  (string-append "prefix=" out)))))
          (replace 'install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
                  (qt5 (assoc-ref inputs "qtbase")))
                (invoke "make" (string-append "INSTALL_ROOT=\"" out "\"") "install")
                (let ((lib (string-append out qt5 "/lib")))
                  (invoke "mv" lib out)
                  (invoke "rm" "-fr" (string-append out "/gnu"))))))
          )))
    (native-inputs
    (list qttools-5
        findutils
        coreutils))
    (inputs
    (list qtbase-5))
    (home-page "https://github.com/qt/qtstyleplugins")
    (synopsis "Additional style plugins for Qt")
    (description "Additional style plugins for Qt")
    (license license:expat))))


(define-public qt6gtk2
  (package
    (name "qt6gtk2")
    (version "0.2")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/trialuser02/qt6gtk2"
                                  "/archive/refs/tags/" version ".tar.gz"))
              (sha256
               (base32
                  "133f8ax1clbsc4ppdibfjcfz38153rznplp1sgfcrfi7bkgrm00c"))))
    (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"))
					(gtk2 (assoc-ref inputs "gtk+"))
					(x11 (assoc-ref inputs "libx11")))
				(substitute* "qt6gtk2.pri"
					(("UI_DIR") (string-append
								  "PKG_CONFIG = "
								  (assoc-ref inputs "pkg-config")
								  "/bin/pkg-config"
								  "\nPKG_CONFIG_PATH = "
								  gtk2 "/include" ":" x11 "/include"
								  "\nUI_DIR")))
                (invoke "qmake"
                  (string-append "prefix=" out))
				)))
          (replace 'install
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
                  (qt5 (assoc-ref inputs "qtbase")))
                (invoke "make" (string-append "INSTALL_ROOT=\"" out "\"") "install")
                (let ((lib (string-append out qt5 "/lib")))
                  (invoke "mv" lib out)
                  (invoke "rm" "-fr" (string-append out "/gnu"))))))
          )))
    (native-inputs
      (list pkg-config
			qttools
            coreutils))
    (inputs
      (list qtbase
            gtk+-2
			libx11
			libxkbcommon))
    (home-page "")
    (synopsis "")
    (description "")
    (license license:expat)))