unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob dd336b309f0e24c1da06447e37f78b3a7364f89d 10204 bytes (raw)
name: gnu/packages/nx.scm 	 # note: path name is non-authoritative(*)

  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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
 
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages nx)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages commencement)
  #:use-module (gnu packages cups)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages image)
  #:use-module (gnu packages man)
  #:use-module (gnu packages onc-rpc)
  #:use-module (gnu packages openldap)
  #:use-module (gnu packages patchutils)
  #:use-module (gnu packages perl)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages python)
  #:use-module (gnu packages qt)
  #:use-module (gnu packages ssh)
  #:use-module (gnu packages xdisorg)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages xorg)
  #:use-module (guix build utils)
  #:use-module (guix build-system gnu)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix licenses)
  #:use-module (guix packages))

(define-public nx-libs
  (package
    (name "nx-libs")
    (version "3.5.99.27")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://github.com/ArcticaProject/nx-libs")
             (commit version)))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0ykbza39ksycpyydaiwwbp7hkmdk96v7b36pn989k39lhfwnn8kz"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (delete 'configure)
                  (add-before 'build 'replace-shebang-nxdialog
                    (lambda _
                      (substitute* "nxdialog/bin/nxdialog"
                        (("#!/usr/bin/env python")
                         (string-append "#!"
                                        (which "python3"))))))
                  (add-before 'build 'fix-makefile
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (etc (string-append out "/etc")))
                        (mkdir-p etc)
                        (substitute* "Makefile"
                          (("^gzip -f") "gzip -f -n") ;; reproducible build
                          (("/usr/local")
                           out)
                          (("/etc/nxagent")
                           etc)
                          (("./configure")
                           (string-append "CONFIG_SHELL="
                                          (which "sh")
                                          " SHELL="
                                          (which "sh")
                                          " "
                                          (which "sh")
                                          " ./configure")))
                        (substitute* '("nx-X11/config/cf/site.def")
                          (("#include <host.def>")
                           (string-append "#include <host.def>" "\n"
                                          "#define BourneShell "
                                          (which "sh")))
                          (("/usr/local")
                           out))
                        ;; Workaround the following error during the build
                        ;; process: invalid input: ("_" #<procedure which (program)>)
                        (substitute* '("nx-X11/Makefile")
                          (("which")
                           "echo"))
                        #t)))
                  (replace 'build
                    (lambda _
                      (invoke "make" "IMAKE_DEFINES=\"-DUseTIRPC=1\"") #t))
                  (add-before 'validate-runpath 'link-libraries
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (lib (string-append out "/lib"))
                             (lib-nx-x11 (string-append lib "/nx/X11")))
                        ;; TODO: Should I use symlink instead of install-file ?
                        (for-each (lambda (file)
                                    (install-file file lib-nx-x11))
                                  (list (string-append lib "/libXcomp.so.3")
                                        (string-append lib
                                                       "/libXcompshad.so.3")
                                        (string-append lib "/libNX_X11.so.6")))
                        #t))))))
    (native-inputs (list autoconf
                         automake
                         libtool
                         pkg-config
                         libpng
                         libjpeg-turbo
                         xkbcomp
                         libxfont
                         libxdamage
                         libxrandr
                         libxtst
                         libxext
                         libxcomposite
                         libxinerama
                         libxpm
                         libxml2
                         font-util
                         pixman
                         gccmakedep
                         imake
                         quilt
                         libtirpc
                         gcc-toolchain))
    ;; python-pygobject inputs: fix `import gi` error when executing nxdialog
    ;; gtk+: also needed at runtime by the `gi` python librairy
    (propagated-inputs (list perl python-3 python-2 python-pygobject gtk+))
    (synopsis "NX remote desktop library")
    (description
     "NX technology also known as NX or NoMachine is a protocol that enables
remote desktop access.  It's maintained by the artica project, x2go
developpers and TheQVD.")
    (home-page "https://github.com/ArcticaProject/nx-libs")
    (license gpl2)))

(define-public x2goclient
  (package
    (name "x2goclient")
    (version "4.1.2.3")
    (source
     (origin
       (method url-fetch)
       ;; the tar.gz was checked against x2goclient-4.1.2.3.tar.gz.md5
       ;; provided by x2go team
       (uri (string-append
             "https://code.x2go.org/releases/source/x2goclient/x2goclient-"
             version ".tar.gz"))
       (sha256
        (base32 "0g6aba8kpsixq4486a8mga945lp31y0mzwa2krs5qqiiip3v72xb"))))
    (build-system gnu-build-system)
    (arguments
     `(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (delete 'configure)
                  (add-before 'build 'fix-makefile
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (etc (string-append out "/etc")))
                        (mkdir-p etc)
                        (substitute* "Makefile"
                          (("= 4")
                           "= 5") ;use qt5 instead of qt4
                          (("-o root -g root") ;from archlinux
                           "")
                          (("/usr/local")
                           out)
                          (("/etc/x2go")
                           etc)
                          ;; KLUDGE part1 (from guix package smplayer)
                          ;; A KLUDGE to turn off invoking lrelease on the
                          ;; project for now, because it fails consistently
                          ;; with "WARNING: Could not find qmake spec
                          ;; 'default'". See below.
                          (("lrelease")
                           "true")
                          (("qmake")
                           (which "qmake")))
                        (substitute* "src/onmainwindow.cpp"
                          (("/usr/sbin/sshd")
                           (which "sshd"))) ;x2goclient nix package does this substitution
                        #t)))
                  ;; I could not succeed in packaging the man2html program
                  ;; needed to build the html version of the documentation.
                  ;; That's why instead of running the bare make which needs
                  ;; man2html in one of its target, I run build_client then install_man.
                  (replace 'build
                    (lambda _
                      (invoke "make" "build_client") #t))
                  (add-after 'build 'build-man
                    (lambda _
                      (invoke "make" "install_man") #t))
                  ;; KLUDGE part2
                  ;; Due to the above, we must run lrelease separately on each .ts file
                  ;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
                  ;; project, as the Makefile does normally without the above kludge).
                  (add-after 'build 'compile-ts-files
                    (lambda _
                      (for-each (lambda (file)
                                  (invoke "lrelease" file))
                                (find-files "./" "\\.ts$")))))))
    (native-inputs (list pkg-config
                         qttools-5
                         qtbase-5
                         qtx11extras
                         qtsvg-5
                         libssh
                         cups
                         libxpm
                         openldap
                         gcc-toolchain))
    (propagated-inputs (list perl nx-libs openssh xauth))
    (synopsis "Remote Desktop/Remote Application solution")
    (description
     "x2goclient allows you to connect to a remote graphical desktop over the
network through ssh")
    (home-page "http://x2go.org/")
    (license gpl2)))

debug log:

solving dd336b309f ...
found dd336b309f in https://yhetil.org/guix-patches/c8d41cbd83fc493d63e55d9a77fa879598dac5dd.1700243996.git.n.debonnaire@gmail.com/
found 9a2ec68ee9 in https://yhetil.org/guix-patches/0f4bcaac061c602c21179b8f9c6a6c324d450094.1700243996.git.n.debonnaire@gmail.com/

applying [1/2] https://yhetil.org/guix-patches/0f4bcaac061c602c21179b8f9c6a6c324d450094.1700243996.git.n.debonnaire@gmail.com/
diff --git a/gnu/packages/nx.scm b/gnu/packages/nx.scm
new file mode 100644
index 0000000000..9a2ec68ee9


applying [2/2] https://yhetil.org/guix-patches/c8d41cbd83fc493d63e55d9a77fa879598dac5dd.1700243996.git.n.debonnaire@gmail.com/
diff --git a/gnu/packages/nx.scm b/gnu/packages/nx.scm
index 9a2ec68ee9..dd336b309f 100644

Checking patch gnu/packages/nx.scm...
Applied patch gnu/packages/nx.scm cleanly.
Checking patch gnu/packages/nx.scm...
Applied patch gnu/packages/nx.scm cleanly.

index at:
100644 dd336b309f0e24c1da06447e37f78b3a7364f89d	gnu/packages/nx.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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).