From 8f3637145268c5e8aaddc34d44dce78ee093432a Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 29 Jun 2023 09:31:56 -0500 Subject: [PATCH] adding pkgs in guix and the linux-run script --- guix/home.scm | 46 +++---------------- guix/pkgs/emacs-xyz.scm | 39 ++++++++++++++++ guix/pkgs/tridactyl-native.scm | 81 ++++++++++++++++++++++++++++++++++ scripts/linux-run | 6 +++ 4 files changed, 133 insertions(+), 39 deletions(-) create mode 100644 guix/pkgs/emacs-xyz.scm create mode 100644 guix/pkgs/tridactyl-native.scm create mode 100755 scripts/linux-run diff --git a/guix/home.scm b/guix/home.scm index 3d4d8df..8e25b01 100644 --- a/guix/home.scm +++ b/guix/home.scm @@ -5,6 +5,8 @@ ;; (define-module (home) + #:use-module (pkgs emacs-xyz) + #:use-module (pkgs tridactyl-native) #:use-module (home-services pipewire) #:use-module (gnu home) #:use-module (gnu home services) @@ -24,17 +26,6 @@ #:use-module (guix build-system emacs) #:use-module ((guix licenses) #:prefix license:)) - -;; (define home-scripts -;; (package -;; (name "home-scripts") -;; (version "0.1") -;; (source (local-file "../scripts" #:recursive #t)) -;; (build-system copy-build-system) -;; (arguments -;; `(#:install-plan -;; '(()))))) - (define home-packages (list "vim" "exa" @@ -87,6 +78,7 @@ "breeze" "breeze-icons" "kdeconnect" + ;; "tridactyl-native" "qtwayland@5.15.8" ;; "qtwayland" "egl-wayland" @@ -137,6 +129,7 @@ "emacs-use-package" "emacs-exec-path-from-shell" "emacs-langtool" + "emacs-avy" "emacs-general" "emacs-evil" "emacs-evil-collection" @@ -215,31 +208,6 @@ "isync" "mu")) -(define emacs-dired-rsync - (let ((commit "c4f484bff94ed2ddfe0fa45f1e695a1637e1a35a") - (revision "0")) - (package - (name "emacs-dired-rsync") - (version (git-version "0.0.1" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/stsquad/dired-rsync.git") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0000000000000000000000000000000000000000000000000000")))) - (build-system emacs-build-system) - (arguments (list #:emacs emacs-next-pgtk)) - (license license:gpl3+) - (home-page "https://github.com/stsquad/dired-rsync.git") - (synopsis "dired-rsync – asynchronous rsync from dired") - (description "\ -This package adds the command dired-rsync which allows the user to copy -marked files in a dired buffer via rsync.")))) - (home-environment (packages (specifications->packages home-packages)) @@ -265,14 +233,14 @@ marked files in a dired buffer via rsync.")))) ("GTK_USE_PORTAL" . "1") ("EDITOR" . "emacsclient -t -a") ("VISUAL" . "emacsclient -c -a"))) - (bashrc (list (plain-file "blesh" "source .guix-home/profile/share/blesh/ble.sh") - (plain-file "home-manager" "source .nix-profile/etc/profile.d/hm-session-vars.sh") + (bashrc (list (plain-file "blesh" "source $HOME/.guix-home/profile/share/blesh/ble.sh") + (plain-file "home-manager" "source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh") ;;These need to be here so they are at the bottom and therefore after guix-defaults (plain-file "exal" "alias ls=\"exa -l\"") (plain-file "exala" "alias la=\"exa -la\"") (plain-file "less-color" "export LESS=\"--RAW-CONTROL-CHARS\"") (plain-file "man-colors" "[[ -f ~/.LESS_TERMCAP ]] && . ~/.LESS_TERMCAP") - (plain-file "starship" "source .config/starship/init.sh"))))) + (plain-file "starship" "source $HOME/.config/starship/init.sh"))))) (simple-service 'extra-env-vars home-environment-variables-service-type `(("PATH" . "$PATH:/home/chris/bin:/home/chris/.nix-profile/bin") diff --git a/guix/pkgs/emacs-xyz.scm b/guix/pkgs/emacs-xyz.scm new file mode 100644 index 0000000..a797c8a --- /dev/null +++ b/guix/pkgs/emacs-xyz.scm @@ -0,0 +1,39 @@ + + +(define-module (pkgs emacs-xyz) + #:use-module (gnu packages) + #:use-module (gnu packages vim) + #:use-module (gnu packages rust-apps) + #:use-module (gnu packages video) + #:use-module (gnu packages gnupg) + #:use-module (gnu services) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system emacs) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public emacs-dired-rsync + (let ((commit "c4f484bff94ed2ddfe0fa45f1e695a1637e1a35a") + (revision "0")) + (package + (name "emacs-dired-rsync") + (version (git-version "0.0.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/stsquad/dired-rsync.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0000000000000000000000000000000000000000000000000000")))) + (build-system emacs-build-system) + (arguments (list #:emacs emacs-next-pgtk)) + (license license:gpl3+) + (home-page "https://github.com/stsquad/dired-rsync.git") + (synopsis "dired-rsync – asynchronous rsync from dired") + (description "\ +This package adds the command dired-rsync which allows the user to copy +marked files in a dired buffer via rsync.")))) diff --git a/guix/pkgs/tridactyl-native.scm b/guix/pkgs/tridactyl-native.scm new file mode 100644 index 0000000..a55cb77 --- /dev/null +++ b/guix/pkgs/tridactyl-native.scm @@ -0,0 +1,81 @@ + +(define-module (pkgs tridactyl-native) + #:use-module (gnu packages) + #:use-module (gnu packages nim) + #:use-module (gnu services) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system gnu) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public nim-tempfile + (let ((commit "96fe74e69838c99641e4f7138c987d5f346c26f1") + (revision "0")) + (package + (name "nim-tempfile") + (version (git-version "0.1.7" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OpenSystemsLab/tempfile.nim.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "19w6vv95fm625q6257ibjhvwsdzzjb15qg73k4hcziqhca1f1fm7")))) + (build-system gnu-build-system) + (arguments `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (invoke "nimble" "build")))))) + (inputs (list nim)) + (license license:expat) + (home-page "https://github.com/tridactyl/native_messenger.git") + (synopsis "This small application allows Tridactyl to communicate with your system") + (description "\ +This small application allows Tridactyl to communicate with your system, allowing Tridactyl to: + - read files on your computer, including RC configuration files + - write files to your computer + - launch applications, including opening about:* tabs in Firefox + - and generally do arbitrary stuff in userspace.")))) + +(define-public tridactyl-native + (let ((commit "62f19dba573b924703829847feb1bfee68885514") + (revision "0")) + (package + (name "tridactyl-native") + (version (git-version "0.3.7" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tridactyl/native_messenger.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "015x6yx0f4s2digmkay6dbv8hfy5p6rhcy16108xf8swy5qxaq30")))) + (build-system gnu-build-system) + (arguments `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (setenv "XDG_CACHE_HOME" "./cache-home") + (setenv "HOME" "./cache-home") + (mkdir-p "./cache-home") + (invoke "nimble" "build")))))) + (inputs (list nim nim-tempfile)) + (license license:bsd-2) + (home-page "https://github.com/tridactyl/native_messenger.git") + (synopsis "This small application allows Tridactyl to communicate with your system") + (description "\ +This small application allows Tridactyl to communicate with your system, allowing Tridactyl to: + - read files on your computer, including RC configuration files + - write files to your computer + - launch applications, including opening about:* tabs in Firefox + - and generally do arbitrary stuff in userspace.")))) diff --git a/scripts/linux-run b/scripts/linux-run new file mode 100755 index 0000000..cf9f4fe --- /dev/null +++ b/scripts/linux-run @@ -0,0 +1,6 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$LIBRARY_PATH +RUNNER=$(find ~/.guix-profile/lib/ -name 'ld-linux-*.so*') + +$RUNNER "$@"