This commit is contained in:
Daniel Ziltener 2024-04-05 17:32:40 +02:00
parent 0bf47ef97c
commit 6327a238a0
Signed by: zilti
GPG key ID: B38976E82C9DAE42

View file

@ -40,6 +40,7 @@
#:use-module (gnu packages hardware) #:use-module (gnu packages hardware)
#:use-module (gnu packages image) #:use-module (gnu packages image)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu packages ninja)
#:use-module (gnu packages pciutils) #:use-module (gnu packages pciutils)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages python) #:use-module (gnu packages python)
@ -63,9 +64,9 @@
(sha256 (sha256
(base32 (base32
"1hvbifzcc97r9jwjzpnq31ynqnj5y93cjz4frmgddnkg8hxmp6w7")))) "1hvbifzcc97r9jwjzpnq31ynqnj5y93cjz4frmgddnkg8hxmp6w7"))))
(build-system cmake-build-system) (build-system meson-build-system)
(native-inputs (native-inputs
(list python)) (list python cmake))
(arguments (arguments
(list #:tests? #f)) (list #:tests? #f))
(home-page "https://marzer.github.io/tomlplusplus/") (home-page "https://marzer.github.io/tomlplusplus/")
@ -204,11 +205,11 @@ command line tool called @code{udcli} that incorporates the library.")
(sha256 (sha256
(base32 (base32
"022z62y5irmgnm6m0wfgkg8iw3gs5f2p8155h49lgzzc46nka0kf")))) "022z62y5irmgnm6m0wfgkg8iw3gs5f2p8155h49lgzzc46nka0kf"))))
(build-system meson-build-system) (build-system gnu-build-system)
(arguments (arguments
(list #:build-type "release" (list #:phases
#:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(delete 'configure)
(add-after 'unpack 'fix-path (add-after 'unpack 'fix-path
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* (find-files "src" "\\.cpp$") (substitute* (find-files "src" "\\.cpp$")
@ -226,18 +227,22 @@ command line tool called @code{udcli} that incorporates the library.")
(string-append pre #$binutils "/bin/nm")) (string-append pre #$binutils "/bin/nm"))
(("\\<(addr2line|objcopy)\\>" _ cmd) (("\\<(addr2line|objcopy)\\>" _ cmd)
(string-append #$binutils "/bin/" cmd))))) (string-append #$binutils "/bin/" cmd)))))
(replace 'build
(lambda _
(invoke "sed" "-i" "s/no-warn-unused-cli/no-warn-unused-cli -DNO_SYSTEMD=1/" "Makefile")
(invoke "make"
(string-append "PREFIX=" #$output)
"all")))
(add-after 'build 'install-headers (add-after 'build 'install-headers
(lambda _ (lambda _
(with-directory-excursion (invoke "make"
"../hyprland-source" (string-append "PREFIX=" #$output)
(invoke "ls" "protocols") "installheaders"))))))
(invoke "sed" "-i" "/wlroots/d" "Makefile") (native-inputs (list cmake ninja meson gcc-13 jq pkg-config cpio))
(invoke "make"
(string-append "PREFIX=" #$output)
"installheaders")))))))
(native-inputs (list cmake gcc-13 jq pkg-config cpio))
(inputs (inputs
(list cairo-for-hyprland (list cairo-for-hyprland
python-wrapper
libglvnd
gcc-13 gcc-13
rosenthal:hyprcursor rosenthal:hyprcursor
rosenthal:hyprland-protocols rosenthal:hyprland-protocols
@ -256,6 +261,76 @@ effects, has a very flexible IPC model allowing for a lot of customization, and
more.") more.")
(license license:bsd-3))) (license license:bsd-3)))
#;
(define-public hyprland
(package
(name "hyprland")
(version "0.38.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/hyprwm/Hyprland"
"/releases/download/v" version
"/source-v" version ".tar.gz"))
(modules '((guix build utils)))
(patches (list hyprland-unbundle-wlroots-patch))
(sha256
(base32
"022z62y5irmgnm6m0wfgkg8iw3gs5f2p8155h49lgzzc46nka0kf"))))
(build-system meson-build-system)
(arguments
(list #:build-type "release"
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* (find-files "src" "\\.cpp$")
(("/usr/local(/bin/Hyprland)" _ path)
(string-append #$output path))
(("/usr") #$output)
(("(execAndGet\\(\")\\<(cat|fc-list|lspci)\\>"
_ pre cmd)
(string-append
pre (search-input-file
inputs (string-append "bin/" cmd))))
(("\\<cc\\>") (search-input-file inputs "bin/gcc"))
;; NOTE: Add binutils to inputs will override ld-wrapper.
(("(execAndGet\\(\\(\")\\<nm\\>" _ pre)
(string-append pre #$binutils "/bin/nm"))
(("\\<(addr2line|objcopy)\\>" _ cmd)
(string-append #$binutils "/bin/" cmd)))))
(add-after 'build 'install-headers
(lambda _
(copy-recursively
"protocols" "../hyprland-source/protocols")
(invoke "ls")
(invoke "find" "." "-name" "hyprland.pc")
(with-directory-excursion
"../hyprland-source"
(invoke "sed" "-i" "/wlroots/d" "Makefile")
(invoke "make"
(string-append "PREFIX=" #$output)
"installheaders")))))))
(native-inputs (list cmake gcc-13 jq pkg-config cpio))
(inputs
(list cairo-for-hyprland
gcc-13
rosenthal:hyprcursor
rosenthal:hyprland-protocols
rosenthal:hyprlang
pango
pciutils
tomlplusplus
udis86-for-hyprland
wlroots-for-hyprland))
(home-page "https://hyprland.org")
(synopsis "Dynamic tiling Wayland compositor based on wlroots")
(description
"Hyprland is a dynamic tiling Wayland compositor based on @code{wlroots}
that doesn't sacrifice on its looks. It supports multiple layouts, fancy
effects, has a very flexible IPC model allowing for a lot of customization, and
more.")
(license license:bsd-3)))
(define-public hyprpaper (define-public hyprpaper
(package (package
(name "hyprpaper") (name "hyprpaper")