513 lines
19 KiB
Scheme
513 lines
19 KiB
Scheme
(define-module (zilti packages hyprland)
|
|
#:use-module (srfi srfi-1)
|
|
#:use-module (ice-9 match)
|
|
#:use-module (guix packages)
|
|
#:use-module (guix download)
|
|
#:use-module (guix gexp)
|
|
#:use-module (guix utils)
|
|
#:use-module (guix build-system meson)
|
|
#:use-module (guix build-system cmake)
|
|
#:use-module (guix build-system gnu)
|
|
#:use-module (guix build-system qt)
|
|
#:use-module ((guix licenses) #:prefix license:)
|
|
#:use-module (guix git-download)
|
|
#:use-module (gnu packages)
|
|
#:use-module (rosenthal packages freedesktop)
|
|
#:use-module ((rosenthal packages wm) #:prefix rosenthal:)
|
|
#:use-module (gnu packages admin)
|
|
#:use-module (gnu packages autotools)
|
|
#:use-module (gnu packages base)
|
|
#:use-module (gnu packages bash)
|
|
#:use-module (gnu packages bison)
|
|
#:use-module (gnu packages build-tools)
|
|
#:use-module (gnu packages check)
|
|
#:use-module (gnu packages cmake)
|
|
#:use-module (gnu packages compression)
|
|
#:use-module (gnu packages cpio)
|
|
#:use-module (gnu packages docbook)
|
|
#:use-module (gnu packages elf)
|
|
#:use-module (gnu packages file)
|
|
#:use-module (gnu packages flex)
|
|
#:use-module (gnu packages fontutils)
|
|
#:use-module (gnu packages freedesktop)
|
|
#:use-module (gnu packages gcc)
|
|
#:use-module (gnu packages gettext)
|
|
#:use-module (gnu packages ghostscript)
|
|
#:use-module (gnu packages gl)
|
|
#:use-module (gnu packages glib)
|
|
#:use-module (gnu packages gnome)
|
|
#:use-module (gnu packages gtk)
|
|
#:use-module (gnu packages hardware)
|
|
#:use-module (gnu packages image)
|
|
#:use-module (gnu packages linux)
|
|
#:use-module (gnu packages ninja)
|
|
#:use-module (gnu packages pciutils)
|
|
#:use-module (gnu packages pkg-config)
|
|
#:use-module (gnu packages python)
|
|
#:use-module (gnu packages qt)
|
|
#:use-module (gnu packages version-control)
|
|
#:use-module (gnu packages xdisorg)
|
|
#:use-module (gnu packages vulkan)
|
|
#:use-module (gnu packages web)
|
|
#:use-module (gnu packages xml)
|
|
#:use-module (gnu packages wm)
|
|
#:use-module (gnu packages xorg))
|
|
|
|
(define-public tomlplusplus
|
|
(package
|
|
(name "tomlplusplus")
|
|
(version "3.4.0")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/marzer/tomlplusplus")
|
|
(commit (string-append "v" version))))
|
|
(sha256
|
|
(base32
|
|
"1hvbifzcc97r9jwjzpnq31ynqnj5y93cjz4frmgddnkg8hxmp6w7"))))
|
|
(build-system meson-build-system)
|
|
(native-inputs
|
|
(list python cmake))
|
|
(arguments
|
|
(list #:tests? #f))
|
|
(home-page "https://marzer.github.io/tomlplusplus/")
|
|
(synopsis "Header-only TOML config file parser and serializer for C++17")
|
|
(description "Header-only TOML config file parser and serializer for C++17.")
|
|
(license license:expat)))
|
|
|
|
(define udis86-for-hyprland
|
|
(let ((revision "186")
|
|
(commit "5336633af70f3917760a6d441ff02d93477b0c86"))
|
|
(package
|
|
(name "udis86")
|
|
(version (git-version "1.7.2" revision commit))
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/canihavesomecoffee/udis86")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"0y5z1169wff578jylpafsww4px4y6gickhcs885a9c660d8xs9qy"))))
|
|
(build-system gnu-build-system)
|
|
(native-inputs (list autoconf automake libtool python-minimal-wrapper))
|
|
(home-page "https://github.com/canihavesomecoffee/udis86")
|
|
(synopsis "Disassembler Library for x86 and x86-64")
|
|
(description
|
|
"Udis86 is a disassembler for the x86 and x86-64 class of instruction
|
|
set architectures. It consists of a C library called @code{libudis86} and a
|
|
command line tool called @code{udcli} that incorporates the library.")
|
|
(license license:bsd-2))))
|
|
|
|
(define cairo-for-hyprland
|
|
(package
|
|
(inherit cairo)
|
|
(name "cairo")
|
|
(version "1.18.0")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://cairographics.org/releases/cairo-"
|
|
version ".tar.xz"))
|
|
(sha256
|
|
(base32
|
|
"0r0by563s75xyzz0d0j1nmjqmdrk2x9agk7r57p3v8vqp4v0ffi4"))))
|
|
(build-system meson-build-system)
|
|
(arguments
|
|
(list #:tests? #f
|
|
#:glib-or-gtk? #t
|
|
#:configure-flags
|
|
#~(list "-Dspectre=disabled")))
|
|
(outputs '("out"))))
|
|
|
|
(define hwdata-for-hyprland
|
|
(package
|
|
(inherit hwdata)
|
|
(arguments
|
|
(substitute-keyword-arguments (package-arguments hwdata)
|
|
((#:phases _) #~%standard-phases)))
|
|
(outputs '("out"))))
|
|
|
|
(define wayland-protocols-for-hyprland
|
|
(package
|
|
(inherit wayland-protocols)
|
|
(name "wayland-protocols")
|
|
(version "1.34")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://gitlab.freedesktop.org/wayland/wayland-protocols"
|
|
"/-/releases/" version "/downloads/"
|
|
"wayland-protocols-" version ".tar.xz"))
|
|
(sha256
|
|
(base32
|
|
"1sxgvis0abkymc02nhx2svm60myiq3shvy759sphpxl5rp52g6y5"))))))
|
|
|
|
(define-public wlroots-for-hyprland
|
|
(let ((base wlroots)
|
|
(revision "255")
|
|
(commit "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b"))
|
|
(package
|
|
(inherit base)
|
|
(name "wlroots")
|
|
(version (git-version "0.18.0" revision commit))
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://gitlab.freedesktop.org/wlroots/wlroots.git")
|
|
(commit commit)))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"0bwpppb86nfjg2lw62y449f9iz2v8djqb8n6g1cn45vqnwj8hxf1"))))
|
|
(propagated-inputs
|
|
(modify-inputs (package-propagated-inputs wlroots)
|
|
(prepend libdrm-for-hyprland)
|
|
(prepend xcb-util-renderutil)
|
|
(replace "libinput-minimal" libinput-minimal-1.24.0)
|
|
(replace "wayland-protocols" wayland-protocols-for-hyprland)))
|
|
(native-inputs
|
|
(modify-inputs (package-native-inputs base)
|
|
(replace "hwdata" `(,hwdata-for-hyprland "out")))))))
|
|
|
|
(define libdrm-for-hyprland
|
|
(package
|
|
(inherit libdrm)
|
|
(name "libdrm")
|
|
(version "2.4.120")
|
|
(source (origin
|
|
(method url-fetch)
|
|
(uri (string-append
|
|
"https://dri.freedesktop.org/libdrm/libdrm-"
|
|
version ".tar.xz"))
|
|
(sha256
|
|
(base32
|
|
"0yijzgg6rdsa68bz03sw0lcfa2nclv9m3as1cja50wkcyxim7x9v"))))))
|
|
|
|
(define hyprland-unbundle-wlroots-patch
|
|
(origin
|
|
(method url-fetch)
|
|
(uri (string-append "https://github.com/hyprwm/Hyprland" "/raw/"
|
|
"c5e28ebcfe00a510922779b2c568cfa52a317445"
|
|
"/nix/patches/meson-build.patch"))
|
|
(sha256
|
|
(base32 "00i7c98ignfgkk3x1r1masmlj92xzb8cdb7nyfhivbfkdlfyzgpj"))))
|
|
|
|
(define-public hyprcursor
|
|
(package
|
|
(inherit rosenthal:hyprcursor)
|
|
(name "hyprcursor")
|
|
(version "0.1.7")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/hyprwm/hyprcursor.git")
|
|
(commit (string-append "v" version))))
|
|
(sha256
|
|
(base32
|
|
"0s5x3nk2f48xl2z797f8s5jddmhpkg0ndw0jl7mirv9l23xmajag"))))
|
|
(inputs
|
|
(modify-inputs (package-inputs rosenthal:hyprcursor)
|
|
(append tomlplusplus)))))
|
|
|
|
(define-public hyprland
|
|
(package
|
|
(name "hyprland")
|
|
(version "0.38.1")
|
|
(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
|
|
"1avkzdcgyk65p44nwl9w8sv4iq5xs13i7i66jsya9z06q1f3d1hs"))))
|
|
(build-system meson-build-system)
|
|
(arguments
|
|
(list #:build-type "release"
|
|
#:parallel-build? #t
|
|
#:configure-flags #~(list "-Dxwayland=enabled")
|
|
#: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 "mkdir" "../hyprland-source/build")
|
|
(copy-file
|
|
"meson-private/hyprland.pc" "../hyprland-source/build/hyprland.pc")
|
|
(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
|
|
cpio
|
|
gcc-13
|
|
jq
|
|
pkg-config
|
|
rosenthal:hyprland-protocols))
|
|
(propagated-inputs
|
|
(list
|
|
eglexternalplatform
|
|
egl-wayland))
|
|
(inputs
|
|
(list cairo-for-hyprland
|
|
gcc-13
|
|
hyprcursor
|
|
libxcb
|
|
rosenthal:hyprland-protocols
|
|
rosenthal:hyprlang
|
|
pango
|
|
pciutils
|
|
tomlplusplus
|
|
udis86-for-hyprland
|
|
wlroots-for-hyprland
|
|
xcb-util-wm
|
|
xorg-server-xwayland))
|
|
(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 hyprland-plugin-hyprsplit
|
|
(package
|
|
(name "hyprland-plugin-hyprsplit")
|
|
(version "3b71eaf")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/shezdy/hyprsplit.git")
|
|
(commit version)))
|
|
(sha256
|
|
(base32
|
|
"0cqr5h5lkwcadavsh9yx0xbc88rlr29s3zws1694ya8ayalbappx"))))
|
|
(build-system meson-build-system)
|
|
(arguments
|
|
(list
|
|
#:configure-flags #~(list
|
|
"-Dcpp_std=none"
|
|
(string-append "-Dcpp_args=-std=gnu++2b"
|
|
" -I" #$(file-append wlroots-for-hyprland "/include")))
|
|
#:phases #~(modify-phases %standard-phases
|
|
(delete 'check))))
|
|
(native-inputs
|
|
(list cmake
|
|
gcc-13
|
|
pkg-config
|
|
wlroots-for-hyprland))
|
|
(inputs
|
|
(list cairo-for-hyprland
|
|
hyprland
|
|
rosenthal:hyprlang
|
|
libdrm-for-hyprland
|
|
libinput
|
|
pixman))
|
|
(home-page "https://github.com/shezdy/hyprsplit")
|
|
(synopsis "hyprland plugin for separate sets of workspaces on each monitor")
|
|
(description "A complete rewrite of split-monitor-workspaces that attempts to fix the issues I experienced with it.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public hyprpaper
|
|
(package
|
|
(name "hyprpaper")
|
|
(version "0.6.0")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/hyprwm/hyprpaper.git")
|
|
(commit (string-append "v" version))))
|
|
(sha256
|
|
(base32
|
|
"0bcb2jfnw5752h3lyflvl12v9m61yrdmff1ry2y98m42v1l6gb4s"))))
|
|
(build-system cmake-build-system)
|
|
(arguments
|
|
(list
|
|
#:phases
|
|
#~(modify-phases %standard-phases
|
|
(add-before 'configure 'generate-protocols
|
|
(lambda _
|
|
(setenv "CC" "gcc")
|
|
(invoke "make" "protocols")))
|
|
(replace 'install
|
|
(lambda _
|
|
(let* ((output (assoc-ref %outputs "out"))
|
|
(out-bin (string-append output "/bin")))
|
|
(use-modules (guix build utils))
|
|
(invoke "ls")
|
|
(install-file "./hyprpaper"
|
|
out-bin))))
|
|
(delete 'check))))
|
|
(native-inputs
|
|
(list gcc-13
|
|
pkg-config))
|
|
(inputs
|
|
(list cairo-for-hyprland
|
|
mesa
|
|
rosenthal:hyprland-protocols
|
|
wayland-protocols-for-hyprland
|
|
wlroots-for-hyprland
|
|
file
|
|
libglvnd
|
|
libjpeg-turbo
|
|
libwebp
|
|
rosenthal:hyprlang
|
|
pango
|
|
wayland))
|
|
(home-page "https://github.com/hyprwm/hyprpaper")
|
|
(synopsis "Hyprpaper is a blazing fast wayland wallpaper utility with IPC controls")
|
|
(description "Hyprpaper is a blazing fast wallpaper utility for Hyprland with the ability to dynamically change wallpapers through sockets. It will work on all wlroots-based compositors, though.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public hypridle
|
|
(package
|
|
(name "hypridle")
|
|
(version "0.1.1")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/hyprwm/hypridle.git")
|
|
(commit (string-append "v" version))))
|
|
(sha256
|
|
(base32
|
|
"0k0izx34zp65lawl25n8my2m4yfql9zmfljlkz50k4yr8d9qbb31"))))
|
|
(build-system cmake-build-system)
|
|
(arguments
|
|
(list
|
|
#:phases #~(modify-phases %standard-phases
|
|
(delete 'check))))
|
|
(native-inputs
|
|
(list gcc-13
|
|
pkg-config))
|
|
(inputs
|
|
(list rosenthal:hyprlang
|
|
sdbus-c++
|
|
wayland-protocols-for-hyprland
|
|
wayland))
|
|
(home-page "https://github.com/hyprwm/hypridle")
|
|
(synopsis "Hyprland's idle daemon")
|
|
(description "Hyprland's idle daemon.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public hyprlock
|
|
(package
|
|
(name "hyprlock")
|
|
(version "0.3.0")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/hyprwm/hyprlock.git")
|
|
(commit (string-append "v" version))))
|
|
(sha256
|
|
(base32
|
|
"0w2a25hivn8xd8p05vc9xg57rd9siv12dwmr4skpqx4dcmxxbg5d"))))
|
|
(build-system cmake-build-system)
|
|
(arguments
|
|
(list
|
|
#:parallel-build? #t
|
|
#:phases #~(modify-phases
|
|
%standard-phases
|
|
(delete 'check)
|
|
;; https://github.com/hyprwm/hyprlock/issues/220
|
|
(add-after 'unpack 'patch-cmakelists
|
|
(lambda _
|
|
(invoke "sed" "-zi" "s/install(CODE.*)/install(FILES \"${CMAKE_SOURCE_DIR}\\/pam\\/hyprlock\" DESTINATION \"${CMAKE_INSTALL_FULL_SYSCONFDIR}\\/pam.d\")/" "CMakeLists.txt")
|
|
(invoke "cat" "CMakeLists.txt"))))))
|
|
(native-inputs
|
|
(list gcc-13
|
|
pkg-config))
|
|
(propagated-inputs
|
|
(list wayland
|
|
egl-wayland
|
|
eglexternalplatform))
|
|
(inputs
|
|
(list cairo-for-hyprland
|
|
pango
|
|
linux-pam
|
|
mesa
|
|
libdrm-for-hyprland
|
|
libglvnd
|
|
libxkbcommon
|
|
wayland-protocols-for-hyprland
|
|
rosenthal:hyprlang))
|
|
(home-page "https://github.com/hyprwm/hyprlock")
|
|
(synopsis "Hyprland's GPU-accelerated screen locking utility")
|
|
(description "Hyprland's simple, yet multi-threaded and GPU-accelerated screen locking utility.")
|
|
(license license:bsd-3)))
|
|
|
|
(define-public xdg-desktop-portal-hyprland
|
|
(package
|
|
(name "xdg-desktop-portal-hyprland")
|
|
(version "1.3.1")
|
|
(source (origin
|
|
(method git-fetch)
|
|
(uri (git-reference
|
|
(url "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
|
|
(commit (string-append "v" version))))
|
|
(file-name (git-file-name name version))
|
|
(sha256
|
|
(base32
|
|
"0fdbzxanmmzrvb9wfzg1pdsnlg7dl6v5k8bl44w10n48s7bbbzn0"))))
|
|
(build-system qt-build-system)
|
|
(arguments
|
|
(list #:tests? #f ;No tests
|
|
#:qtbase qtbase
|
|
#:phases
|
|
#~(modify-phases %standard-phases
|
|
(add-after 'unpack 'fix-path
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
(substitute* (find-files "." "\\.cp?*$")
|
|
(("/bin/sh") "sh")
|
|
(("\\<(sh|grim|hyprctl|slurp)\\>" _ cmd)
|
|
(search-input-file inputs (string-append "/bin/" cmd)))
|
|
(("\\<(hyprland-share-picker)\\>" _ cmd)
|
|
(string-append #$output "/bin/" cmd))))))))
|
|
(native-inputs
|
|
(list gcc-13 pkg-config wayland))
|
|
(inputs
|
|
(list bash-minimal
|
|
grim
|
|
hyprland
|
|
rosenthal:hyprland-protocols
|
|
rosenthal:hyprlang
|
|
mesa
|
|
pipewire
|
|
qtwayland
|
|
sdbus-c++
|
|
slurp
|
|
wayland-protocols))
|
|
(home-page "https://github.com/hyprwm/xdg-desktop-portal-hyprland")
|
|
(synopsis "XDG Desktop Portal backend for Hyprland")
|
|
(description
|
|
"This package provides @code{xdg-desktop-portal-hyprland}, which extends
|
|
@code{xdg-desktop-portal-wlr} for Hyprland with support for
|
|
@code{xdg-desktop-portal} screenshot and casting interfaces, while adding a few
|
|
extra portals specific to Hyprland, mostly for window sharing.")
|
|
(license license:bsd-3)))
|