;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2024 Andreas Enge ;;; Copyright © 2024 David Elsing ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (kanata) #:use-module (guix build-system cargo) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages) #:use-module (gnu packages crates-apple) #:use-module (gnu packages crates-graphics) #:use-module (gnu packages crates-io) #:use-module (gnu packages crates-windows) ) (define-public rust-time-macros-0.2 (package (name "rust-time-macros") (version "0.2.18") (source (origin (method url-fetch) (uri (crate-uri "time-macros" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1kqwxvfh2jkpg38fy673d6danh1bhcmmbsmffww3mphgail2l99z")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-num-conv" ,rust-num-conv-0.1) ("rust-time-core" ,rust-time-core-0.1)))) (home-page "https://github.com/time-rs/time") (synopsis "Procedural macros for the time crate. This crate is an implementation detail and should not be relied upon directly.") (description "This package provides Procedural macros for the time crate. This crate is an implementation detail and should not be relied upon directly.") (license (list license:expat license:asl2.0)))) (define-public rust-time-0.3 (package (name "rust-time") (version "0.3.36") (source (origin (method url-fetch) (uri (crate-uri "time" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "11g8hdpahgrf1wwl2rpsg5nxq3aj7ri6xr672v4qcij6cgjqizax")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-deranged" ,rust-deranged-0.3) ("rust-itoa" ,rust-itoa-1) ("rust-js-sys" ,rust-js-sys-0.3) ("rust-libc" ,rust-libc-0.2) ("rust-num-conv" ,rust-num-conv-0.1) ("rust-num-threads" ,rust-num-threads-0.1) ("rust-powerfmt" ,rust-powerfmt-0.2) ("rust-quickcheck" ,rust-quickcheck-1) ("rust-rand" ,rust-rand-0.8) ("rust-serde" ,rust-serde-1) ("rust-time-core" ,rust-time-core-0.1) ("rust-time-macros" ,rust-time-macros-0.2)))) (home-page "https://time-rs.github.io") (synopsis "Date and time library. Fully interoperable with the standard library. Mostly compatible with #![no_std]") (description "This package provides Date and time library. Fully interoperable with the standard library. Mostly compatible with #![no_std].") (license (list license:expat license:asl2.0)))) (define-public rust-stretch-0.3 (package (name "rust-stretch") (version "0.3.2") (source (origin (method url-fetch) (uri (crate-uri "stretch" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "11vdmli145j6yakgr7hkzgbnz1kqsb9rq3zrxl1g6dz11k9cc3bv")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-lazy-static" ,rust-lazy-static-1) ("rust-libm" ,rust-libm-0.1)))) (home-page "https://github.com/vislyhq/stretch") (synopsis "High performance & cross-platform Flexbox implementation") (description "This package provides High performance & cross-platform Flexbox implementation.") (license #f))) (define-public rust-newline-converter-0.2 (package (name "rust-newline-converter") (version "0.2.2") (source (origin (method url-fetch) (uri (crate-uri "newline-converter" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "03y000bbxnwzb7aipxyw7gm68b1bd8dv7illz03l4qw7bjfx0w8z")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-unicode-segmentation" ,rust-unicode-segmentation-1)))) (home-page "https://github.com/spitfire05/rnc/tree/master/crates/newline-converter") (synopsis "Newline byte converter library") (description "This package provides Newline byte converter library.") (license license:expat))) (define-public rust-muldiv-0.2 (package (name "rust-muldiv") (version "0.2.1") (source (origin (method url-fetch) (uri (crate-uri "muldiv" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "014jlry2l2ph56mp8knw65637hh49q7fmrraim2bx9vz0a638684")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t)) (home-page "https://github.com/sdroege/rust-muldiv") (synopsis "Provides a trait for numeric types to perform combined multiplication and division with overflow protection") (description "This package provides a trait for numeric types to perform combined multiplication and division with overflow protection.") (license license:expat))) (define-public rust-native-windows-gui-1 (package (name "rust-native-windows-gui") (version "1.0.13") (source (origin (method url-fetch) (uri (crate-uri "native-windows-gui" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0m44lbslzvs04i4rgcphld23qlwf9zzlzmspgimyp3gnd6k06w2g")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-bitflags" ,rust-bitflags-1) ("rust-lazy-static" ,rust-lazy-static-1) ("rust-muldiv" ,rust-muldiv-0.2) ("rust-newline-converter" ,rust-newline-converter-0.2) ("rust-plotters" ,rust-plotters-0.3) ("rust-plotters-backend" ,rust-plotters-backend-0.3) ("rust-raw-window-handle" ,rust-raw-window-handle-0.3) ("rust-stretch" ,rust-stretch-0.3) ("rust-winapi" ,rust-winapi-0.3) ("rust-winapi-build" ,rust-winapi-build-0.1)))) (home-page "https://github.com/gabdube/native-windows-gui") (synopsis "rust library to develop native GUI applications on the desktop for Microsoft Windows. Native-windows-gui wraps the native win32 window controls in a rustic API") (description "This package provides a rust library to develop native GUI applications on the desktop for Microsoft Windows. Native-windows-gui wraps the native win32 window controls in a rustic API.") (license license:expat))) (define-public rust-mio-0.8 (package (name "rust-mio") (version "0.8.11") (source (origin (method url-fetch) (uri (crate-uri "mio" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "034byyl0ardml5yliy1hmvx8arkmn9rv479pid794sm07ia519m4")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-libc" ,rust-libc-0.2) ("rust-log" ,rust-log-0.4) ("rust-wasi" ,rust-wasi-0.11) ("rust-windows-sys" ,rust-windows-sys-0.48)))) (home-page "https://github.com/tokio-rs/mio") (synopsis "Lightweight non-blocking I/O") (description "This package provides Lightweight non-blocking I/O.") (license license:expat))) (define-public rust-karabiner-driverkit-0.1 (package (name "rust-karabiner-driverkit") (version "0.1.4") (source (origin (method url-fetch) (uri (crate-uri "karabiner-driverkit" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0lvwny8xgyjijyg4m88wd308dhmpilabsba7815cwrs7v1wp1kd7")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-cc" ,rust-cc-1) ("rust-os-info" ,rust-os-info-3)))) (home-page "https://github.com/Psych3r/driverkit") (synopsis "Minimal Karabiner-DriverKit-VirtualHIDDevice wrapper for kanata") (description "This package provides Minimal Karabiner-@code{DriverKit-VirtualHIDDevice} wrapper for kanata.") (license license:lgpl3))) (define-public rust-kanata-tcp-protocol-0.171.1 (package (name "rust-kanata-tcp-protocol") (version "0.171.1") (source (origin (method url-fetch) (uri (crate-uri "kanata-tcp-protocol" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "04ngmq1932qjfdy6scv37iqib7ngz7nxg3sjwql7kldplrh0iqmx")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-serde" ,rust-serde-1) ("rust-serde-derive" ,rust-serde-derive-1) ("rust-serde-json" ,rust-serde-json-1)))) (home-page "") (synopsis "TCP protocol for kanata. This does not follow semver") (description "This package provides TCP protocol for kanata. This does not follow semver.") (license license:lgpl3))) (define-public rust-patricia-tree-0.8 (package (name "rust-patricia-tree") (version "0.8.0") (source (origin (method url-fetch) (uri (crate-uri "patricia_tree" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0s5fya6rvgg2gxxp5mbv0xdq8jqikps1sc6snk23zrgzkd9z9wii")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-bitflags" ,rust-bitflags-2) ("rust-serde" ,rust-serde-1)))) (home-page "https://github.com/sile/patricia_tree") (synopsis "Memory-efficient data structures based on patricia tree") (description "This package provides Memory-efficient data structures based on patricia tree.") (license license:expat))) (define-public rust-bytemuck-1 (package (name "rust-bytemuck") (version "1.20.0") (source (origin (method url-fetch) (uri (crate-uri "bytemuck" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0nk9llwmvjpjlsrlga1qg3spqvci8g1nr286nhamvn7zcf5chdwb")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-bytemuck-derive" ,rust-bytemuck-derive-1)))) (home-page "https://github.com/Lokathor/bytemuck") (synopsis "crate for mucking around with piles of bytes.") (description "This package provides a crate for mucking around with piles of bytes.") (license (list license:zlib license:asl2.0 license:expat)))) (define-public rust-kanata-parser-0.171.1 (package (name "rust-kanata-parser") (version "0.171.1") (source (origin (method url-fetch) (uri (crate-uri "kanata-parser" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1sabixnar4lh4zk83m1lk8bwgcznlkwr0gmz1akg56mihkphdyjy")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-anyhow" ,rust-anyhow-1) ("rust-bitflags" ,rust-bitflags-2) ("rust-bytemuck" ,rust-bytemuck-1) ("rust-itertools" ,rust-itertools-0.12) ("rust-kanata-keyberon" ,rust-kanata-keyberon-0.171.1) ("rust-log" ,rust-log-0.4) ("rust-miette" ,rust-miette-5) ("rust-once-cell" ,rust-once-cell-1) ("rust-parking-lot" ,rust-parking-lot-0.12) ("rust-patricia-tree" ,rust-patricia-tree-0.8) ("rust-rustc-hash" ,rust-rustc-hash-1) ("rust-thiserror" ,rust-thiserror-1)))) (home-page "https://github.com/jtroo/kanata") (synopsis "parser for configuration language of kanata, a keyboard remapper.") (description "This package provides a parser for configuration language of kanata, a keyboard remapper.") (license license:lgpl3))) (define-public rust-kanata-keyberon-macros-0.2 (package (name "rust-kanata-keyberon-macros") (version "0.2.0") (source (origin (method url-fetch) (uri (crate-uri "kanata-keyberon-macros" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0lj7ldiazmszh0k01h7mjzhjg59bdakvx2pnpc9mq2ir0czzixkk")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1) ("rust-quote" ,rust-quote-1)))) (home-page "") (synopsis "Macros for keyberon. Fork for kanata project") (description "This package provides Macros for keyberon. Fork for kanata project.") (license license:expat))) (define-public rust-arraydeque-0.5 (package (name "rust-arraydeque") (version "0.5.1") (source (origin (method url-fetch) (uri (crate-uri "arraydeque" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0dn2xdfg3rkiqsh8a6achnmvf5nf11xk33xgjzpksliab4yjx43x")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t)) (home-page "https://github.com/andylokandy/arraydeque") (synopsis "ring buffer with a fixed capacity, which can be stored on the stack.") (description "This package provides a ring buffer with a fixed capacity, which can be stored on the stack.") (license (list license:expat license:asl2.0)))) (define-public rust-kanata-keyberon-0.171.1 (package (name "rust-kanata-keyberon") (version "0.171.1") (source (origin (method url-fetch) (uri (crate-uri "kanata-keyberon" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "07gf0vq9pv2ks6xhailrbzchgfsylhjml644jm7953kpjw7l87x1")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-arraydeque" ,rust-arraydeque-0.5) ("rust-heapless" ,rust-heapless-0.7) ("rust-kanata-keyberon-macros" ,rust-kanata-keyberon-macros-0.2) ("rust-rustc-hash" ,rust-rustc-hash-1)))) (home-page "https://github.com/TeXitoi/keyberon") (synopsis "Pure Rust keyboard firmware. Fork intended for use with kanata") (description "This package provides Pure Rust keyboard firmware. Fork intended for use with kanata.") (license license:expat))) (define-public rust-num-enum-derive-0.6 (package (name "rust-num-enum-derive") (version "0.6.1") (source (origin (method url-fetch) (uri (crate-uri "num_enum_derive" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "19k57c0wg56vzzj2w77jsi8nls1b8xh8pvpzjnrgf8d9cnvpsrln")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-proc-macro-crate" ,rust-proc-macro-crate-1) ("rust-proc-macro2" ,rust-proc-macro2-1) ("rust-quote" ,rust-quote-1) ("rust-syn" ,rust-syn-2)))) (home-page "https://github.com/illicitonion/num_enum") (synopsis "Internal implementation details for ::num_enum (Procedural macros to make inter-operation between primitives and enums easier)") (description "This package provides Internal implementation details for ::num_enum (Procedural macros to make inter-operation between primitives and enums easier).") (license (list license:bsd-3 license:expat license:asl2.0)))) (define-public rust-num-enum-0.6 (package (name "rust-num-enum") (version "0.6.1") (source (origin (method url-fetch) (uri (crate-uri "num_enum" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "18bna04g6zq978z2b4ygz0f8pbva37id4xnpgwh8l41w1m1mn0bs")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-num-enum-derive" ,rust-num-enum-derive-0.6)))) (home-page "https://github.com/illicitonion/num_enum") (synopsis "Procedural macros to make inter-operation between primitives and enums easier") (description "This package provides Procedural macros to make inter-operation between primitives and enums easier.") (license (list license:bsd-3 license:expat license:asl2.0)))) (define-public rust-interception-sys-0.1 (package (name "rust-interception-sys") (version "0.1.3") (source (origin (method url-fetch) (uri (crate-uri "interception-sys" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1lgwbml7gzq5a5rriy708w68gx6yiw9cdg7xy2c5vsrrck7pbs5b")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t)) (home-page "https://github.com/bozbez/interception-sys") (synopsis "FFI bindings for Interception") (description "This package provides FFI bindings for Interception.") (license license:lgpl3))) (define-public rust-kanata-interception-0.2 (package (name "rust-kanata-interception") (version "0.2.0") (source (origin (method url-fetch) (uri (crate-uri "kanata-interception" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0kpl88nnjp6v4nb9zl5s3vy9k2bjyc2x06mjf5499iqyappqygg4")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-bitflags" ,rust-bitflags-1) ("rust-interception-sys" ,rust-interception-sys-0.1) ("rust-num-enum" ,rust-num-enum-0.6) ("rust-serde" ,rust-serde-1)))) (home-page "https://github.com/jtroo/kanata") (synopsis "Safe wrapper for Interception. Forked for use with kanata") (description "This package provides Safe wrapper for Interception. Forked for use with kanata.") (license (list license:expat license:asl2.0)))) (define-public rust-evdev-0.12 (package (name "rust-evdev") (version "0.12.2") (source (origin (method url-fetch) (uri (crate-uri "evdev" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "19qh6r1z4v8ja6qqigjbg9vckbhlycc6wkqgzfz9fcln7almaq5b")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-bitvec" ,rust-bitvec-1) ("rust-cfg-if" ,rust-cfg-if-1) ("rust-futures-core" ,rust-futures-core-0.3) ("rust-libc" ,rust-libc-0.2) ("rust-nix" ,rust-nix-0.23) ("rust-paste" ,rust-paste-1) ("rust-serde" ,rust-serde-1) ("rust-thiserror" ,rust-thiserror-1) ("rust-tokio" ,rust-tokio-1)))) (home-page "https://github.com/cmr/evdev") (synopsis "evdev interface for Linux") (description "This package provides evdev interface for Linux.") (license (list license:asl2.0 license:expat)))) (define-public rust-embed-resource-2 (package (name "rust-embed-resource") (version "2.5.1") (source (origin (method url-fetch) (uri (crate-uri "embed-resource" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0yb3kbw3xpghiwf69769jpng725kwa2cxm27qj5s7dm0cfgnz2xn")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-cc" ,rust-cc-1) ("rust-memchr" ,rust-memchr-2) ("rust-rustc-version" ,rust-rustc-version-0.4) ("rust-toml" ,rust-toml-0.8) ("rust-vswhom" ,rust-vswhom-0.1) ("rust-winreg" ,rust-winreg-0.52)))) (home-page "https://github.com/nabijaczleweli/rust-embed-resource") (synopsis "Cargo library to handle compilation and inclusion of Windows resources in the most resilient fashion imaginable") (description "This package provides a Cargo library to handle compilation and inclusion of Windows resources in the most resilient fashion imaginable.") (license license:expat))) (define-public kanata (package (name "kanata") (version "1.7.0-prerelease-1") (source (origin (method url-fetch) (uri (crate-uri "kanata" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1rxgvy8s4vpqna3pn9h8dji5rzn9vxk6lc7w3g0hipws7wxhg7vk")))) (build-system cargo-build-system) (arguments `(#:install-source? #f #:cargo-inputs (("rust-anyhow" ,rust-anyhow-1) ("rust-clap" ,rust-clap-4) ("rust-dirs" ,rust-dirs-5) ("rust-embed-resource" ,rust-embed-resource-2) ("rust-encode-unicode" ,rust-encode-unicode-0.3) ("rust-evdev" ,rust-evdev-0.12) ("rust-indoc" ,rust-indoc-2) ("rust-indoc" ,rust-indoc-2) ("rust-inotify" ,rust-inotify-0.10) ("rust-instant" ,rust-instant-0.1) ("rust-kanata-interception" ,rust-kanata-interception-0.2) ("rust-kanata-keyberon" ,rust-kanata-keyberon-0.171.1) ("rust-kanata-parser" ,rust-kanata-parser-0.171.1) ("rust-kanata-tcp-protocol" ,rust-kanata-tcp-protocol-0.171.1) ("rust-karabiner-driverkit" ,rust-karabiner-driverkit-0.1) ("rust-log" ,rust-log-0.4) ("rust-miette" ,rust-miette-5) ("rust-mio" ,rust-mio-0.8) ("rust-muldiv" ,rust-muldiv-1) ("rust-native-windows-gui" ,rust-native-windows-gui-1) ("rust-nix" ,rust-nix-0.26) ("rust-once-cell" ,rust-once-cell-1) ("rust-open" ,rust-open-5) ("rust-parking-lot" ,rust-parking-lot-0.12) ("rust-radix-trie" ,rust-radix-trie-0.2) ("rust-regex" ,rust-regex-1) ("rust-regex" ,rust-regex-1) ("rust-rustc-hash" ,rust-rustc-hash-1) ("rust-sd-notify" ,rust-sd-notify-0.4) ("rust-serde-json" ,rust-serde-json-1) ("rust-signal-hook" ,rust-signal-hook-0.3) ("rust-simplelog" ,rust-simplelog-0.12) ("rust-strip-ansi-escapes" ,rust-strip-ansi-escapes-0.2) ("rust-time" ,rust-time-0.3) ("rust-winapi" ,rust-winapi-0.3) ("rust-windows-sys" ,rust-windows-sys-0.52)) #:phases (modify-phases %standard-phases (add-after 'unpack 'remove-deps (lambda _ (use-modules (ice-9 regex) (ice-9 textual-ports)) (with-atomic-file-replacement "Cargo.toml" (lambda (in out) (regexp-substitute/global out (make-regexp "^.*dependencies\\.core-graphics.*\nversion.*" regexp/newline) (get-string-all in) 'pre "" 'post)))))))) (home-page "https://github.com/jtroo/kanata") (synopsis "Multi-layer keyboard customization") (description "This package provides Multi-layer keyboard customization.") (license license:lgpl3)))