From 09a40bdbaa276153a88b2f59c4bcceeb65bd8334 Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho Date: Fri, 9 Aug 2024 20:55:17 -0300 Subject: [PATCH] packages: games: Provide a desktop for srb2 --- radix/packages/games.scm | 10 ++++++++- radix/packages/image-viewers.scm | 35 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/radix/packages/games.scm b/radix/packages/games.scm index bb57114..05dbce7 100644 --- a/radix/packages/games.scm +++ b/radix/packages/games.scm @@ -85,13 +85,21 @@ (replace 'install (lambda _ (let* ((bin (string-append #$output "/bin")) + (apps (string-append #$output "/share/applications")) (srb2-assets #$(this-package-input "srb2-assets")) (share-srb2 (string-append srb2-assets "/share/srb2"))) (install-file "bin/lsdlsrb2" bin) (chdir bin) (rename-file "lsdlsrb2" "srb2") (wrap-program (string-append bin "/srb2") - `("SRB2WADDIR" prefix (,share-srb2))))))))) + `("SRB2WADDIR" prefix (,share-srb2))) + (mkdir-p apps) + (make-desktop-entry-file + (string-append apps "/srb2.desktop") + #:name "Sonic Robo Blast 2" + #:exec (string-append #$output "/bin/srb2") + #:try-exec (string-append #$output "/bin/srb2") + #:comment `((#f ,#$(package-synopsis this-package)))))))))) (native-inputs (list libgme curl diff --git a/radix/packages/image-viewers.scm b/radix/packages/image-viewers.scm index f948686..371db59 100644 --- a/radix/packages/image-viewers.scm +++ b/radix/packages/image-viewers.scm @@ -22,10 +22,13 @@ #:use-module (gnu packages tls) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) + #:use-module (gnu packages video) #:use-module (gnu packages) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module (guix gexp) + #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (radix packages cpp) @@ -111,3 +114,35 @@ workspaces @item Cache resized images for faster viewing @end itemize") (license license:gpl3))) + +(define-public ctpv + (package + (name "ctpv") + (version "1.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/NikitaIvanovV/ctpv") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zj0jcsk9zqnrifvrh6rn12hmmkp78l38ichj27ik11qdvi2456w")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f + #:make-flags + #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (delete 'configure)))) + (native-inputs + (list openssl)) + (propagated-inputs + (list chafa ffmpegthumbnailer poppler)) + (home-page "https://github.com/NikitaIvanovV/ctpv") + (synopsis "Image previews for lf file manager.") + (description "Image previews for lf file manager") + (license license:expat))) + +ctpv