diff options
-rw-r--r-- | digilent-agent.scm | 91 | ||||
-rw-r--r-- | dnie.scm | 140 | ||||
-rw-r--r-- | elenq/documentation.scm | 119 | ||||
-rw-r--r-- | elenq/graphics.scm | 109 | ||||
-rw-r--r-- | elenq/tools.scm | 60 | ||||
-rw-r--r-- | guile-xyz.scm | 34 | ||||
-rw-r--r-- | hare.scm | 209 | ||||
-rw-r--r-- | scholarref.scm | 2 | ||||
-rw-r--r-- | tuxedo-keyboard.scm | 36 | ||||
-rw-r--r-- | zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch | 40 | ||||
-rw-r--r-- | zig-do-not-link-against-librt.patch | 10 | ||||
-rw-r--r-- | zig.scm | 189 |
12 files changed, 464 insertions, 575 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))))) diff --git a/dnie.scm b/dnie.scm new file mode 100644 index 0000000..b268450 --- /dev/null +++ b/dnie.scm @@ -0,0 +1,140 @@ +(define-module (dnie) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (guix download) + #:use-module (gnu packages elf) + #:use-module (gnu packages gcc) + #:use-module (gnu packages pth) + #:use-module (gnu packages gnupg) + #:use-module (gnu packages security-token) + #:use-module (guix build-system copy) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public dnie-cert + (package + (name "dnie-cert") + (version "1.6.8") + (source + (origin + (method url-fetch) + (uri + (string-append + "https://www.dnielectronico.es/descargas/distribuciones_linux/" + "libpkcs11-dnie_" version "_amd64.deb")) + (sha256 + (base32 + "028v4vv5c2lf5f9iv25838lymh3rsaxv4s9f94g61jn0n8w787c5")))) + (build-system copy-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'unpack + (lambda _ + (invoke "ar" "-x" + (string-append "libpkcs11-dnie_" #$version "_amd64.deb")) + (invoke "tar" "-xvf" "data.tar.xz")))) + #:install-plan + ''(("usr/share/libpkcs11-dnie/AC RAIZ DNIE 2.crt" + "/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt")))) + (home-page "https://www.dnielectronico.es/PortalDNIe/") + (synopsis "Certs for Spanish DNIe") + (description "Certificate only") + (license + (license:non-copyleft + "https://www.dnielectronico.es/PortalDNIe/" + "Copyright (C) 2010 Dirección General de Policía y de la Guardia Civil +All rights reserved.")))) + +(define-public libassuan0 + (package + (name "libassuan") + (version "2.5.5") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnupg/libassuan/libassuan-" + version ".tar.bz2")) + (sha256 + (base32 + "1r1lvcp67gn5lfrj1g388sd77ca6qwnmxndirdysd71gk362z34f")))) + (build-system gnu-build-system) + (arguments (if (%current-target-system) + (list #:configure-flags + #~(list (string-append + "--with-libgpg-error-prefix=" + #$(this-package-input "libgpg-error")))) + '())) + (propagated-inputs + (list libgpg-error pth)) + (home-page "https://gnupg.org") + (synopsis + "IPC library used by GnuPG and related software") + (description + "Libassuan is a small library implementing the so-called Assuan +protocol. This protocol is used for IPC between most newer +GnuPG components. Both, server and client side functions are +provided.") + (license license:lgpl2.0+))) + +(define-public libpkcs-dnie + (package + (name "libpkcs-dnie") + (version "1.6.8") + (source + (origin + (method url-fetch) + (uri + (string-append + "https://www.dnielectronico.es/descargas/distribuciones_linux/" + "libpkcs11-dnie_" version "_amd64.deb")) + (sha256 + (base32 + "028v4vv5c2lf5f9iv25838lymh3rsaxv4s9f94g61jn0n8w787c5")))) + (supported-systems (list "x86_64-linux")) + (build-system copy-build-system) + (inputs (list libassuan0 libgpg-error patchelf pcsc-lite (list gcc "lib"))) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'unpack + (lambda _ + (invoke "ar" "-x" + (string-append "libpkcs11-dnie_" #$version "_amd64.deb")) + (invoke "tar" "-xvf" "data.tar.xz"))) + (add-before 'install 'patchelf + (lambda _ + (invoke "patchelf" "usr/lib/libpkcs11-dnie-cryptopp.so" + "--set-rpath" (string-append #$gcc:lib "/lib")) + (invoke "patchelf" "usr/lib/libpkcs11-dnie.so" + "--set-rpath" (string-join + (list + #$gcc:lib + #$libassuan0 + #$libgpg-error + #$pcsc-lite + #$output) + "/lib:" + 'suffix))))) + #:install-plan + ''(("usr/lib" "/lib") + ("usr/share/doc" "/share/doc") + ("usr/share/libpkcs11-dnie/AC RAIZ DNIE 2.crt" + "/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt")))) + (home-page "https://www.dnielectronico.es/PortalDNIe/") + (synopsis "Libraries and certs for Spanish DNIe") + (description "After installation you'll need to: +@itemize +@item Install the PKCS#11 module in your browser: + `guix build dnie`/lib/libpkcs11-dnie.so +@item Install the DNIe certificate in your browser + `guix build dnie`/share/libpkcs11-dnie/AC_RAIZ_DNIE_2.crt +@end itemize +NOTE: maybe you just want to use OpenSC instead.") + (license + (license:non-copyleft + "https://www.dnielectronico.es/PortalDNIe/" + "Copyright (C) 2010 Dirección General de Policía y de la Guardia Civil +All rights reserved.")))) diff --git a/elenq/documentation.scm b/elenq/documentation.scm index 3ce728f..f255fe9 100644 --- a/elenq/documentation.scm +++ b/elenq/documentation.scm @@ -1,31 +1,122 @@ (define-module (elenq documentation) + #:use-module (elenq graphics) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system copy) #:use-module (guix gexp) #:use-module (guix git-download) - #:use-module (guix packages)) + #:use-module (guix packages) + #:use-module (gnu packages haskell-xyz)) -(define-public pandoc-templates - (let ((revision "1") - (commit "39ad0e6cf9ed895b88041f8babe59506178a6fcb")) +(define-public elenq-pandoc-templates + (let ((revision "4") + (commit "4d65ed1bf92e46d04565b9cc1188db5e57f20f37")) (package - (name "pandoc-templates") + (name "elenq-pandoc-templates") (version (git-version "0.0.0" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "git://git.elenq.tech/pandoc-templates") - (commit commit))) - (sha256 - (base32 "1z2p1dxlgivdgw79f74n2ax84xr8g0q62fsxpwag4dfdmik7131b")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "git://git.elenq.tech/pandoc-templates") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "12260xxs293g527vnpy7vs634vmd59irsy005f15320rxjbrblq7")))) (build-system copy-build-system) - (arguments (list #:install-plan ''(("pandoc" "/share/pandoc")))) + (inputs (list elenq-logos)) + (arguments + (list + #:install-plan ''(("pandoc" "/share/pandoc")) + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'set-url + (lambda _ + (for-each + (lambda (f) + (substitute* f + (("\\$elenq-directory\\$") + (string-append #$elenq-logos "/share/elenq/")))) + (list "pandoc/templates/elenq-article.latex" + "pandoc/templates/elenq-book.latex"))))))) (native-search-paths (list (search-path-specification - (variable "XDG_DATA_HOME") + (variable "XDG_DATA_DIRS") ;; Not supported by pandoc _yet_ (files '("share"))))) (home-page "http://git.elenq.tech/pandoc-templates") (synopsis "Pandoc templates for ElenQ Technology") (description "A set of well configured Pandoc templates for ElenQ Technology's documents.") (license license:asl2.0)))) + + +(define-public elenqdoc + (let ((revision "1") + (commit "1cb21742a69f681e6452a7ddd0adc9543aefd72a")) + (package + (name "elenqdoc") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "git://git.elenq.tech/elenqdoc") + (commit commit))) + (sha256 + (base32 "0fdxskf3h14vdr9w5pi18svrz40p9qkbwcn4c4rp1b1azpbfsa6s")))) + (build-system copy-build-system) + (inputs (list elenq-pandoc-templates)) + (propagated-inputs (list pandoc)) + (arguments + (list + #:install-plan ''(("elenqdoc" "/bin/elenqdoc")) + #:phases #~(modify-phases %standard-phases + (add-after 'install 'wrap + (lambda _ + (wrap-program (string-append #$output "/bin/elenqdoc") + `("ELENQDOC_DATADIR" = + (,(string-append #$elenq-pandoc-templates + "/share/pandoc/"))))))))) + (home-page "http://git.elenq.tech/") + (synopsis "Simplified pandoc wrapper for ElenQ documents") + (description "Provides `elenqdoc` command.") + (license license:asl2.0)))) + +(define-public tiddlywiki5-bob + (package + (name "tiddlywiki5-bob") + (version "1.7.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OokTech/TW5-Bob") + (commit version))) + (sha256 + (base32 "0s8ssmxfc5ydn52xh8l1s8qyczy0vk6nrnwspc4in8f336vm8y4c")))) + (build-system copy-build-system) + (arguments + (list + #:install-plan ''(("./" "tiddlywiki/plugins/OokTech/Bob")))) + (home-page "https://github.com/OokTech/TW5-Bob") + (synopsis "A plugin that makes tiddlywiki a multi-user wiki on node") + (description "What does it do? +@itemize +@item Multi-User support for using/editing the same wiki(s) simultaneously +@item Multi-Wiki support - run it once and serve multiple wikis +@item Create and configure new wikis from inside the root wiki +@item Export single file wikis in a variety of ways +@item Two-way real-time syncing between the browser and file system +@item All configuration can be done from inside the wiki +@item Serve external files (like images) so you can include them in your wikis +@item Allows you to run shell scripts and commands from inside the wiki +@item Can be used as a plugin library to make plugins available to other wikis + (requires the TWederBob plugin on the other wikis to connect) +@item Inter-server federation. Different Bob servers can communicate to share + tiddlers and as chat servers/relays +@item HTTP API for interacting with the server +@end itemize") + (native-search-paths + (list (search-path-specification + (variable "TIDDLYWIKI_PLUGIN_PATH") + (files '("tiddlywiki/plugins"))))) + (license license:bsd-3))) diff --git a/elenq/graphics.scm b/elenq/graphics.scm new file mode 100644 index 0000000..172aa93 --- /dev/null +++ b/elenq/graphics.scm @@ -0,0 +1,109 @@ +(define-module (elenq graphics) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system font) + #:use-module (guix build-system copy) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (gnu packages guile) + #:use-module (gnu packages gnome)) + +(define-public font-armata + (package + (name "font-armata") + (version "0.9.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekaitz-zarraga/font-armata/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1pdlydanpay93pgkbpawii11j62m643pqkv6i6crvia198i9fnrd")))) + (build-system font-build-system) + (home-page "https://fontlibrary.org/en/font/armata") + (synopsis "Armata Font") + (description + "Armata is a new Sans Serif font by Jasper @ Cannot Into Space +Fonts. It is named after the new Russian T-14 Armata Main Battle Tank.") + (license license:silofl1.1))) + +(define-public font-b612-better + (let ((revision "1") + (commit "ab287a9876083f29d9bf83e4b71a60e79d8b657e")) + (package + (name "font-b612-better") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekaitz-zarraga/font-b612-better/") + (commit commit))) + (sha256 + (base32 "11r2blm2v82rsrl0jypi8x9r8im14q1gx57jhzdby4dia6jslsjv")))) + (build-system font-build-system) + (home-page "https://github.com/ekaitz-zarraga/font-b612-better") + (synopsis "B612 Font (improved)") + (description + "Fork of the B612 font developed by AIRBUS with a few +improvements: +@itemize +@item Proper Monospace support +@item Slashed Zero by default +@item Cleaned source blob files that required proprietary software. +@end itemize") + (license license:silofl1.1)))) + +(define-public elenq-logos + (let ((revision "1") + (commit "3612f4a88e6a06a9c0fa7cfdb81cbbf6f081a1a9")) + (package + (name "elenq-logos") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "git://git.elenq.tech/elenq-logos/") + (commit commit))) + (sha256 + (base32 "0q0a5p84vxwcj3516snnwq09i3g36idfmvpp46vsl9hcq9z53ha3")))) + (native-inputs (list librsvg font-armata guile-3.0-latest)) + (arguments + (list + #:install-plan ''(("out/" "share/elenq")) + #:phases + #~(modify-phases %standard-phases + (add-before 'install 'build + (lambda _ + (define out "out") + + (define (redirected-to-file filename . command) + (with-output-to-file filename + (lambda () (apply invoke command)))) + + (define (make-all-logo-formats subname) + (let ((base (string-append out "/elenq-" subname ".svg"))) + (redirected-to-file base "guile" "logo/elenq.scm" subname) + (invoke + "rsvg-convert" base "--format=svg" "--output" + (string-append out "/elenq-" subname ".optimized.svg")) + (for-each + (lambda (size) + (invoke + "rsvg-convert" base "--format=png" "--output" + (string-append out "/elenq-" subname "-" size ".png") + "-w" size "--keep-aspect-ratio")) + (map (lambda (x) (number->string (integer-expt 2 x))) + (iota 6 5 1))))) + + (mkdir "out") + (for-each make-all-logo-formats + (list "technology" "publishing"))))))) + (build-system copy-build-system) + (home-page "https://elenq.tech") + (synopsis "ElenQ logos") + (description "ElenQ Technology logos in different sizes and formats.") + (license license:cc-by-sa4.0)))) diff --git a/elenq/tools.scm b/elenq/tools.scm new file mode 100644 index 0000000..17b2a40 --- /dev/null +++ b/elenq/tools.scm @@ -0,0 +1,60 @@ +(define-module (elenq tools) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system guile) + #:use-module ((guix build utils) #:select (with-directory-excursion)) + #:use-module (gnu packages) + #:use-module (gnu packages guile) + #:use-module (gnu packages guile-xyz)) + +(define-public guile-simple-site-builder + (package + (name "guile-simple-site-builder") + (version "0.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "git://git.elenq.tech/guile-simple-site-builder") + (commit version))) + (sha256 + (base32 "1gfbckg34ws2nf6ng85ip82ixvdscz1dfw1wd0yn43gd336n268v")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'remove-guix.scm + (lambda _ (delete-file "guix.scm")))))) + (propagated-inputs (list guile-3.0)) + (build-system guile-build-system) + (home-page "https://git.elenq.tech/guile-simple-site-builder/") + (synopsis "Atom and an HTML index generator") + (description "A simple tool to generate an Atom and an HTML index from a +very simple scheme file.") + (license license:gpl3+))) + +(define-public reminder + (let ((revision "1") + (commit "cd2cbbb6511f6be57de2dcdcca20c76ca73e8f06")) + (package + (name "reminder") + (version "0.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekaitz-zarraga/reminder.git") + (commit commit))) + (sha256 + (base32 "0giykd6x040xd2d75sra6ziyhfic8dgr3fpyzv5v4bwzv6wafh35")))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'build 'delete-guix.scm + (lambda _ (delete-file "guix.scm")))))) + (build-system guile-build-system) + (native-inputs (list guile-3.0)) + (propagated-inputs (list guile-libnotify)) + (synopsis "Remind you things periodically") + (description "Reminder triggers desktop notifications periodically according +to a configuration file you provided.") + (home-page "none") + (license license:asl2.0)))) diff --git a/guile-xyz.scm b/guile-xyz.scm deleted file mode 100644 index 602a696..0000000 --- a/guile-xyz.scm +++ /dev/null @@ -1,34 +0,0 @@ -(define-module (guile-xyz) - #:use-module (guix gexp) - #:use-module (guix packages) - #:use-module (guix licenses) - #:use-module (guix git-download) - #:use-module (guix build-system gnu) - #:use-module ((guix build utils) #:select (with-directory-excursion)) - #:use-module (gnu packages) - #:use-module (gnu packages autotools) - #:use-module (gnu packages guile) - #:use-module (gnu packages pkg-config) - #:use-module (gnu packages gnome) - #:use-module (gnu packages texinfo)) - -(define-public guile-libnotify - (package - (name "guile-libnotify") - (version "0.1.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ekaitz-zarraga/guile-libnotify") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1x5jzjri3ffb8vccphav6kd92q1qqpaj46mwhdcblxpc5xk6cbs4")))) - (build-system gnu-build-system) - (native-inputs (list autoconf automake pkg-config #;texinfo)) - (inputs (list guile-3.0-latest libnotify)) - (synopsis "Guile bindings for libnotify") - (description "Provides bindings for GNOME's libnotify C library to Guile") - (home-page "https://github.com/ekaitz-zarraga/guile-libnotify") - (license gpl3+))) diff --git a/hare.scm b/hare.scm deleted file mode 100644 index 77c5f60..0000000 --- a/hare.scm +++ /dev/null @@ -1,209 +0,0 @@ -(define-module (hare) - #:use-module (guix packages) - #:use-module (guix utils) - #:use-module (guix gexp) - #:use-module (guix git-download) - #:use-module (guix download) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix build-system gnu) - #:use-module (guix build-system trivial) - #:use-module (gnu packages) - #:use-module (gnu packages base) - #:use-module (gnu packages c) - #:use-module (gnu packages man) - #:use-module (ice-9 match)) - - -;; Partially obtained from: -;; https://git.sr.ht/~whereiseveryone/guixrus/tree/master/item/guixrus/packages/hare.scm - -(define tzdata-list - (package - (inherit tzdata) - (name "tzdata-list") - (arguments - (list #:tests? #f - ;; This consists purely of (architecture-independent) data, so - ;; ‘cross-compilation’ is pointless here! (The binaries zic, - ;; dump, and tzselect are deleted in the post-install phase.) - #:target #f - #:make-flags - #~(let ((out #$output) - (tmp (getenv "TMPDIR"))) - (list (string-append "TOPDIR=" out) - (string-append "TZDIR=" out "/share/zoneinfo") - (string-append "TZDEFAULT=" out - "/share/zoneinfo/localtime") - - ;; Likewise for the C library routines. - (string-append "LIBDIR=" tmp "/lib") - (string-append "MANDIR=" tmp "/man") - - ;; XXX: tzdata 2020b changed the on-disk format - ;; of the time zone files from 'fat' to 'slim'. - ;; Many packages (particularly evolution-data-server) - ;; can not yet handle the latter, so we stick with - ;; 'fat' for now. - #$@(if (version>=? (package-version this-package) - "2020b") - '("CPPFLAGS=-DZIC_BLOAT_DEFAULT='\"fat\"'") - '()) - - "AWK=awk" - "CC=gcc")) - #:modules '((guix build utils) - (guix build gnu-build-system) - (srfi srfi-1)) - #:phases - #~(modify-phases %standard-phases - (replace 'unpack - (lambda* (#:key source inputs #:allow-other-keys) - (invoke "tar" "xvf" source) - (invoke "tar" "xvf" - #$(match (package-inputs this-package) - (((_ tzcode)) tzcode))))) - (add-after 'install 'post-install - (lambda* (#:key outputs #:allow-other-keys) - ;; Move data in the right place. - (let ((out (assoc-ref outputs "out"))) - (copy-file "leap-seconds.list" - (string-append out "/share/zoneinfo/leap-seconds.list")) - (symlink (string-append out "/share/zoneinfo") - (string-append out "/share/zoneinfo/posix")) - (copy-recursively (string-append out "/share/zoneinfo-leaps") - (string-append out "/share/zoneinfo/right"))))) - (delete 'configure)))))) - -(define qbe-master - (let ((commit "d023bdaa6b493686f7e9be7ac200ee4ac37d351f") - (revision "1")) - (package - (inherit qbe) - (name "qbe") - (version (git-version "1.1" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "git://c9x.me/qbe") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "11flr6mmxglidp4fr7whfzhwr1bjkiz0rcvpy541xmwm2isj5znm"))))))) - -(define-public harec - (let ((revision "1") - (commit "b4dd4275b24513d14e999bc35ea7d61ed02d1e08")) - (package - (name "harec") - (version (git-version "0.0.1" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://git.sr.ht/~sircmpwn/harec") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1brb0qr6fsi2hx724rprkkwi6qs6ymqglng78gm9m8k6z7c61j8b")))) - (build-system gnu-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'configure 'setenv - (lambda _ - (setenv "AR" ,(ar-for-target)) - (setenv "AS" ,(as-for-target)) - (setenv "LD" ,(ld-for-target)) - (setenv "CC" ,(cc-for-target)))) - (add-after 'configure 'configure-better - (lambda* (#:key outputs #:allow-other-keys) - (invoke "./configure" - (string-append "--prefix=" (assoc-ref outputs "out"))))) - (delete 'configure)))) - (inputs (list qbe-master scdoc)) - (synopsis "Bootstrapping compiler for Hare") - (description "This package provides @code{harec}, the Hare language's -bootstrap written in C. Currently, the self-hosting @code{harec} rewrite is -incomplete, so this is used as the default compiler in the build driver.") - (home-page "https://git.sr.ht/~sircmpwn/harec") - (license license:gpl3)))) - - -(define-public hare - (let ((revision "1") - (commit "b35f4bc1551bf561de2e0e1fcd7367c20fa21216")) - (package - (name "hare") - (version (git-version "0.0.1" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://git.sr.ht/~sircmpwn/hare") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0v5r7007dyy75qagffkhag1pqigdsv2qgbgwrn44d51ws695phzi")))) - (inputs (list scdoc qbe-master harec tzdata-list)) - (build-system gnu-build-system) - (arguments - (list - #:make-flags #~(list "HARECACHE=./cache" (string-append "PREFIX=" #$output)) - #:phases - #~(modify-phases %standard-phases - (add-before 'configure 'configure-make - (lambda _ - (substitute* - "time/chrono/+linux.ha" - (("/usr/share/zoneinfo/leap-seconds.list") - (string-append #$tzdata-list "/share/zoneinfo/leap-seconds.list")) - (("/usr/share/zoneinfo/") - (string-append #$tzdata-list "/share/zoneinfo/"))) - (copy-file "config.example.mk" "config.mk") - ;; We don't need to do this if we are using the toolchain - ;; below... - #;(substitute* - "config.mk" - (("AS = as") - (string-append "AS = "#$(as-for-target))) - (("LD = ld") - (string-append "LD = "#$(ld-for-target))) - (("QBE = qbe") - (string-append "QBE = " #$qbe-master "/bin/qbe")) - (("SCDOC = scdoc") - (string-append "SD =" #$scdoc "/bin/scdoc")) - (("HAREC = harec") - (string-append "HAREC =" #$harec "/bin/harec"))) - #;(substitute* - "cmd/hare/build.ha" - (("\"qbe\"") - (string-append "\"" #$qbe-master "/bin/qbe" "\"")) - (("\"harec\"") - (string-append "\"" #$harec "/bin/harec" "\""))) - )) - (delete 'configure)))) - (synopsis "Hare build driver") - (description "Hare is a systems programming language designed to be -simple, stable, and robust. Hare uses a static type system, manual memory -management, and a minimal runtime. It is well-suited to writing operating -systems, system tools, compilers, networking software, and other low-level, -high performance tasks.") - (home-page "https://git.sr.ht/~sircmpwn/hare") - (license license:gpl3)))) - -(define-public hare-toolchain - (package - (name "hare-toolchain") - (version (package-version hare)) - (source #f) - (build-system trivial-build-system) - (arguments `(#:builder (begin (mkdir %output)))) - (propagated-inputs (list binutils hare harec qbe-master)) - (native-search-paths (package-native-search-paths hare)) - (home-page (package-home-page hare)) - (synopsis "Complete @code{hare} toolchain for Hare development") - (description "This package provides a toolchain for the Hare language. It -allows you to conveniently install all the required packages (such as -@code{binutils} and @code{qbe}) into your profile.") - (license (package-license hare)))) diff --git a/scholarref.scm b/scholarref.scm index 63a50c1..19e573b 100644 --- a/scholarref.scm +++ b/scholarref.scm @@ -18,7 +18,7 @@ (source (origin (method git-fetch) (uri (git-reference - (url "git://src.adamsgaard.dk/scholarref") + (url "https://src.adamsgaard.dk/scholarref.git") (commit commit))) (sha256 (base32 "0dhx4ncjvklwc2a67f8wc8az5n3qv7nnkmknbqffaivl7fkz58bi")))) diff --git a/tuxedo-keyboard.scm b/tuxedo-keyboard.scm deleted file mode 100644 index c42f476..0000000 --- a/tuxedo-keyboard.scm +++ /dev/null @@ -1,36 +0,0 @@ -(define-module (tuxedo-keyboard) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (gnu packages linux) - #:use-module (guix git-download) - #:use-module (guix build-system linux-module)) - -(define-public tuxedo-keyboard - (let ((commit-ref "84442d0b2f3d3bff691ce8b96bb3baced4d692c0")) - (package - (name "tuxedo-keyboard") - (version commit-ref) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/tuxedocomputers/tuxedo-keyboard") - (commit commit-ref))) - (file-name (git-file-name name version)) - (sha256 - (base32 "104i050ymrj0h0p52q52mn496gchq2k1gnnvxcqffrb69gzsa153")))) - (arguments - ;; Has no tests - `(#:tests? #f)) - (native-inputs - `(("linux-headers" ,linux-libre-headers))) - (build-system linux-module-build-system) - (home-page "http://www.tuxedocomputers.com") - (synopsis "TUXEDO Computers Kernel Module for keyboard backlighting") - (description "Additions: -@itemize -@item Sysfs interface to control the brightness, mode, color, on/off state -@item DKMS Ready -@item Full RGB Color Support -@item WMI Support for FN-Keys -@end itemize") - (license license:gpl3+)))) diff --git a/zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch b/zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch deleted file mode 100644 index 388b7c5..0000000 --- a/zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch +++ /dev/null @@ -1,40 +0,0 @@ -From b0e5390d0b2add2eb33496dc465e0ab360995d15 Mon Sep 17 00:00:00 2001 -From: Ekaitz Zarraga <ekaitz@elenq.tech> -Date: Fri, 17 Nov 2023 23:20:58 +0100 -Subject: [PATCH] Revert "Never implicitly add rpaths for each lib dir, add - NixOS libdir to rpath" - -This reverts commit 6fd7c2993044b2f6f43af1c640c11be22eca426c. ---- - lib/std/zig/system/NativePaths.zig | 1 - - src/Compilation.zig | 2 +- - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/lib/std/zig/system/NativePaths.zig b/lib/std/zig/system/NativePaths.zig -index 4c8f1286b..cfa567f4b 100644 ---- a/lib/std/zig/system/NativePaths.zig -+++ b/lib/std/zig/system/NativePaths.zig -@@ -61,7 +61,6 @@ pub fn detect(arena: Allocator, native_info: NativeTargetInfo) !NativePaths { - } else if (word.len > 2 and word[0] == '-' and word[1] == 'L') { - const lib_path = word[2..]; - try self.addLibDir(lib_path); -- try self.addRPath(lib_path); - } else { - try self.addWarningFmt("Unrecognized C flag from NIX_LDFLAGS: {s}", .{word}); - break; -diff --git a/src/Compilation.zig b/src/Compilation.zig -index a08c3e09f..1c73f8467 100644 ---- a/src/Compilation.zig -+++ b/src/Compilation.zig -@@ -1542,7 +1542,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { - .llvm_cpu_features = llvm_cpu_features, - .skip_linker_dependencies = options.skip_linker_dependencies, - .parent_compilation_link_libc = options.parent_compilation_link_libc, -- .each_lib_rpath = options.each_lib_rpath orelse false, -+ .each_lib_rpath = options.each_lib_rpath orelse options.is_native_os, - .build_id = build_id, - .cache_mode = cache_mode, - .disable_lld_caching = options.disable_lld_caching or cache_mode == .whole, --- -2.41.0 - diff --git a/zig-do-not-link-against-librt.patch b/zig-do-not-link-against-librt.patch deleted file mode 100644 index 3239efb..0000000 --- a/zig-do-not-link-against-librt.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/target.zig 2023-04-22 11:44:47.917416658 +0200 -+++ b/src/target.zig 2023-04-22 11:45:04.577465352 +0200 -@@ -478,7 +478,6 @@ - "-lpthread", - "-lc", - "-ldl", -- "-lrt", - "-lutil", - }, - }, diff --git a/zig.scm b/zig.scm deleted file mode 100644 index b3c009f..0000000 --- a/zig.scm +++ /dev/null @@ -1,189 +0,0 @@ -(define-module (zig) - #:use-module (guix packages) - #:use-module (guix utils) - #:use-module (guix gexp) - #:use-module (guix git-download) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix build-system cmake) - #:use-module (guix build utils) - #:use-module (gnu packages) - #:use-module (gnu packages compression) - #:use-module (gnu packages gcc) - #:use-module (gnu packages llvm)) - -(define-public zig-0.11 - (package - (name "zig") - (version "0.11.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ziglang/zig.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0qh7c27cd4wcdjj0mbpkarvwypfk1js8hkyxs0z149qv75zkbrca")) - (patches (search-patches "zig-do-not-link-against-librt.patch" - "zig-Revert-Never-implicitly-add-rpaths-for-each-lib-dir-.patch")))) - (build-system cmake-build-system) - (arguments - `(#:configure-flags - (list ,@(if (%current-target-system) - '(string-append "-DZIG_TARGET_TRIPLE=" - (%current-target-system)) - '()) - (string-append "-DZIG_TARGET_MCPU=baseline") - "-DZIG_SHARED_LLVM=ON" - (string-append "-DZIG_LIB_DIR=" (assoc-ref %outputs "out") - "/lib/zig")) - #:validate-runpath? #f ; TODO: zig binary can't find ld-linux. - #:out-of-source? #f ; for tests - ;; Tests fails in: - ;; https://github.com/ziglang/zig/issues/18063 - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-env-variables - (lambda* (#:key inputs native-inputs #:allow-other-keys) - ;; Set CC, since the stage 2 zig relies on it to find the libc - ;; installation, and otherwise silently links against its own. - (setenv "CC" ,(cc-for-target)) - ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'. - (setenv "ZIG_GLOBAL_CACHE_DIR" - (string-append (getcwd) "/zig-cache")))) - (add-after 'patch-source-shebangs 'patch-more-shebangs - (lambda* (#:key inputs #:allow-other-keys) - ;; Zig uses information about /usr/bin/env to determine the - ;; version of glibc and other data. - (substitute* "lib/std/zig/system/NativeTargetInfo.zig" - (("/usr/bin/env") (search-input-file inputs "/bin/env"))))) - (delete 'check) - (add-after 'install 'check - (lambda* (#:key outputs tests? #:allow-other-keys) - (when tests? - (invoke (string-append (assoc-ref outputs "out") "/bin/zig") - "build" "test" - ;; We're not testing the compiler bootstrap chain. - ;; Non-native tests try to link and execute non-native - ;; binaries. - "-Dskip-non-native"))))))) - (inputs - (list clang-16 ; Clang propagates llvm. - lld-16 - zlib - (list zstd "lib"))) - ;; Zig compiles fine with GCC, but also needs native LLVM libraries. - (native-inputs - (list llvm-16)) - (native-search-paths - (list - (search-path-specification - (variable "C_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "CPLUS_INCLUDE_PATH") - (files '("include/c++" "include"))) - (search-path-specification - (variable "LIBRARY_PATH") - (files '("lib" "lib64"))))) - (synopsis "General purpose programming language and toolchain") - (description "Zig is a general-purpose programming language and -toolchain. Among other features it provides -@itemize -@item an Optional type instead of null pointers, -@item manual memory management, -@item generic data structures and functions, -@item compile-time reflection and compile-time code execution, -@item integration with C using zig as a C compiler, and -@item concurrency via async functions. -@end itemize") - (home-page "https://github.com/ziglang/zig") - (license license:expat))) - - -(define-public zig - (package - (name "zig") - (version "0.13.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ziglang/zig.git") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0ly8042lbsa8019g0d1jg4l06rxpq2530n9mijq66n4lmx7a5976")) - (patches (search-patches "zig-do-not-link-against-librt.patch")))) - (build-system cmake-build-system) - (arguments - `(#:configure-flags - (list ,@(if (%current-target-system) - '(string-append "-DZIG_TARGET_TRIPLE=" - (%current-target-system)) - '()) - (string-append "-DZIG_TARGET_MCPU=baseline") - "-DZIG_SHARED_LLVM=ON" - (string-append "-DZIG_LIB_DIR=" (assoc-ref %outputs "out") - "/lib/zig")) - #:validate-runpath? #f ; TODO: zig binary can't find ld-linux. - #:out-of-source? #f ; for tests - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'set-env-variables - (lambda* (#:key inputs native-inputs #:allow-other-keys) - ;; Set CC, since the stage 2 zig relies on it to find the libc - ;; installation, and otherwise silently links against its own. - (setenv "CC" ,(cc-for-target)) - ;; Set cache dir, otherwise Zig looks for `$HOME/.cache'. - (setenv "ZIG_GLOBAL_CACHE_DIR" - (string-append (getcwd) "/zig-cache")))) - (add-after 'patch-source-shebangs 'patch-more-shebangs - (lambda* (#:key inputs #:allow-other-keys) - ;; Zig uses information about /usr/bin/env to determine the - ;; version of glibc and other data. - (substitute* "lib/std/zig/system.zig" - (("/usr/bin/env") (search-input-file inputs "/bin/env"))))) - (delete 'check) - (add-after 'install 'check - (lambda* (#:key outputs tests? #:allow-other-keys) - (when tests? - ;; Only run behavioral tests, no-cross - (invoke (string-append (assoc-ref outputs "out") "/bin/zig") - "test" - "-I" "test" - "test/behavior.zig"))))))) - (inputs - (list (list gcc "lib") - clang-18 ; Clang propagates llvm. - lld-18 - zlib - (list zstd "lib"))) - ;; Zig compiles fine with GCC, but also needs native LLVM libraries. - (native-inputs - (list llvm-18)) - (native-search-paths - (list - (search-path-specification - (variable "C_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "CPLUS_INCLUDE_PATH") - (files '("include/c++" "include"))) - (search-path-specification - (variable "LIBRARY_PATH") - (files '("lib" "lib64"))))) - (synopsis "General purpose programming language and toolchain") - (description "Zig is a general-purpose programming language and -toolchain. Among other features it provides -@itemize -@item an Optional type instead of null pointers, -@item manual memory management, -@item generic data structures and functions, -@item compile-time reflection and compile-time code execution, -@item integration with C using zig as a C compiler, and -@item concurrency via async functions. -@end itemize") - (home-page "https://github.com/ziglang/zig") - (license license:expat))) |