(define-module (freya packages networking) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix build utils) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system cargo) #:use-module (guix build-system meson) #:use-module (gnu packages) #:use-module (gnu packages linux) #:use-module (gnu packages gcc) #:use-module (gnu packages gtk) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages pkg-config) #:use-module (gnu packages networking) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-gtk) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages rust) #:use-module (freya packages linux) #:use-module (freya packages crates-io) #:use-module (freya packages pulseaudio)) (define overskride-version "0.5.7") (define overskride-source (origin (method url-fetch) (uri (string-append "https://github.com/kaii-lb/overskride" "/archive/refs/tags/v" overskride-version ".tar.gz")) (file-name (string-append "overskride-" overskride-version ".tar.gz")) (patches (list (local-file "patches/overskride-fix-meson.patch"))) (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "subprojects"))) (sha256 (base32 "0qncsyapw4fl9zx95i1i62karvrbqj58lrd2difms36wa14ylz2v")))) (define overskride-glib (package (name "overskride-glib") (version overskride-version) (source overskride-source) (build-system meson-build-system) (native-inputs (list rust desktop-file-utils gettext-minimal pkg-config blueprint-compiler gobject-introspection `(,gtk "bin") `(,glib "bin"))) (propagated-inputs (list gtk libadwaita)) (home-page "https://github.com/kaii-lb/overskride") (synopsis "A simple yet powerful bluetooth client.") (description "Provides the glib components of the overskride pacakge") (license license:gpl3+))) (define-public overskride (package (name "overskride") (version overskride-version) (source overskride-source) (build-system cargo-build-system) (arguments `(#:tests? #f #:cargo-inputs (("rust-libadwaita" ,rust-libadwaita-0.5) ("rust-bluer" ,rust-bluer-0.17) ("rust-dbus" ,rust-dbus-0.9) ("rust-dbus-crossroads" ,rust-dbus-crossroads-0.5) ("rust-futures" ,rust-futures-0.3) ("rust-gettext-rs" ,rust-gettext-rs-0.7) ("rust-gtk" ,rust-gtk-0.8) ("rust-pnf" ,rust-phf-0.11) ("rust-tokio" ,rust-tokio-1) ("rust-tokio-util" ,rust-tokio-util-0.7) ("rust-uuid" ,rust-uuid-1) ("rust-libpulse-binding" ,rust-libpulse-binding-2)) #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-source (lambda* (#:key outputs #:allow-other-keys) (substitute* "Cargo.toml" (("0.16.1") "0.17")) (substitute* "src/config.rs" (("\\/usr\\/share\\/overskride") (string-append (assoc-ref outputs "out") "/share/overskride"))))) (add-after 'install 'install-glib (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (glib (assoc-ref inputs "overskride-glib"))) (copy-recursively glib out)))) (add-after 'install-glib 'wrap-program (lambda* (#:key inputs outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out") "/bin/overskride") `("GSETTINGS_SCHEMA_DIR" = (,(string-append (assoc-ref outputs "out") "/share/glib-2.0/schemas"))))))))) (native-inputs (list gcc-13 pkg-config `(,gtk "bin") `(,glib "bin"))) (inputs (list overskride-glib gcc-13 dbus libadwaita pulseaudio-new bluez-new)) (home-page "https://github.com/kaii-lb/overskride") (synopsis "A simple yet powerful bluetooth client.") (description "todo") (license license:gpl3+))) (define-public blueman-new (package (inherit blueman) (inputs (modify-inputs (package-inputs blueman) (delete "bluez") (prepend bluez-new)))))