(use-modules ((ice-9 textual-ports) #:prefix textual-ports:) ((guix licenses) #:prefix licenses:) ((xyz euandreh heredoc) #:prefix heredoc:) (gnu) (gnu home) (gnu home services) (gnu home services mcron) (gnu home services shells) (gnu home services shepherd) (gnu home services xdg) (guix build-system cmake) (guix build-system gnu) (guix build-system trivial) (guix download) (guix git-download) (guix packages) (guix utils)) (use-package-modules bison busybox compression curl dunst image flex freedesktop gperf gtk hunspell javascript man pkg-config python tls vim web xdisorg xml) (heredoc:enable-syntax) (define-public abuild (package (name "abuild") (version "3.10.0") (source (origin (method url-fetch) (uri (string-append "https://gitlab.alpinelinux.org/alpine/abuild/-/archive/" version "/abuild-" version ".tar.gz")) (sha256 (base32 "0c272fvca2l18vm441db9s6hs70b5w1wcxk0l5aj3h1zvycwgbap")))) (build-system gnu-build-system) (arguments (list #:tests? #f ;; depends on Kyua, which depends on ATF... #:make-flags #~(list "CC=gcc" (string-append "prefix=" #$output) (string-append "sysconfdir=" #$output "/etc")) #:phases #~(modify-phases %standard-phases (delete 'configure)))) (inputs (list busybox openssl zlib)) (native-inputs (list pkg-config scdoc)) (synopsis "Alpine Linux build tools") (description "abuild is the main tool used in Alpine Linux to build, update and maintain \".apk\" packages.") (home-page "https://gitlab.alpinelinux.org/alpine/abuild") (license licenses:gpl2+))) (define-public apk-tools (package (name "apk-tools") (version "2.12.11") (source (origin (method url-fetch) (uri (string-append "https://gitlab.alpinelinux.org/alpine/apk-tools/-/archive/v" version "/apk-tools-v" version ".tar.gz")) (sha256 (base32 "1iani00slrv3lpva8p1k7aivrd8pfgf8xw36j1h2k9qmsn6wvhic")))) (build-system gnu-build-system) (arguments (list #:make-flags #~(list "LUA=no" (string-append "LDFLAGS=-g -Wl,-rpath=" #$output "/lib") (string-append "DOCDIR=" #$output "/share/doc/apk") (string-append "INCLUDEDIR=" #$output "/include") (string-append "LIBDIR=" #$output "/lib") (string-append "MANDIR=" #$output "/share/man") (string-append "PKGCONFIGDIR=" #$output "/lib/pkgconfig") (string-append "SBINDIR=" #$output "/sbin")) #:phases #~(modify-phases %standard-phases (delete 'configure)))) (inputs (list openssl zlib)) (native-inputs (list pkg-config scdoc)) (synopsis "Alpine package manager") (description "Alpine Package Keeper (apk) is a package manager originally built for Alpine Linux, but now used by several other distributions as well.") (home-page "https://gitlab.alpinelinux.org/alpine/apk-tools") (license licenses:gpl2))) (define-public neosurf (package (name "neosurf") (version "aa1a1e60bc56bf58c389647c7db8cad7cdc1528d") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/CobaltBSD/neosurf") (commit version))) (sha256 (base32 "0yyna9mnvsa7n83ngxh7czww3ih8rhj2b52ik25nah2w3gjiqmw9")))) (build-system cmake-build-system) #; (arguments (list #:make-flags #~(list (string-append "NSSHARED=" ;;() "")))) (native-inputs (list bison flex gperf nsgenbind pkg-config python xxd)) (inputs (list cairo curl duktape gtk+ libcss libxml2 libjpeg-turbo libpng libpsl libwebp libxkbcommon openssl pango wayland)) (synopsis "A fork of Netsurf with improvements and additions") (description "NeoSurf has a different development vision from NetSurf. Current focus is on general improvements to the codebase, as well as fixing a number of issues and bugs that were present in the most recent versions of NetSurf. Biggest differences from NetSurf: @itemize @item @url{https://sr.ht/~sircmpwn/visurf/, Visurf support}, with various upstream improvements and fixes @item Various upstream improvements and UI enhancements to Gtk frontend @item Removed compatibility for super old and/or obscure libraries/software/operating systems @item Dedicated LibreSSL support @item Various privacy improvements @item Rewritten build system @item Simplified frontend development @end itemize") (home-page "https://github.com/CobaltBSD/neosurf") (license licenses:gpl2))) (define-public hunspell-iconv (package (inherit hunspell) (name "hunspell-iconv") (inputs `(("libiconv" ,libiconv) ,@(package-inputs hunspell))))) (define-public curl-openssl (package (inherit curl) (arguments (substitute-keyword-arguments (package-arguments curl) ((#:configure-flags flags ''()) #~(list (string-append "--with-openssl=" (assoc-ref %build-inputs "openssl")))))) (inputs `(("openssl" ,openssl-3.0) ,@(package-inputs curl))))) (define (hunspell-dictionary-utf8 dict-name) (package (name (string-append "hunspell-dict-" dict-name "-utf8")) (version "630b34e6f8f3cbe7aa7b27b6d8ab118e27252fd1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/wooorm/dictionaries") (commit version))) (file-name (git-file-name "hunspell-dictionary-utf8" version)) (sha256 (base32 "1iknwzh5h04m067ddw9hlzc1qqj4mr9mdkcfapsnay304laaiyn5")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let ((source-prefix (string-append (assoc-ref %build-inputs "source") "/dictionaries/" ,dict-name "/index")) (install-prefix (string-append %output "/share/hunspell/"))) (mkdir-p install-prefix) (copy-file (string-append source-prefix ".aff") (string-append install-prefix ,dict-name ".aff")) (copy-file (string-append source-prefix ".dic") (string-append install-prefix ,dict-name ".dic")))))) (synopsis (string-append "Hunspell " dict-name " dictionary in UTF-8")) (description (string-append "Hunspell " dict-name " dictionary in UTF-8")) (license licenses:expat) (home-page "https://github.com/wooorm/dictionaries"))) (define cmucl (package (name "cmucl-binary") (version "21b") (source (origin (method url-fetch) (uri (string-append "https://common-lisp.net/project/cmucl/downloads/release/" version "/cmucl-" version "-x86-linux.tar.bz2")) (sha256 (base32 "13k3b5ygnbsq6n2i3r5i4ljw3r1qlskn2p5f4x9hrx6vfvbb3k7a")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let ((source (assoc-ref %build-inputs "source")) (bin (string-append %output "/bin"))) (mkdir-p bin) (copy-file (string-append source "/bin/lisp") (string-append bin "/lisp")))))) (home-page "https://www.cons.org/cmucl/") (synopsis "The CMU implementation of Common Lisp") (description #"- CMUCL is a free implementation of the Common Lisp programming language which runs on most major Unix platforms. It mainly conforms to the ANSI Common Lisp standard."#) (license licenses:public-domain))) (define (slurp name) (string-trim-both (call-with-input-file name textual-ports:get-string-all))) (define (script name content) (package (name name) (version "latest") (source #f) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) #:builder (begin (use-modules (guix build utils)) (let* ((bin (string-append %output "/bin")) (prog (string-append bin "/" ,name))) (mkdir-p bin) (call-with-output-file prog (lambda (port) (format port "~a" ,content))) (chmod prog #o755))))) (home-page "") (synopsis "") (description "") (license #f))) (define cronjobs (list #~(job "0 0 * * *" "cronjob check") #~(job "0 1 * * *" "cronjob backup -q cron") #~(job "0 2 * * 0" "cronjob gc") #~(job "0 3 * * *" "cronjob reconfigure -U"))) (define (home-service name package bin) (service-type (name name) (extensions (list (service-extension home-shepherd-service-type (lambda _ (list (shepherd-service (provision (list name)) (documentation (format #f "Shepherd service that manages ~a." name)) (start #~(make-forkexec-constructor (list #$(file-append package bin)))) (stop #~(make-kill-destructor)))))) (service-extension home-profile-service-type (lambda _ (list package))))) (default-value '()) (description (format #f #"- Service that runs ~a as a daemon under Shepherd. It has no configuration."# name)))) (define xdg-prefix "$HOME/.usr") (define (xdg path) (string-append xdg-prefix "/" path)) (define work-packages (append (list curl-openssl) (map (compose list specification->package+output symbol->string) '(openfortivpn)))) (home-environment (packages (append (map (compose list specification->package+output symbol->string) '(nss-certs nss:bin glibc-locales bash coreutils findutils diffutils time grep sed tar gawk bc nvi patchelf universal-ctags man-pages man-pages-posix bash-completion git git:send-email git:gui git-open git-remote-gcrypt git-lfs mercurial fossil darcs subversion cvs rcs ;; cssc ; broken quilt td wget tmux tmux-plugin-resurrect tmux-plugin-continuum texinfo gnupg rsync cryfs sshfs tree mailutils-sendmail smartmontools entr pulseaudio password-store playerctl pinentry-gtk2 diffoscope disorderfs reprotest bmake make tup autoconf automake libtool pcre:out pcre:bin pcre:doc pcre:static pcre2 avahi libgcrypt qbe cproc doxygen gperf blktrace readline gmp help2man libtomcrypt libtommath lz4 lokke meson ninja sparse ant mpc maven pkg-config pkgconf fzf ranger blueman pavucontrol ledger gnuplot bind:utils tcpdump nmap stunnel netcat siege curl:doc xclip cloc strace file urlscan rlwrap direnv borg khal khard libfaketime qrencode feh sox xset graphviz moreutils shellcheck gettext lilypond groff groff:doc mandoc grap ghostscript enscript texlive-bin jq xmlstarlet recutils units ncurses trash-cli lsof autojump unzip powertop md4c timidity++ cmark cmake makefile2graph po4a mdpo gron reptyr qpdf xpdf qpdf perf-tools scdoc rpm pax-utils dpkg fakeroot cpio pv httpd ;; for htpasswd nixfmt acl attr ;; for compiling ECL libatomic-ops libgc libffi ;; for compiling CLISP libffcall libsigsegv cryptsetup btrfs-progs sysstat rrdtool flatpak xdg-desktop-portal sqlite clojure clojure-tools leiningen openjdk@11 rename mb2md sharutils perl perl-dbi perl-dbd-sqlite ;; perl-critic ; broken perl-json perl-mojolicious perl-regexp-grammars perl-commonmark perl-aliased perl-uri-escape ruby jupyter clinfo pocl opencl-icd-loader pciutils usbutils python-pyopencl python-pandas python-scikit-learn python python-sphinx python-sphinx-rtd-theme python-slixmpp python-unidecode ;; python-yubikey-manager ; broken: bad dependency python-pytest-cov python-pytest-xdist python-requests python-beautifulsoup4 python-docx python-telegram-bot python-docutils python-mkdocs valgrind flex bison byacc rust rust:cargo rust:rustfmt avr-toolchain gcc-toolchain gdb clang-toolchain@14 tcc fuse node quickjs m4 go xrandr arandr fswatch rust rust:cargo rust:rustfmt vala tcl expect zig openjdk:jdk adb sdkmanager openssl libsodium ;; Arduino python-pyserial sbcl gcl ecl clisp ccl abcl janet kawa chez-scheme racket chibi-scheme ; chicken ; broken: conflicts with gcc-toolchain gambit-c gauche dash fish rc es tcsh zsh oksh loksh mksh oil gash nushell gtk gtk:bin gtk:doc glade ; libglade ; broken: conflicts with zathura cambalache tk qtbase qtbase:debug qtdeclarative st i3status scrot xmessage dmenu xmodmap brightnessctl xss-lock libevent weechat qtox telescope imagemagick ffmpeg pandoc mktorrent jekyll flac mediainfo libnotify espeak-ng procps htop btop zenity util-linux lightning lmdb bdb guile guile-colorized guile-gcrypt guile-git guile-gnutls guile-json guile-lib guile-lzlib guile-ssh guile-readline guile-sqlite3 guile-zlib guile-heredoc gzip xz bzip2 lzip lzop which libxml2 psmisc less nano patch youtube-dl ;; for compiling netsurf glib:bin libcss libdom libnsutils utf8proc ;; for compiling neosurf libpsl libwebp ;; ArchiveBox and some of its optional dependencies ; archivebox ; broken ripgrep ;; poezio ; broken freetalk mcabber profanity newsboat mpv vlc hicolor-icon-theme font-openmoji electrum keepassxc ;; frescobaldi ; broken cheese ; webcam ;; zbar ; version conflict with qtbase ; scan QR code from webcam gpodder gnome-disk-utility mate-calc telegram-desktop zathura zathura-djvu zathura-pdf-poppler zathura-ps dino poedit transmission transmission:gui audacity inkscape libreoffice quodlibet filezilla icedove netsurf firefox)) (list ;; cmucl abuild apk-tools ;; neosurf hunspell-iconv (hunspell-dictionary-utf8 "en") (hunspell-dictionary-utf8 "pt") (hunspell-dictionary-utf8 "fr") (hunspell-dictionary-utf8 "eo") (hunspell-dictionary-utf8 "es") (script "cronjob" (slurp (string-append (getenv "XDG_CONFIG_HOME") "/sh/cronjob.sh")))) work-packages)) (services (list (service (home-service 'clipmenu clipmenu "/bin/clipmenud")) (service (home-service 'dunst dunst "/bin/dunst")) (service (home-service 'poweralertd poweralertd "/bin/poweralertd")) (service home-xdg-base-directories-service-type (home-xdg-base-directories-configuration (cache-home (xdg "var/cache")) (config-home (xdg "etc")) (data-home (xdg "share")) (log-home (xdg "var/log")) (state-home (xdg "var/state")))) (simple-service 'my-shell-profile home-shell-profile-service-type (list (plain-file "my-profile" (format #f #"- export XDG_PREFIX="~a" . "$XDG_CONFIG_HOME"/sh/rc"# xdg-prefix)))) (service home-mcron-service-type (home-mcron-configuration (jobs cronjobs))))))