From: nicodebo <n.debonnaire@gmail.com>
To: 67257@debbugs.gnu.org
Cc: nicodebo <nicolas.debonnaire@gmail.com>
Subject: [bug#67257] [PATCH 1/2] Add nx-libs
Date: Sat, 18 Nov 2023 08:59:17 +0100 [thread overview]
Message-ID: <0f4bcaac061c602c21179b8f9c6a6c324d450094.1700243996.git.n.debonnaire@gmail.com> (raw)
In-Reply-To: <cover.1700243996.git.n.debonnaire@gmail.com>
From: nicodebo <nicolas.debonnaire@gmail.com>
Change-Id: I13e088521d5e5577fed5d6a4b10867ca10f4293f
---
gnu/packages/nx.scm | 140 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 140 insertions(+)
create mode 100644 gnu/packages/nx.scm
diff --git a/gnu/packages/nx.scm b/gnu/packages/nx.scm
new file mode 100644
index 0000000000..9a2ec68ee9
--- /dev/null
+++ b/gnu/packages/nx.scm
@@ -0,0 +1,140 @@
+;;; 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 glib)
+ #:use-module (gnu packages gtk)
+ #:use-module (gnu packages image)
+ #:use-module (gnu packages onc-rpc)
+ #: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 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 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)))
--
2.41.0
next prev parent reply other threads:[~2023-11-18 10:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-17 18:46 [bug#67257] [PATCH 0/2] add x2goclient nicodebo
2023-11-18 7:59 ` nicodebo [this message]
2023-11-18 7:59 ` [bug#67257] [PATCH 2/2] Add x2goclient nicodebo
2024-02-22 22:08 ` [bug#67257] [PATCH v2 0/2] re: add x2goclient and nx-libs Steve George
2024-02-22 22:08 ` [bug#67257] [PATCH v2 1/2] gnu: Add nx-libs Steve George
2024-02-27 9:59 ` Ludovic Courtès
2024-03-10 0:40 ` Maxim Cournoyer
2024-02-22 22:08 ` [bug#67257] [PATCH v2 2/2] gnu: Add x2goclient Steve George
2024-02-27 10:02 ` Ludovic Courtès
2024-03-10 0:45 ` Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0f4bcaac061c602c21179b8f9c6a6c324d450094.1700243996.git.n.debonnaire@gmail.com \
--to=n.debonnaire@gmail.com \
--cc=67257@debbugs.gnu.org \
--cc=nicolas.debonnaire@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).