From 79fee79362e97b08446509b52e6bbae05c0bef16 Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Wed, 3 Apr 2024 15:31:53 +0200 Subject: [PATCH] . --- .guix-channel | 3 + zilti/packages/hyprland.scm | 1072 +++++------------------------------ 2 files changed, 131 insertions(+), 944 deletions(-) diff --git a/.guix-channel b/.guix-channel index 15b83d5..943bb17 100644 --- a/.guix-channel +++ b/.guix-channel @@ -9,6 +9,9 @@ (channel (name emacs) (url "https://github.com/babariviere/guix-emacs")) + (channel + (name rosenthal) + (url "https://codeberg.org/hako/rosenthal.git")) (channel (name nonguix) (url "https://gitlab.com/nonguix/nonguix.git")))) diff --git a/zilti/packages/hyprland.scm b/zilti/packages/hyprland.scm index 34bc6b0..fc70d75 100644 --- a/zilti/packages/hyprland.scm +++ b/zilti/packages/hyprland.scm @@ -7,10 +7,11 @@ #: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 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) @@ -22,6 +23,7 @@ #:use-module (gnu packages compression) #: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) @@ -34,28 +36,121 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages hardware) #:use-module (gnu packages image) - #:use-module (gnu packages linux) - #:use-module (gnu packages llvm) - #:use-module (gnu packages ninja) #:use-module (gnu packages pciutils) - #:use-module (gnu packages pcre) - #:use-module (gnu packages pdf) - #:use-module (gnu packages python) - #:use-module (gnu packages python-xyz) #:use-module (gnu packages pkg-config) #:use-module (gnu packages qt) #: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 xml) - #:use-module (gnu packages video) - #:use-module (gnu packages vulkan) #:use-module (gnu packages wm) #:use-module (gnu packages xorg)) -(define-public libdrm-2.4.120 ;; SENT to Guix +(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 hyprland (package + (inherit rosenthal:hyprland) + (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))) + (snippet + '(begin + ;; Remove bundled sources and hyprpm utility. + (substitute* "meson.build" + ((".*hyprpm/src.*") "")) + (for-each delete-file-recursively + '("hyprpm" + "subprojects")))) + (patches (list hyprland-unbundle-wlroots-patch)) + (sha256 + (base32 + "022z62y5irmgnm6m0wfgkg8iw3gs5f2p8155h49lgzzc46nka0kf")))))) + +(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 wlroots-for-hyprland + (let ((base wlroots) + (revision "255") + (commit "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b")) + (package + (inherit base) + (name "wlroots") + (version (git-version "0.17.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) + (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 @@ -65,949 +160,38 @@ version ".tar.xz")) (sha256 (base32 - "0yijzgg6rdsa68bz03sw0lcfa2nclv9m3as1cja50wkcyxim7x9v")))) - (build-system meson-build-system) - (arguments - (list #:configure-flags - (match (%current-system) - ((or "armhf-linux" "aarch64-linux") - #~(list "-Dexynos=enabled" - "-Domap=enabled" - "-Detnaviv=enabled" - "-Dtegra=enabled" - "-Dfreedreno-kgsl=true")) - (_ ''())) - #:phases - #~(modify-phases %standard-phases - ;; A typo in a previous upstream commit disabled building - ;; libdrm_intel by default on supported platforms. This was - ;; fixed by the following change in upstream commit - ;; 8a933c778a0eb36526bf3fc8a289e25add9ff8b0. - ;; TODO: Remove on next update of libdrm. - (add-after 'unpack 'build-intel-by-default - (lambda _ - (substitute* "meson.build" - (("system\\(\\)\\.startswith") - "cpu_family().startswith")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "meson" "test" "--timeout-multiplier" "5"))))))) - (propagated-inputs - (list libpciaccess)) - (native-inputs - (list pkg-config)) - (home-page "https://dri.freedesktop.org/wiki/") - (synopsis "Direct rendering userspace library") - (description "The Direct Rendering Infrastructure, also known as the DRI, -is a framework for allowing direct access to graphics hardware under the -X Window System in a safe and efficient manner. It includes changes to the -X server, to several client libraries, and to the kernel (DRM, Direct -Rendering Manager). The most important use for the DRI is to create fast -OpenGL implementations providing hardware acceleration for Mesa. -Several 3D accelerated drivers have been written to the DRI specification, -including drivers for chipsets produced by 3DFX, AMD (formerly ATI), Intel -and Matrox.") - (license license:x11))) + "0yijzgg6rdsa68bz03sw0lcfa2nclv9m3as1cja50wkcyxim7x9v")))))) -;;; Mesa needs LibVA headers to build its Gallium-based VA API implementation; -;;; LibVA itself depends on Mesa. We use the following to solve the circular -;;; dependency. -(define libva-without-mesa - ;; Delay to work around circular import problem. - (delay - (package - (inherit libva) - (name "libva-without-mesa") - (inputs (fold alist-delete (package-inputs libva) - '("mesa" "wayland"))) - (arguments - (strip-keyword-arguments - '(#:make-flags) - (substitute-keyword-arguments (package-arguments libva) - ((#:configure-flags flags) - '(list "--disable-glx")))))))) - -(define-public mesa-24 ;; SENT to Guix +(define-public hyprpaper (package - (name "mesa") - (version "24.0.3") - (source - (origin - (method url-fetch) - (uri (list (string-append "https://archive.mesa3d.org/" - "mesa-" version ".tar.xz") - (string-append "ftp://ftp.freedesktop.org/pub/mesa/" - "mesa-" version ".tar.xz"))) - (sha256 - (base32 - "1gpx3glifdvyw2fxigiannrxkdfhag6b6h0nxab3azbvlfickbkp")))) - (build-system meson-build-system) - (propagated-inputs - ;; The following are in the Requires.private field of gl.pc. - (list libdrm-2.4.120 - libvdpau - libx11 - libxdamage - libxfixes - libxshmfence - libxxf86vm - xorgproto)) - (inputs - (list elfutils ;libelf required for r600 when using llvm - expat - (force libva-without-mesa) - libxml2 - libxrandr - libxvmc - llvm-for-mesa - wayland - wayland-protocols-1.33 - `(,zstd "lib"))) - (native-inputs - (cons* bison - flex - gettext-minimal - glslang - pkg-config - python-libxml2 ;for OpenGL ES 1.1 and 2.0 support - python-mako - python-wrapper - xf86-video-amdgpu - (@ (gnu packages base) which) - (if (%current-target-system) - (list cmake-minimal-cross - pkg-config-for-build - wayland - wayland-protocols-1.33) - '()))) - (outputs '("out" "bin")) - (arguments - (list - #:configure-flags - #~(list - #$@(cond - ((target-aarch64?) - ;; TODO: Fix svga driver for non-Intel architectures. - '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,\ -panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl,zink")) - ((target-arm32?) - ;; Freedreno FTBFS when built on a 64-bit machine. - '("-Dgallium-drivers=etnaviv,kmsro,lima,nouveau,panfrost,\ -r300,r600,swrast,tegra,v3d,vc4,virgl,zink")) - ((or (target-ppc64le?) (target-ppc32?) (target-riscv64?)) - '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl,zink")) - (else - '("-Dgallium-drivers=crocus,iris,nouveau,r300,r600,radeonsi,\ -svga,swrast,virgl,zink"))) - ;; Enable various optional features. TODO: opencl requires libclc, - ;; omx requires libomxil-bellagio - "-Dplatforms=x11,wayland" - "-Dglx=dri" ;Thread Local Storage, improves performance - ;; "-Dopencl=true" - ;; "-Domx=true" - "-Dosmesa=true" - "-Dgallium-xa=enabled" - - ;; features required by wayland - "-Dgles2=enabled" - "-Dgbm=enabled" - "-Dshared-glapi=enabled" - - ;; Explicitly enable Vulkan on some architectures. - #$@(cond - ((or (target-x86-32?) (target-x86-64?)) - '("-Dvulkan-drivers=intel,intel_hasvk,amd,swrast")) - ((or (target-ppc64le?) (target-ppc32?)) - '("-Dvulkan-drivers=amd,swrast")) - ((target-aarch64?) - '("-Dvulkan-drivers=freedreno,amd,broadcom,swrast")) - ((target-riscv64?) - '("-Dvulkan-drivers=amd,swrast")) - (else - '("-Dvulkan-drivers=auto"))) - - ;; Enable the Vulkan overlay layer on all architectures. - "-Dvulkan-layers=device-select,overlay" - - ;; Enable the codecs that were built by default as part of the - ;; 21.3.x releases to avoid functionality regressions. - "-Dvideo-codecs=vc1dec,h264dec,h264enc,h265dec,h265enc" - - ;; Enable ZSTD compression for shader cache. - "-Dzstd=enabled" - - ;; Also enable the tests. - "-Dbuild-tests=true" - - "-Dllvm=enabled") ; default is x86/x86_64 only - - ;; XXX: 'debugoptimized' causes LTO link failures on some drivers. The - ;; documentation recommends using 'release' for performance anyway. - #:build-type "release" - - #:modules '((ice-9 match) - (srfi srfi-1) - (guix build utils) - (guix build meson-build-system)) - #:phases - #~(modify-phases %standard-phases - #$@(if (%current-target-system) - #~((add-after 'unpack 'fix-cross-compiling - (lambda* (#:key native-inputs #:allow-other-keys) - ;; When cross compiling, we use cmake to find llvm, not - ;; llvm-config, because llvm-config cannot be executed - ;; see https://github.com/llvm/llvm-project/issues/58984 - (substitute* "meson.build" - (("method : host_machine\\.system.*") - "method : 'cmake',\n")) - (setenv "CMAKE" - (search-input-file - native-inputs "/bin/cmake"))))) - #~()) - (add-after 'unpack 'disable-failing-test - (lambda _ - ;; Disable the intel vulkan (anv_state_pool) tests, as they may - ;; fail in a nondeterministic fashion (see: - ;; https://gitlab.freedesktop.org/mesa/mesa/-/issues/5446). - (substitute* "src/intel/vulkan/meson.build" - (("if with_tests") - "if false")) - #$@(match (%current-system) - ("riscv64-linux" - ;; According to the test logs the llvm JIT is not designed - ;; for this architecture and the llvmpipe tests all segfault. - ;; The same is true for mesa:gallium / osmesa-render. - `((substitute* '("src/gallium/drivers/llvmpipe/meson.build" - "src/gallium/targets/osmesa/meson.build") - (("if with_tests") "if false")))) - ("powerpc64le-linux" - ;; Disable some of the llvmpipe tests. - `((substitute* "src/gallium/drivers/llvmpipe/lp_test_arit.c" - (("0\\.5, ") "")))) - ("powerpc-linux" - ;; There are some tests which fail specifically on powerpc. - `((substitute* '(;; LLVM ERROR: Relocation type not implemented yet! - "src/gallium/drivers/llvmpipe/meson.build" - ;; This is probably a big-endian test failure. - "src/gallium/targets/osmesa/meson.build") - (("if with_tests") "if not with_tests")) - ;; This test times out and receives SIGTERM. - (substitute* "src/amd/common/meson.build" - (("and not with_platform_windows") "and with_platform_windows")) - (substitute* "src/compiler/nir/meson.build" - ((".*loop_unroll_tests.*") "")))) - ("i686-linux" - ;; This test is known to fail on i686 (see: - ;; https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091). - `((substitute* "src/util/meson.build" - ((".*'tests/u_debug_stack_test.cpp',.*") "")))) - ("aarch64-linux" - ;; The ir3_disasm test segfaults. - ;; The simplest way to skip it is to run a different test instead. - `((substitute* "src/freedreno/ir3/meson.build" - (("disasm\\.c'") "delay.c',\n link_args: ld_args_build_id")))) - ("armhf-linux" - ;; Disable some of the llvmpipe tests. - `((substitute* "src/gallium/drivers/llvmpipe/meson.build" - (("'lp_test_arit', ") "")))) - (_ - '((display "No tests to disable on this architecture.\n")))))) - (add-before 'configure 'fix-dlopen-libnames - (lambda _ - (let ((out #$output)) - ;; Remain agnostic to .so.X.Y.Z versions while doing - ;; the substitutions so we're future-safe. - (substitute* "src/glx/meson.build" - (("-DGL_LIB_NAME=\"lib@0@\\.so\\.@1@\"") - (string-append "-DGL_LIB_NAME=\"" out - "/lib/lib@0@.so.@1@\""))) - (substitute* "src/gbm/backends/dri/gbm_dri.c" - (("\"libglapi\\.so") - (string-append "\"" out "/lib/libglapi.so"))) - (substitute* "src/gbm/main/backend.c" - ;; No need to patch the gbm_gallium_drm.so reference; - ;; it's never installed since Mesa removed its - ;; egl_gallium support. - (("\"gbm_dri\\.so") - (string-append "\"" out "/lib/dri/gbm_dri.so")))))) - (add-after 'install 'split-outputs - (lambda _ - (let ((out #$output) - (bin #$output:bin)) - ;; Not all architectures have the Vulkan overlay control script. - (mkdir-p (string-append out "/bin")) - (call-with-output-file (string-append out "/bin/.empty") - (const #t)) - (copy-recursively (string-append out "/bin") - (string-append bin "/bin")) - (delete-file-recursively (string-append out "/bin"))))) - (add-after 'install 'symlinks-instead-of-hard-links - (lambda _ - ;; All the drivers and gallium targets create hard links upon - ;; installation (search for "hardlink each megadriver instance" - ;; in the makefiles). This is no good for us since we'd produce - ;; nars that contain several copies of these files. Thus, turn - ;; them into symlinks, which saves ~124 MiB. - (let* ((out #$output) - (lib (string-append out "/lib")) - (files (find-files lib - (lambda (file stat) - (and (string-contains file ".so") - (eq? 'regular - (stat:type stat)))))) - (inodes (map (compose stat:ino stat) files))) - (for-each (lambda (inode) - (match (filter-map (match-lambda - ((file ino) - (and (= ino inode) file))) - (zip files inodes)) - ((_) - #f) - ((reference others ..1) - (format #t "creating ~a symlinks to '~a'~%" - (length others) reference) - (for-each delete-file others) - (for-each (lambda (file) - (if (string=? (dirname file) - (dirname reference)) - (symlink (basename reference) - file) - (symlink reference file))) - others)))) - (delete-duplicates inodes))))) - (add-after 'install 'set-layer-path-in-manifests - (lambda _ - (let* ((out #$output) - (implicit-path (string-append - out - "/share/vulkan/implicit_layer.d/")) - (explicit-path (string-append - out - "/share/vulkan/explicit_layer.d/")) - (fix-layer-path - (lambda (layer-name) - (let* ((explicit (string-append explicit-path layer-name ".json")) - (implicit (string-append implicit-path layer-name ".json")) - (manifest (if (file-exists? explicit) - explicit - implicit))) - (substitute* manifest - (((string-append "\"lib" layer-name ".so\"")) - (string-append "\"" out "/lib/lib" layer-name ".so\""))))))) - (for-each fix-layer-path '("VkLayer_MESA_device_select" - "VkLayer_MESA_overlay")))))))) - (native-search-paths - (list (search-path-specification - ;; Ensure the Mesa VDPAU drivers can be found. - (variable "VDPAU_DRIVER_PATH") - (separator #f) - (files '("lib/vdpau"))))) - (home-page "https://mesa3d.org/") - (synopsis "OpenGL and Vulkan implementations") - (description "Mesa is a free implementation of the OpenGL and Vulkan -specifications - systems for rendering interactive 3D graphics. A variety of -device drivers allows Mesa to be used in many different environments ranging -from software emulation to complete hardware acceleration for modern GPUs.") - (license license:x11))) - -(define-public mesa-headers-24 - (package/inherit mesa-24 - (name "mesa-headers") - (propagated-inputs '()) - (inputs '()) - (native-inputs '()) - (outputs '("out")) - (arguments - '(#:phases - (modify-phases %standard-phases - (delete 'configure) - (delete 'build) - (delete 'check) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (copy-recursively "include" (string-append - (assoc-ref outputs "out") - "/include"))))))))) - -(define-public glu-9.0.3 ;; SENT to Guix - (package - (name "glu") - (version "9.0.3") + (name "hyprpaper") + (version "0.5.0") (source (origin (method git-fetch) (uri (git-reference - (url "https://gitlab.freedesktop.org/mesa/glu") - (commit (string-append "glu-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0kmzmz93qqq0kv1c680nwf8whxf0zdw68khy7ask7plb41zdbbx1")))) - (build-system meson-build-system) - (native-inputs - (list pkg-config - mesa-headers)) - (propagated-inputs - (list `("opengl" ,libglvnd))) ; according to glu.pc - (home-page "http://www.opengl.org/archives/resources/faq/technical/glu.htm") - (synopsis "Mesa OpenGL Utility library") - (description - "GLU, or OpenGL Utility Library provides some higher-level functionality -not provided by just OpenGL itself. Some of GLU's Features -include: Scaling of 2D images and creation of mipmap pyramids, -Transformation of object coordinates into device coordinates and -vice versa, Support for NURBS surfaces, Support for tessellation -of concave or bow tie polygonal primitives, Specialty transformation -matrices for creating perspective and orthographic projections, -positioning a camera, and selection/picking, Rendering of disk, -cylinder, and sphere primitives, Interpreting OpenGL error values -as ASCII text.") - (license (license:x11-style "http://directory.fsf.org/wiki/License:SGIFreeBv2")))) - -(define-public cairo-1.18.0 ;; SENT to Guix - (package - (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 - `(#:tests? #f ; see http://lists.gnu.org/archive/html/bug-guix/2013-06/msg00085.html - #:configure-flags - (list - "-Dgtk_doc=true" - "-Dsymbol-lookup=disabled" - "-Dspectre=disabled" - ;; XXX: To be enabled. - ;; "--enable-gallium=yes" - ;; "--enable-gl=yes" - ;; " --enable-glesv2=yes" - ;; "--enable-glesv3=yes" - ;; "--enable-cogl=yes" - ;; "--enable-directfb=yes" - ;; "--enable-vg=yes" - ))) - (native-inputs - `(,@(if (target-hurd?) - '() - `(("gobject-introspection" ,gobject-introspection))) - ("gcc-13" ,gcc-13) - ("gtk-doc" ,gtk-doc) - ("docbook-xsl" ,docbook-xsl) - ("pkg-config" ,pkg-config) - ("python" ,python-wrapper))) - (inputs - `(("bash-minimal" ,bash-minimal) ;for glib-or-gtk-wrap - ,@(if (target-hurd?) - '() - `(("drm" ,libdrm-2.4.120))) - ("ghostscript" ,ghostscript) - ("libspectre" ,libspectre) - ,@(if (target-hurd?) - '() - `(("poppler" ,poppler))))) - (propagated-inputs - `( ;; ("cogl" ,cogl) - ;; ("directfb" ,directfb) - ("fontconfig" ,fontconfig) - ("freetype" ,freetype) - ("glib" ,glib) - ;; ("gtk+" ,gtk+) - ("libpng" ,libpng) - ;; ("librsvg" ,librsvg) - ;; ("opengl" ,mesa) - ("pixman" ,pixman) - ("x11" ,libx11) - ("xcb" ,libxcb) - ("xext" ,libxext) - ("xrender" ,libxrender))) - (synopsis "Multi-platform 2D graphics library") - (description "Cairo is a 2D graphics library with support for multiple output -devices. Currently supported output targets include the X Window System (via -both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file -output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB.") - (home-page "https://cairographics.org/") - (license - ;; This project is dual-licensed. - (list - license:lgpl2.1+ - license:mpl1.1)))) - -(define-public tomlplusplus ;; SENT to Guix - (package - (name "tomlplusplus") - (version "3.4.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/marzer/tomlplusplus") + (url "https://github.com/hyprwm/hyprpaper.git") (commit (string-append "v" version)))) (sha256 (base32 - "1hvbifzcc97r9jwjzpnq31ynqnj5y93cjz4frmgddnkg8hxmp6w7")))) - (build-system cmake-build-system) - (native-inputs - (list python)) - (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-public hwdata-0.380 ;; SENT to Guix - (package - (name "hwdata") - (version "0.380") ;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 - "1j7lr67ay4nz737cv4y1hiyqdz03zl5c1vdavr7fd05h92sv91i2")))) - (build-system gnu-build-system) - (native-inputs - (list pkg-config)) - (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 - (add-after 'install 'post-install - (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 - -(define-public libinput-1.25 ;; SENT to Guix - ;; Updating this will rebuild over 700 packages through libinput-minimal. - (package - (name "libinput") - (version "1.25.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.freedesktop.org/libinput/libinput.git") - (commit version))) - (sha256 - (base32 - "0nzz76lgjkj8la5icmv9zm43gb3d12ygjcilc4nqh25ywpj58qbk")))) - (build-system meson-build-system) - (arguments - `(#:configure-flags '("-Ddocumentation=false") - #:tests? #f - - ;; XXX: Using 'debug' or 'debugoptimized' pulls in an additional test that - ;; hangs, and the comments around it suggests that we should be using this - ;; Meson target anyway. - #:build-type "release")) - (native-inputs - (append (list check pkg-config) - (if (%current-target-system) - (list pkg-config-for-build) - '()))) - (inputs - (append (list cairo-1.18.0 - glib - gtk+ - libevdev - libwacom - mtdev) - (if (%current-target-system) - (list check) - '()))) - (propagated-inputs - `(;; libinput.h requires , so propagate it. - ("udev" ,eudev))) - (home-page "https://www.freedesktop.org/wiki/Software/libinput/") - (synopsis "Input devices handling library") - (description - "Libinput is a library to handle input devices for display servers and -other applications that need to directly deal with input devices.") - (license license:x11))) - -(define-public libliftoff-0.4.1 - (package - (name "libliftoff") - (version "0.4.1") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://gitlab.freedesktop.org/emersion/libliftoff") - (commit (string-append "v" version)))) - (sha256 - (base32 - "1ikjp638d655ycaqkdnzhb12d29kkbb3a46lqhbhsfc8vsqj3z1l")))) - (build-system meson-build-system) - (native-inputs - (list pkg-config)) - (inputs - (list libdrm-2.4.120)) - (home-page "https://gitlab.freedesktop.org/emersion/libliftoff") - (synopsis "Lightweight KMS plane library") - (description "libliftoff eases the use of KMS planes from userspace without standing in your -way. Users create \"virtual planes\" called layers, set KMS properties on them, -and libliftoff will pick hardware planes for these layers if possible.") - (license license:expat))) - -(define-public wayland-protocols-1.33 ;; SENT to Guix - (package - (name "wayland-protocols") - (version "1.33") - (source (origin - (method url-fetch) - (uri (string-append "https://gitlab.freedesktop.org/wayland/" - name "/-/releases/" version "/downloads/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "0flnqfc8npzn6rxsw4afpr8yifwsn5kq81327yh62vhd145wbw4l")))) - (build-system meson-build-system) - (inputs - (list wayland)) - (native-inputs (cons* pkg-config python - (if (%current-target-system) - (list pkg-config-for-build - wayland) ; for wayland-scanner - '()))) - (synopsis "Wayland protocols") - (description "Wayland-Protocols contains Wayland protocols that add -functionality not available in the Wayland core protocol. Such protocols either -add completely new functionality, or extend the functionality of some other -protocol either in Wayland core, or some other protocol in wayland-protocols.") - (home-page "https://wayland.freedesktop.org") - (properties - '((release-monitoring-url - . "https://wayland.freedesktop.org/releases.html"))) - (license license:expat))) - -(define-public wlroots-hyprland - (package - (name "wlroots") - (version "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b") - (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 - (base32 - "0bwpppb86nfjg2lw62y449f9iz2v8djqb8n6g1cn45vqnwj8hxf1")))) - (build-system meson-build-system) - (arguments - `(#:configure-flags - '("-Dauto_features=enabled" - "-Dexamples=false" - "-Dbackends=drm,libinput" - "-Drenderers=gles2,vulkan"))) - (propagated-inputs - (list ;; As required by wlroots.pc. - egl-wayland - eudev - ffmpeg-4 - glslang - glu-9.0.3 - libxkbcommon - mesa-24 - pixman - libcap - libdisplay-info - libinput-1.25 - libliftoff-0.4.1 - libpng - libseat - libxkbcommon - vulkan-loader - wayland - wayland-protocols-1.33 - xcb-util-errors - xcb-util-image - xcb-util-renderutil - xcb-util-wm - xorg-server-xwayland)) - (inputs - (list libdrm-2.4.120)) - (native-inputs - (cons* - `(,hwdata-0.380 "pnp") - hwdata-0.380 - mesa-headers-24 - vulkan-headers - pkg-config - wayland - xf86-video-amdgpu - (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 - -(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 libdisplay-info-0.1.1 - (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 version))) - (sha256 - (base32 "1ffq7w1ig1y44rrmkv1hvfjylzgq7f9nlnnsdgdv7pmcpfh45pgf")))) - (build-system meson-build-system) - (arguments - `(#:phases (modify-phases %standard-phases - (delete 'check)))) - (native-inputs - (list pkg-config - edid-decode - hwdata - python-wrapper)) - (home-page "https://gitlab.freedesktop.org/emersion/libdisplay-info") - (synopsis "EDID and DisplayID library") - (description "EDID and DisplayID library") - (license license:expat))) - - -(define-public hyprlang - (package - (name "hyprlang") - (version "0.5.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/hyprwm/hyprlang") - (commit (string-append "v" version)))) - (sha256 - (base32 - "0f8mahg6d6wylybvh6hgayls57miwwv4w69fbaskd8d7dkg2h7kd")))) - (build-system cmake-build-system) - (native-inputs - (list gcc-13)) - (home-page "https://www.hyprland.org") - (synopsis "The official implementation library for the hypr config language.") - (description "The hypr configuration language is an extremely efficient, yet easy to work with, configuration language for linux applications.") - (license license:bsd-3))) - -(define-public hyprcursor - (package - (name "hyprcursor") - (version "0.1.4") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/hyprwm/hyprcursor") - (commit (string-append "v" version)))) - (sha256 - (base32 - "0bp0y825g9aakh1k2n32n6g7mx40rbn1cay46kqibyvdmvskm4lv")))) + "18z6yf3jxfpagyqa73j8imp9450xm4wp2f8rjjvlqbpd425yvhdm")))) (build-system cmake-build-system) (native-inputs (list gcc-13 + rosenthal:hyprland-protocols + wayland-protocols-for-hyprland pkg-config)) (inputs - (list hyprlang - cairo-1.18.0 - librsvg - libzip)) - (arguments - '(#:phases - (modify-phases %standard-phases - (delete 'check)))) - (home-page "https://www.hyprland.org") - (synopsis "The hyprland cursor format, library and utilities.") - (description "The hyprland cursor format, library and utilities.") + (list cairo-for-hyprland + file + libglvnd + libjpeg-turbo + libwebp + rosenthal:hyprlang + mesa + pango + wayland + wlroots-for-hyprland)) + (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 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 meson-build-system) - (native-inputs - (list gcc-13 - cmake - mesa-headers-24 - pkg-config)) - (inputs - (list hyprlang - hyprland-protocols - libdrm-2.4.120 - mesa-24 - pipewire - qtbase - qttools - qtwayland - sdbus-c++ - wayland-protocols-1.33 - wayland)) - (home-page "https://www.hyprland.org") - (synopsis "xdg-desktop-portal backend for hyprland") - (description "xdg-desktop-portal backend for hyprland.") - (license license:bsd-3))) - -(define-public hyprland - (package - (name "hyprland") - (version "0.37.1") - (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 - "1qkiyfcb3y61kwc1gqdsav87299ji7xr5j6zbh8wgam720mgivav")) - (modules '((guix build utils))) - (snippet - #~(begin - (copy-file "src/version.h.in" "src/version.h") - (substitute* "src/version.h" - (("@HASH@") #$version) - (("@BRANCH@") "") - (("@MESSAGE@") "") - (("@TAG@") "") - (("@DIRTY@") "")) - (substitute* "src/render/OpenGL.cpp" - (("/usr") "$out")))))) - (build-system meson-build-system) - (arguments - '(#:configure-flags '("-Dsystemd=disabled") - #:phases - (modify-phases %standard-phases - (add-before 'configure - 'pre-configure - (lambda* (#:key outputs #:allow-other-keys) - (system "patch -p1 -i nix/patches/meson-build.patch") - (system "cat src/meson.build")))))) - (native-inputs - (list gcc-13 - cmake - libevdev - wayland-protocols-1.33 - jq - git - mesa-headers-24 - pkg-config)) - (inputs - (list cairo-1.18.0 - egl-gbm - egl-wayland - glu-9.0.3 - glfw - hyprland-protocols - hyprcursor - hyprlang - xdg-desktop-portal-hyprland - libdisplay-info - libglvnd - libinput-1.25 - libxkbcommon - libdrm-2.4.120 - mesa-24 - tomlplusplus - wayland - xorg-server-xwayland - pango - pciutils - udis86 - wayland - wlroots-hyprland - xcb-util)) - (home-page "https://www.hyprland.org") - (synopsis "Dynamic tiling -Wayland compositor based on wlroots") - (description "Hyprland.") - (license license:bsd-3)))