;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'helm-system-packages) #@30 Dependencies needed by Guix. (defvar helm-system-packages-guix-dependencies '("guix") (#$ . 119)) (defvar helm-system-packages-guix-help-message "* Helm guix\n\nRequirements:\n\n** Commands\n\\\n\\[helm-system-packages-guix-toggle-explicit] Toggle display of explicitly installed packages.\n\\[helm-system-packages-guix-toggle-uninstalled] Toggle display of non-installed.\n\\[helm-system-packages-toggle-descriptions] Toggle display of package descriptions.") (defvar helm-system-packages-guix-map (byte-code "\301 \302\"\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\207" [helm-map make-sparse-keymap set-keymap-parent define-key [134217801] helm-system-packages-guix-toggle-explicit [134217806] helm-system-packages-guix-toggle-uninstalled "" helm-system-packages-toggle-descriptions] 5)) (defvar helm-system-packages-guix--show-uninstalled-p t) (defvar helm-system-packages-guix--show-explicit-p t) (defalias 'helm-system-packages-guix-toggle-explicit #[0 "\203\n ?\302 \207\303\304!\207" [helm-alive-p helm-system-packages-guix--show-explicit-p helm-update error "Running helm command outside of context"] 2 nil nil]) (put 'helm-system-packages-guix-toggle-explicit 'helm-only t) (defalias 'helm-system-packages-guix-toggle-uninstalled #[0 "\203\n ?\302 \207\303\304!\207" [helm-alive-p helm-system-packages-guix--show-uninstalled-p helm-update error "Running helm command outside of context"] 2 nil nil]) (put 'helm-system-packages-guix-toggle-uninstalled 'helm-only t) #@17 (fn PACKAGES) (defalias 'helm-system-packages-guix-transformer #[257 "\302\303!\211\211\203C\211@\304\305!\306\307 \310\"\"A\211\204'\203;B\262\210\202< \203;\311>\203;\312\313@#B\262\210A\266\202\202\207" [helm-system-packages-guix--show-uninstalled-p helm-system-packages-guix--show-explicit-p nil reverse assoc helm-system-packages-extract-name plist-get helm-system-packages--cache-get :display helm-system-packages-explicit propertize face] 10 (#$ . 1656)]) #@37 List explicitly installed packages. (defalias 'helm-system-packages-guix-list-explicit #[0 "\300\301\302\303\"r\211q\210\304\305\"\216\306\307\310\303#\210\311\310ed#\210\312 *\262!\207" [split-string generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] process-file-shell-command "guix package --list-installed | cut -f1" nil sort-lines buffer-string] 6 (#$ . 2148)]) #@13 (fn FORM) (defalias 'helm-system-packages-guix-el->scheme-syntax #[257 "\300\301\302\303\304\"#\207" [replace-regexp-in-string "\\\\" "" format "%S"] 7 (#$ . 2584)]) #@123 Evaluate forms in Guix REPL. Return the REPL output (including the error output) as a string. (fn FORM &rest MORE-FORMS) (defalias 'helm-system-packages-guix-eval #[385 "\302C\303\304\"\216\305\211\306\307!\240\210\310\311\305\"r\211q\210\303\312\"\216B\211\2031\211@\313!c\210A\266\202\202\210\314ed\242#\210*\210\310\315\305\"\316\216 r q\210\317\320\302\321\302\322\242&\210*r q\210\323 -\207" [inhibit-message standard-output nil make-closure #[0 "\301\300\242!\207" [V0 delete-file] 2] t make-temp-file "helm-system-packages-guix" generate-new-buffer " *temp*" #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] helm-system-packages-guix-el->scheme-syntax write-region " *string-output*" #[0 "\301!\207" [standard-output kill-buffer] 2] process-file "guix" (t t) "repl" buffer-string] 10 (#$ . 2760)]) #@62 Filename of the cache storing all Guix package descriptions. (defvar helm-system-packages-guix-cache-file (expand-file-name "helm-system-packages-guix" user-emacs-directory) (#$ . 3607)) (make-obsolete-variable 'helm-system-packages-guix-cache-file nil "1.10.2") #@35 Path to the latest guix checkout. (defvar helm-system-packages-guix-path (expand-file-name "current" "~/.config/guix") (#$ . 3876)) (make-obsolete-variable 'helm-system-packages-guix-path nil "1.10.2") (defalias 'helm-system-packages-generate-database #[0 "\300\301\302\303\304\305%\207" [helm-system-packages-guix-eval (use-modules (guix packages) (guix licenses) (guix utils) (guix build utils) (gnu packages)) (define (ensure-list l) (if (list\? l) l (list l))) (format '\#t "(~&") (fold-packages (lambda (package count) (let ((location (package-location package))) (format '\#t "(~s (:version ~s :outputs ~s :supported-systems ~s :inputs ~s :propagated-inputs ~s :native-inputs ~s :location ~s :home-page ~s :licenses ~s :synopsis ~s :description ~s))~&" (package-name package) (package-version package) (package-outputs package) (package-supported-systems package) (map car (package-inputs package)) (map car (package-propagated-inputs package)) (map car (package-native-inputs package)) (string-join (list (location-file location) (number->string (location-line location)) (number->string (location-column location))) ":") (or (package-home-page package) "") (map license-name (ensure-list (package-license package))) (package-synopsis package) (package-description package))) (+ 1 count)) 1) (format '\#t "~&)~&")] 6]) #@87 Hash-table databases indexed by host. See `helm-system-packages-guix-database-index'. (defvar helm-system-packages-guix--databases (make-hash-table :test 'equal) (#$ . 5208)) #@54 Return hostname corresponding to `default-directory' (defalias 'helm-system-packages-guix-database-index #[0 "\302!\203\303!\211\242 >\204\304\305\306D\"\210\3078\207\310\207" [default-directory cl-struct-tramp-file-name-tags tramp-tramp-file-p tramp-dissect-file-name signal wrong-type-argument tramp-file-name 4 "localhost"] 5 (#$ . 5389)]) (defalias 'helm-system-packages-guix-get-database #[0 "\301 \302\"\206\303\304!\210\305\306\307 !\310\311\312$\313#\210\211\262\207" [helm-system-packages-guix--databases helm-system-packages-guix-database-index gethash message "Building package database..." cl-sort read helm-system-packages-generate-database string< :key car puthash] 6]) #@64 Cache all package names with descriptions. (fn DISPLAY-LIST) (defalias 'helm-system-packages-guix-cache #[257 "\300\211\301\302\303 \304#\262\305\306\307#\262\310\311$\207" [nil mapconcat #[257 "\211@\301A@\302\"\303\304\305GZ\306]\307\"$\207" [helm-system-packages-column-width plist-get :synopsis format "%s%s%s" make-string 1 32] 9 "\n\n(fn NAME+PROPS)"] helm-system-packages-guix-get-database "\n" replace-regexp-in-string " .*" "" helm-system-packages--cache-set "guix"] 8 (#$ . 6095)]) #@41 Refresh the list of installed packages. (defalias 'helm-system-packages-guix-refresh #[0 "\301\302 \"\210\303 \304\211\203\211@\211\305BB\262A\266\202\202\n\210\306!\207" [helm-system-packages-guix--databases remhash helm-system-packages-guix-database-index helm-system-packages-guix-list-explicit nil (helm-system-packages-explicit) helm-system-packages-guix-cache] 6 (#$ . 6607) nil]) #@166 Print information about the selected packages. With prefix argument, insert the output at point. Otherwise display in `helm-system-packages-buffer'. (fn CANDIDATE) (defalias 'helm-system-packages-guix-info #[257 "\301\302\303\304\305\306\"\203C\202\307 \"BC!\207" [helm-in-persistent-action #[257 "\211<\203 \211\300\301\302#\207\207" [" " mapconcat identity] 7 "\n\n(fn PROP)"] helm-system-packages-show-information uninstalled mapcar make-closure #[257 "\301\302 \303\211\304%@\303\211\211\211:\203=\262\211A\262\242\262@\262\305\306\307!\310\303O\300!#B\262AA\262\202\211\237\266\205\311\312\313#\266\202B\207" [V0 alist-get helm-system-packages-guix-get-database nil string= format "%s: %s" prin1-to-string 1 "\n" mapconcat identity] 13 "\n\n(fn NAME)"] helm-marked-candidates] 8 (#$ . 7010)]) #@210 Call COMMAND ARGS PACKAGES as current user (sudo is not used). ARGS and PACKAGES must be lists. COMMAND will be run in the Eshell buffer named by `helm-system-packages-shell-name'. (fn COMMAND ARGS PACKAGES) (defalias 'helm-system-packages-guix-run #[771 "\302\303!\210\211\204\f\304\305!\207\306\"\307 \310 \210\311 \203!\304\312!\202DB\262\313\314\315\316\317$\210\313\314\320\317\211$\210db\210\321\322\323#c\210 \205D\324 )\207" [eshell-buffer-name helm-system-packages-auto-send-commandline-p require esh-mode message "No suitable package selected" append helm-system-packages-shell-name eshell eshell-interactive-process "A process is already running" add-hook eshell-post-command-hook helm-system-packages-guix-refresh nil t #[0 "\300\301\302\303#\207" [remove-hook eshell-post-command-hook helm-system-packages-guix-refresh t] 4] mapconcat identity " " eshell-send-input] 9 (#$ . 7850)]) #@36 Install marked candidates. (fn _) (defalias 'helm-system-packages-guix-install #[257 "\300\301\302\303 #\207" [helm-system-packages-guix-run "guix" ("package" "--install") helm-marked-candidates] 5 (#$ . 8764)]) #@36 Install marked candidates. (fn _) (defalias 'helm-system-packages-guix-uninstall #[257 "\300\301\302\303 #\207" [helm-system-packages-guix-run "guix" ("package" "--remove") helm-marked-candidates] 5 (#$ . 8983)]) #@160 Print homepage URLs of `helm-marked-candidates'. With prefix argument, insert the output at point. Otherwise display in `helm-system-packages-buffer'. (fn _) (defalias 'helm-system-packages-guix-browse-url #[257 "\300\301\302\303 \"!\207" [helm-system-packages-browse-url mapcar #[257 "\300\301\302 \303\211\304%@\305\"\207" [plist-get alist-get helm-system-packages-guix-get-database nil string= :home-page] 8 "\n\n(fn NAME)"] helm-marked-candidates] 5 (#$ . 9204)]) #@43 Find files for marked candidates. (fn _) (defalias 'helm-system-packages-guix-find-files #[257 "\300\301\302\303\"\301\302\303\"\304\305\306\307\310\311$\312\313#\211\2036\211@\304\314\"\3158@\316\317\"B#\266A\266\202\202\210\320 \211\203\\\211@\317\"\211\203T\316\321@\322\"#\266\210A\266\202\2029\262\266\202!\207" [helm-system-packages-find-files make-hash-table :test equal split-string helm-system-packages-call "guix" nil "package" "--list-installed" "\n" t " " 3 puthash gethash helm-marked-candidates directory-files-recursively "."] 16 (#$ . 9680)]) #@88 List candidate dependencies for `helm-system-packages-show-packages'. (fn CANDIDATE) (defalias 'helm-system-packages-guix-show-dependencies #[257 "\300\301\302\303 \304#P\305\306\307\310\303 \"\311\301\302#\266\202BC\"\207" ["Dependencies of " mapconcat identity helm-marked-candidates " " helm-system-packages-show-packages uninstalled mapcan #[257 "\300\301 \302\211\303%@\304\305\306\"\305\307\"\"\207" [alist-get helm-system-packages-guix-get-database nil string= append plist-get :inputs :propagated-inputs] 7 "\n\n(fn NAME)"] "\n"] 10 (#$ . 10274)]) #@96 List candidate reverse dependencies for `helm-system-packages-show-packages'. (fn CANDIDATE) (defalias 'helm-system-packages-guix-show-reverse-dependencies #[257 "\300\301\302\303 \304#P\305\306\307\310\311\"r\211q\210\312\313\"\216\314\304\315\314\316\317\314\320\317\321\322\303 \323\324$###c\210\325\326ed#\210\327 *\262BC\"\207" ["Reverse dependencies of " mapconcat identity helm-marked-candidates " " helm-system-packages-show-packages uninstalled generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] replace-regexp-in-string "\n" "@[^ ]+" "" ".*: " helm-system-packages-call "guix" "refresh" "--list-dependent" sort-lines nil buffer-string] 19 (#$ . 10844)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable helm-system-packages-guix-actions funcall function #[0 "\300\207" [(("Show package(s)" . helm-system-packages-guix-info) ("Install" . helm-system-packages-guix-install) ("Uninstall" . helm-system-packages-guix-uninstall) ("Browse homepage URL" . helm-system-packages-guix-browse-url) ("Find files" . helm-system-packages-guix-find-files) ("Show dependencies" . helm-system-packages-guix-show-dependencies) ("Show reverse dependencies" . helm-system-packages-guix-show-reverse-dependencies))] 1] "Actions for Helm guix." :group helm-system-packages :type (alist :key-type string :value-type function)] 8) (defvar helm-system-packages-guix (record 'helm-system-packages-manager "guix" 'helm-system-packages-guix-refresh helm-system-packages-guix-dependencies 'helm-system-packages-guix-help-message helm-system-packages-guix-map 'helm-system-packages-guix-transformer helm-system-packages-guix-actions)) (provide 'helm-system-packages-guix)