guix: add guix package definition

This allows the repository to be used as a channel. It can also be used to
enter a development/trial shell.
This commit is contained in:
Andrew Wong 2025-03-24 00:40:46 -04:00 committed by outfoxxed
parent 1a20c39fba
commit 207e6114a3
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
3 changed files with 91 additions and 0 deletions

View file

@ -13,3 +13,6 @@ indent_size = 2
[*.{yml,yaml}]
indent_style = space
indent_size = 2
[*.scm]
indent_style = space

View file

@ -78,6 +78,20 @@ It is not managed by us and should be looked over before use.
[Fedora COPR package]: https://copr.fedorainfracloud.org/coprs/errornointernet/quickshell
## Guix
This repo works as a channel. Add the following to your channel list:
```scheme
(channel
(name quickshell)
(url "https://git.outfoxxed.me/outfoxxed/quickshell")
(branch "master"))
```
Then, you can install the package via `guix install quickshell-git` or by adding `quickshell-git` to your system or home definition.
You can also clone the repository and use `guix shell -f quickshell.scm` to try out the package.
## Anything else
See [BUILD.md](BUILD.md) for instructions on building and packaging quickshell.

74
quickshell.scm Normal file
View file

@ -0,0 +1,74 @@
(define-module (quickshell)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages cpp)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages gcc)
#:use-module (gnu packages gl)
#:use-module (gnu packages jemalloc)
#:use-module (gnu packages linux)
#:use-module (gnu packages ninja)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages qt)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xorg)
#:use-module (guix build-system cmake)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix packages)
#:use-module (guix utils))
(define-public quickshell-git
(package
(name "quickshell")
(version "git")
(source (local-file "." "quickshell-checkout"
#:recursive? #t
#:select? (or (git-predicate (current-source-directory))
(const #t))))
(build-system cmake-build-system)
(propagated-inputs (list qtbase qtdeclarative qtsvg))
(native-inputs (list ninja
gcc-14
pkg-config
qtshadertools
spirv-tools
wayland-protocols))
(inputs (list cli11
jemalloc
libdrm
libxcb
libxkbcommon
linux-pam
mesa
pipewire
qtbase
qtdeclarative
qtwayland
vulkan-headers
wayland))
(arguments
(list #:tests? #f
#:configure-flags
#~(list "-GNinja"
"-DDISTRIBUTOR=\"In-tree Guix channel\""
"-DDISTRIBUTOR_DEBUGINFO_AVAILABLE=NO"
;; Breakpad is not currently packaged for Guix.
"-DCRASH_REPORTER=OFF")
#:phases #~(modify-phases %standard-phases
(replace 'build
(lambda* (#:key parallel-build? #:allow-other-keys)
(invoke "cmake" "--build" ".")))
(replace 'install
(lambda _ (invoke "cmake" "--install" "."))))))
(home-page "https://quickshell.outfoxxed.me")
(synopsis "QtQuick-based desktop shell toolkit")
(description
"Quickshell is a flexible QtQuick-based toolkit for creating and
customizing toolbars, notification centers, and other desktop
environment tools in a live programming environment.")
(license license:lgpl3)))
quickshell-git