gtk.scm (3002B)
1 (define-module (mt packages gtk) 2 #:use-module (guix packages) 3 #:use-module (guix gexp) 4 #:use-module (guix git-download) 5 #:use-module (guix build-system trivial) 6 #:use-module (gnu packages base) 7 #:use-module (gnu packages bash) 8 #:use-module (gnu packages web) 9 #:use-module ((guix licenses) #:prefix license:)) 10 11 (define-public gruvbox-gtk-theme 12 (let ((commit "578cd220b5ff6e86b078a6111d26bb20ec8c733f") 13 (revision "1")) 14 (package 15 (name "gruvbox-gtk-theme") 16 (version (git-version "1.0.23" revision commit)) 17 (source (origin 18 (method git-fetch) 19 (uri (git-reference 20 (url "https://github.com/Fausto-Korpsvart/Gruvbox-GTK-Theme/") 21 (commit commit))) 22 (file-name (git-file-name name version)) 23 (sha256 24 (base32 25 "1fmpma44hp9a7b2nklvm900l62ni8smmjc9g4a9y1x53ys7hyyj5")))) 26 (build-system trivial-build-system) 27 (arguments 28 `(#:modules ((guix build utils)) 29 #:builder 30 (begin 31 (use-modules (guix build utils)) 32 33 (let ((install-dir (string-append %output "/share/themes")) 34 (source (assoc-ref %build-inputs "source")) 35 (bash (assoc-ref %build-inputs "bash")) 36 (coreutils (assoc-ref %build-inputs "coreutils")) 37 (sassc (assoc-ref %build-inputs "sassc")) 38 (sed (assoc-ref %build-inputs "sed")) 39 (stderr (current-error-port))) 40 ;; Copy necessary files 41 (copy-recursively (string-append source "/themes") 42 (getcwd)) 43 ;; Prepare script 44 (patch-shebang "install.sh" 45 (list (string-append bash "/bin"))) 46 ;; Build theme(s) 47 (mkdir-p install-dir) 48 (let ((pid (spawn "install.sh" 49 (list "install.sh" 50 "-t" "all" 51 "-d" install-dir) 52 #:output stderr 53 #:error stderr 54 #:search-path? #f 55 #:environment 56 (list (string-append 57 "PATH=" 58 coreutils "/bin" 59 ":" 60 sassc "/bin" 61 ":" 62 sed "/bin"))))) 63 (if (not (eqv? 0 (status:exit-val (cdr (waitpid pid))))) 64 (error "Install script failed!"))))))) 65 (native-inputs 66 (list bash 67 coreutils 68 sed 69 sassc)) 70 (home-page "https://github.com/Fausto-Korpsvart/Gruvbox-GTK-Theme") 71 (synopsis "A GTK theme based on the Gruvbox colour palette.") 72 (description #f) 73 (license license:gpl3))))