guixchannel/packages/hyprland.scm

304 lines
9.6 KiB
Scheme
Raw Normal View History

2023-11-27 23:00:56 +00:00
(define-module
2023-11-27 23:04:45 +00:00
(packages hyprland)
2023-11-27 23:00:56 +00:00
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix build-system meson)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix git-download)
#:use-module (gnu packages)
2023-11-28 09:47:57 +00:00
#:use-module (gnu packages admin)
2023-11-27 23:00:56 +00:00
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages build-tools)
2023-11-28 10:09:32 +00:00
#:use-module (gnu packages cmake)
2023-11-28 09:54:30 +00:00
#:use-module (gnu packages compression)
2023-11-27 23:00:56 +00:00
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gl)
#:use-module (gnu packages gtk)
2023-11-28 11:49:57 +00:00
#:use-module (gnu packages hardware)
2023-11-28 09:54:10 +00:00
#:use-module (gnu packages image)
2023-11-28 09:47:32 +00:00
#:use-module (gnu packages linux)
2023-11-27 23:00:56 +00:00
#:use-module (gnu packages ninja)
#:use-module (gnu packages pciutils)
#:use-module (gnu packages python)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages rust)
#:use-module (gnu packages web)
#:use-module (gnu packages wm)
#:use-module (gnu packages xorg))
2023-11-28 11:38:07 +00:00
(define-public hwdata
(package
(name "hwdata")
(version "0.376") ;updated monthly
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/vcrhonek/hwdata")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
2023-11-28 11:39:18 +00:00
"0g758llcr3g76yig7crxffzd9vsw0w3hr6z976lpgxblcdm82nrk"))))
2023-11-28 11:38:07 +00:00
(build-system gnu-build-system)
2023-11-28 11:40:35 +00:00
(native-inputs
(list pkg-config))
2023-11-28 11:38:07 +00:00
(outputs '("out" "iab" "oui" "pci" "pnp" "usb"))
(arguments
;; Tests require pciutils, python, podman. Disable to avoid recursive dep.
(list
#:tests? #f
;; Do not cross-compile, since the package only contains data.
#:target #f
#:configure-flags #~(list (string-append "--datadir=" #$output "/share"))
#:phases
#~(modify-phases %standard-phases
2023-11-28 11:43:37 +00:00
(add-after 'install 'post-install
2023-11-28 11:38:07 +00:00
(lambda _
(install-file "iab.txt" (string-append #$output:iab "/share/hwdata"))
(install-file "oui.txt" (string-append #$output:oui "/share/hwdata"))
(install-file "pci.ids" (string-append #$output:pci "/share/hwdata"))
(install-file "pnp.ids" (string-append #$output:pnp "/share/hwdata"))
(install-file "usb.ids" (string-append #$output:usb "/share/hwdata")))))))
(home-page "https://github.com/vcrhonek/hwdata")
(synopsis "Hardware identification and configuration data")
(description "@code{hwdata} contains various hardware identification and
configuration data, such as the @file{pci.ids} and @file{usb.ids} databases.
Each database is contained in a specific package output, such as the
@code{pci} output for @file{pci.ids}, the @code{usb} output for
@file{usb.ids}, etc.")
(license (list license:gpl2+
license:expat)))) ;XFree86 1.0
2023-11-28 11:49:18 +00:00
(define-public libdisplay-info
(package
(name "libdisplay-info")
(version "0.1.1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.freedesktop.org/emersion/libdisplay-info")
(commit "0.1.1")))
(file-name (git-file-name name version))
2023-11-28 11:51:09 +00:00
(sha256 (base32 "1ffq7w1ig1y44rrmkv1hvfjylzgq7f9nlnnsdgdv7pmcpfh45pgf"))))
2023-11-28 11:49:18 +00:00
(native-inputs
(list pkg-config edid-decode hwdata python-wrapper))
2023-11-28 11:59:31 +00:00
(inputs (list python))
2023-11-28 11:49:18 +00:00
(build-system meson-build-system)
(home-page "https://gitlab.freedesktop.org/emersion/libdisplay-info")
(synopsis "Hello, GNU world: An example GNU package")
(description "EDID and DisplayID library")
(license license:expat)))
2023-11-28 09:53:51 +00:00
(define-public pixman
(package
(name "pixman")
(version "0.42.2")
(source
(origin
(method url-fetch)
(uri
(string-append
"https://www.cairographics.org/releases/pixman-"
version ".tar.gz"))
(sha256
(base32 "0pk298iqxqr64vk3z6nhjwr6vjg1971zfrjkqy5r9zd2mppq057a"))
(patches
(search-patches
"pixman-CVE-2016-5296.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
(list
"--disable-static"
"--enable-timers"
"--enable-gnuplot")))
(native-inputs
(list pkg-config))
(inputs
(list libpng zlib))
(synopsis "Low-level pixel manipulation library")
(description "Pixman is a low-level software library for pixel
manipulation, providing features such as image compositing and trapezoid
rasterisation.")
(home-page "http://www.pixman.org/")
(license license:expat)))
2023-11-28 09:47:09 +00:00
(define-public wlroots
(package
(name "wlroots")
2023-11-28 09:48:34 +00:00
(version "0.17.0")
2023-11-28 09:47:09 +00:00
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.freedesktop.org/wlroots/wlroots")
(commit version)))
(file-name (git-file-name name version))
(sha256
2023-11-28 09:49:47 +00:00
(base32 "11vb6xjvsjz7j2jkx00ygjp5xi63ni8ydd8wf3s0200ldr4ffjjm"))))
2023-11-28 09:47:09 +00:00
(build-system meson-build-system)
(arguments
2023-11-28 11:25:44 +00:00
`(#:configure-flags
2023-11-28 11:30:02 +00:00
'("-Dbackends=drm")
2023-11-28 11:25:44 +00:00
#:phases
2023-11-28 09:47:09 +00:00
(modify-phases %standard-phases
(add-before 'configure 'hardcode-paths
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "xwayland/server.c"
(("Xwayland") (string-append (assoc-ref inputs
"xorg-server-xwayland")
"/bin/Xwayland")))
#t))
(add-before 'configure 'fix-meson-file
(lambda* (#:key native-inputs inputs #:allow-other-keys)
(substitute* "backend/drm/meson.build"
(("/usr/share/hwdata/pnp.ids")
(string-append (assoc-ref (or native-inputs inputs) "hwdata")
"/share/hwdata/pnp.ids"))))))))
(propagated-inputs
(list ;; As required by wlroots.pc.
eudev
libinput-minimal
libxkbcommon
mesa
pixman
libseat
wayland
wayland-protocols
xcb-util-errors
xcb-util-wm
xorg-server-xwayland))
2023-11-28 11:32:26 +00:00
(inputs
2023-11-28 11:38:07 +00:00
(list libdrm))
2023-11-28 09:47:09 +00:00
(native-inputs
(cons*
`(,hwdata "pnp")
2023-11-28 11:36:33 +00:00
cmake
hwdata
2023-11-28 09:47:09 +00:00
pkg-config
wayland
(if (%current-target-system)
(list pkg-config-for-build)
'())))
(home-page "https://gitlab.freedesktop.org/wlroots/wlroots/")
(synopsis "Pluggable, composable, unopinionated modules for building a
Wayland compositor")
(description "wlroots is a set of pluggable, composable, unopinionated
modules for building a Wayland compositor.")
(license license:expat))) ; MIT license
2023-11-27 23:00:56 +00:00
(define-public hyprland-protocols
(package
(name "hyprland-protocols")
(version "0.2")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/hyprwm/hyprland-protocols")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1drjznj7fn6m5m6skhzh0p031cb5x0bb4i56jxnxwpwaa71g1z20"))))
(build-system meson-build-system)
(home-page "https://www.hyprland.org") (synopsis "Dynamic tiling
Wayland compositor based on wlroots") (description "Hyprland.")
(license license:bsd-3)
))
(define-public udis86
(package
(name "udis86")
(version "unstable-2022-10-13")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/canihavesomecoffee/udis86")
(commit "5336633af70f3917760a6d441ff02d93477b0c86")))
(sha256
(base32 "0y5z1169wff578jylpafsww4px4y6gickhcs885a9c660d8xs9qy"))))
(build-system gnu-build-system)
(native-inputs
(list autoconf
automake
libtool
python-wrapper))
(inputs
(list python-wrapper))
(home-page "blah")
(synopsis "blub")
(description "Disassembler")
(license license:bsd-2)))
(define-public hyprland
(package
(name "hyprland")
(version "0.32.3")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/hyprwm/Hyprland")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "17h8gy7wvsxg1ypq70b0cldz6h599xi7fibawlm2g6cvxkmzdwzh"))
(modules '((guix build utils)))
(snippet
#~(begin
(substitute* "src/render/OpenGL.cpp"
2023-11-28 09:11:16 +00:00
(("/usr") "$out"))))))
2023-11-27 23:00:56 +00:00
(build-system meson-build-system)
(arguments
2023-11-28 10:03:50 +00:00
'(#:phases
(modify-phases %standard-phases
(add-before 'configure
'pre-configure
(lambda* (#:key outputs #:allow-other-keys)
2023-11-28 10:05:19 +00:00
(system "pkg-config --list-all")
2023-11-28 10:07:43 +00:00
(system "pkg-config --libs wlroots")
(system "pkg-config --mobversion wlroots")
2023-11-28 10:16:19 +00:00
(system "patch -p1 -i nix/patches/meson-build.patch")
(system "cat src/meson.build"))))))
2023-11-27 23:00:56 +00:00
(native-inputs
(list gcc-13
2023-11-28 10:09:00 +00:00
cmake
2023-11-27 23:00:56 +00:00
jq
git
ninja
mesa-headers
meson
pkg-config))
(inputs
(list cairo
egl-wayland
glu
glfw
hyprland-protocols
libglvnd
libinput
libxkbcommon
libdrm
mesa
wayland
wayland-protocols
pango
pciutils
udis86
wlroots
xcb-util))
2023-11-28 09:11:16 +00:00
(home-page "https://www.hyprland.org")
(synopsis "Dynamic tiling
Wayland compositor based on wlroots")
(description "Hyprland.")
2023-11-27 23:00:56 +00:00
(license license:bsd-3)))