This commit is contained in:
Daniel Ziltener 2024-04-11 00:29:40 +02:00
parent 0ac4735eb8
commit 5c622b5ea4
Signed by: zilti
GPG key ID: B38976E82C9DAE42
2 changed files with 147 additions and 6 deletions

View file

@ -432,10 +432,11 @@ more.")
linux-pam linux-pam
mesa mesa
libdrm-for-hyprland libdrm-for-hyprland
libglvnd
libxkbcommon libxkbcommon
wayland-protocols-for-hyprland wayland-protocols-for-hyprland
wayland wayland
egl-wayland
egl-gbm
rosenthal:hyprlang)) rosenthal:hyprlang))
(home-page "https://github.com/hyprwm/hyprlock") (home-page "https://github.com/hyprwm/hyprlock")
(synopsis "Hyprland's GPU-accelerated screen locking utility") (synopsis "Hyprland's GPU-accelerated screen locking utility")

View file

@ -11,12 +11,57 @@
#:use-module #:use-module
(guix build-system trivial) (guix build-system trivial)
#:use-module #:use-module
(guix build-system glib-or-gtk)
#:use-module
((guix licenses) ((guix licenses)
#:prefix license:) #:prefix license:)
#:use-module #:use-module
(gnu packages) (gnu packages)
#:use-module #:use-module
((gnu packages package-management) #:prefix gnu:)) (gnu packages backup)
#:use-module
(gnu packages base)
#:use-module
(gnu packages bison)
#:use-module
(gnu packages compression)
#:use-module
(gnu packages curl)
#:use-module
(gnu packages freedesktop)
#:use-module
(gnu packages gettext)
#:use-module
(gnu packages glib)
#:use-module
(gnu packages gnome)
#:use-module
(gnu packages gnupg)
#:use-module
(gnu packages gtk)
#:use-module
(gnu packages linux)
#:use-module
(gnu packages networking)
#:use-module
(gnu packages package-management)
#:use-module
(gnu packages pkg-config)
#:use-module
(gnu packages polkit)
#:use-module
(gnu packages python)
#:use-module
(gnu packages python-build)
#:use-module
(gnu packages tls)
#:use-module
(gnu packages virtualization)
#:use-module
(gnu packages xml)
#:use-module
(gnu packages xorg)
)
(define-public process-compose (define-public process-compose
(package (package
@ -55,7 +100,6 @@ to manage non-containerized applications.")
(define-public flatpak (define-public flatpak
(package (package
(inherit gnu:flatpak)
(name "flatpak") (name "flatpak")
(version "1.14.5") (version "1.14.5")
(source (source
@ -68,5 +112,101 @@ to manage non-containerized applications.")
(base32 (base32
"1b7z4wzh2zgphcal95vj4x7wbr9s89p2a4c0l0g4w4xcwx6ccw2v")) "1b7z4wzh2zgphcal95vj4x7wbr9s89p2a4c0l0g4w4xcwx6ccw2v"))
(patches (patches
(search-patches "flatpak-fix-path.patch")))))) (search-patches "flatpak-fix-path.patch"))))
;; Wrap 'flatpak' so that GIO_EXTRA_MODULES is set, thereby allowing GIO to
;; find the TLS backend in glib-networking.
(build-system glib-or-gtk-build-system)
(arguments
(list
#:configure-flags
#~(list
"--with-curl"
"--enable-documentation=no" ;; FIXME
"--enable-system-helper=no"
(string-append "--with-system-bubblewrap="
(assoc-ref %build-inputs "bubblewrap")
"/bin/bwrap")
(string-append "--with-system-dbus-proxy="
(assoc-ref %build-inputs "xdg-dbus-proxy")
"/bin/xdg-dbus-proxy")
"--localstatedir=/var"
)
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'fix-tests
(lambda* (#:key inputs #:allow-other-keys)
(copy-recursively
(search-input-directory inputs "lib/locale")
"/tmp/locale")
(for-each make-file-writable (find-files "/tmp"))
(substitute* "tests/make-test-runtime.sh"
(("cp `which.*") "echo guix\n")
(("cp -r /usr/lib/locale/C\\.\\*")
(string-append "mkdir ${DIR}/usr/lib/locale/en_US; \
cp -r /tmp/locale/*/en_US.*")))
(substitute* "tests/libtest.sh"
(("/bin/kill") (which "kill"))
(("/usr/bin/python3") (which "python3")))
#t))
(add-after 'unpack 'p11-kit-fix
(lambda* (#:key inputs #:allow-other-keys)
(let ((p11-path (search-input-file inputs "/bin/p11-kit")))
(substitute* "session-helper/flatpak-session-helper.c"
(("\"p11-kit\",")
(string-append "\"" p11-path "\","))
(("if \\(g_find_program_in_path \\(\"p11-kit\"\\)\\)")
(string-append "if (g_find_program_in_path (\""
p11-path "\"))"))))))
;; Many tests fail for unknown reasons, so we just run a few basic
;; tests.
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "HOME" "/tmp")
(invoke "make" "check"
"TESTS=tests/test-basic.sh tests/test-config.sh
testcommon")))))))
(native-inputs
(list bison
dbus ; for dbus-daemon
gettext-minimal
`(,glib "bin") ; for glib-mkenums + gdbus-codegen
(libc-utf8-locales-for-target)
gobject-introspection
libcap
pkg-config
python
python-pyparsing
socat
which))
(inputs
(list appstream
appstream-glib
bubblewrap
curl
dconf
fuse
gdk-pixbuf
gpgme
json-glib
libarchive
libcap
libostree
libseccomp
libsoup-minimal-2
libxau
libxml2
p11-kit
polkit
util-linux
xdg-dbus-proxy
zstd))
(propagated-inputs (list glib-networking gnupg gsettings-desktop-schemas))
(home-page "https://flatpak.org")
(synopsis "System for building, distributing, and running sandboxed desktop
applications")
(description "Flatpak is a system for building, distributing, and running
sandboxed desktop applications on GNU/Linux.")
(license license:lgpl2.1+)))