| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 |
|
| 22 | (define-module (gnu packages stenography)
|
| 23 | #:use-module (guix build-system pyproject)
|
| 24 | #:use-module (guix download)
|
| 25 | #:use-module (guix gexp)
|
| 26 | #:use-module (guix git-download)
|
| 27 | #:use-module ((guix licenses) #:prefix license:)
|
| 28 | #:use-module (guix packages)
|
| 29 | #:use-module (gnu packages)
|
| 30 | #:use-module (gnu packages bash)
|
| 31 | #:use-module (gnu packages check)
|
| 32 | #:use-module (gnu packages glib)
|
| 33 | #:use-module (gnu packages libusb)
|
| 34 | #:use-module (gnu packages linux)
|
| 35 | #:use-module (gnu packages python)
|
| 36 | #:use-module (gnu packages python-build)
|
| 37 | #:use-module (gnu packages python-check)
|
| 38 | #:use-module (gnu packages python-web)
|
| 39 | #:use-module (gnu packages python-xyz)
|
| 40 | #:use-module (gnu packages qt)
|
| 41 | #:use-module (gnu packages wxwidgets)
|
| 42 | #:use-module (gnu packages xorg))
|
| 43 |
|
| 44 | (define-public python-plover-stroke
|
| 45 | (package
|
| 46 | (name "python-plover-stroke")
|
| 47 | (version "1.1.0")
|
| 48 | (source
|
| 49 | (origin
|
| 50 | (method git-fetch)
|
| 51 | (uri (git-reference
|
| 52 | (url "https://github.com/benoit-pierre/plover_stroke")
|
| 53 | (commit version)))
|
| 54 | (file-name (git-file-name name version))
|
| 55 | (sha256
|
| 56 | (base32 "104ab1lr2xr8nbq98n7h3jvskfzzg8m41rhb1ik4b7w474rlxgh3"))))
|
| 57 | (build-system pyproject-build-system)
|
| 58 | (native-inputs (list python-pytest python-setuptools))
|
| 59 | (home-page "https://github.com/benoit-pierre/plover_stroke")
|
| 60 | (synopsis "Stroke handling helper library for Plover")
|
| 61 | (description
|
| 62 | "This package provides a helper class for working with steno strokes.")
|
| 63 | (license license:gpl2+)))
|
| 64 |
|
| 65 | (define-public plover
|
| 66 | (package
|
| 67 | (name "plover")
|
| 68 | (version "5.4.0")
|
| 69 | (source
|
| 70 | (origin
|
| 71 | (method git-fetch)
|
| 72 | (uri (git-reference
|
| 73 | (url "https://github.com/openstenoproject/plover")
|
| 74 | (commit (string-append "v" version))))
|
| 75 | (file-name (git-file-name name version))
|
| 76 | (sha256
|
| 77 | (base32 "0k7a7q6nq218kya7rx5i6cdry6v9aibz3yxfmavyg1vayp62x8d9"))))
|
| 78 | (build-system pyproject-build-system)
|
| 79 | (arguments
|
| 80 | (list
|
| 81 | #:test-flags
|
| 82 | #~(list "-p" "pytest-qt"
|
| 83 | "-p" "xvfb"
|
| 84 | |
| 85 | "--ignore" "test/gui_qt/test_dictionaries_widget.py"
|
| 86 | "test")
|
| 87 | #:phases
|
| 88 | #~(modify-phases %standard-phases
|
| 89 | |
| 90 | (add-after 'unpack 'set-paths
|
| 91 | (lambda* (#:key inputs #:allow-other-keys)
|
| 92 | (substitute* "plover_build_utils/setup.py"
|
| 93 | (("\"pyside6-(rcc|uic)\"" all prog)
|
| 94 | (simple-format #f "~s, \"-g\", \"python\""
|
| 95 | (search-input-file
|
| 96 | inputs (string-append "/lib/qt6/libexec/" prog)))))))
|
| 97 | |
| 98 | |
| 99 | (add-after 'build 'update-i18n-catalog-for-tests
|
| 100 | (lambda _
|
| 101 | (invoke "python" "setup.py" "extract_messages" "update_catalog")))
|
| 102 | |
| 103 | (add-after 'wrap 'wrap-executable
|
| 104 | (lambda* (#:key inputs #:allow-other-keys)
|
| 105 | (wrap-program (string-append #$output "/bin/plover")
|
| 106 | `("QT_PLUGIN_PATH" prefix
|
| 107 | (,(string-append #$(this-package-input "qtwayland")
|
| 108 | "/lib/qt6/plugins/")
|
| 109 | ,(string-append #$(this-package-input "qtsvg")
|
| 110 | "/lib/qt6/plugins/")
|
| 111 | ,(string-append #$(this-package-input "python-pyside-6")
|
| 112 | "/lib/qt6/plugins/")))
|
| 113 | `("LD_LIBRARY_PATH" prefix
|
| 114 | (,(string-append #$(this-package-input "dbus") "/lib"))))))
|
| 115 | (add-after 'install 'install-desktop
|
| 116 | (lambda _
|
| 117 | (install-file "plover/assets/plover.png"
|
| 118 | (string-append
|
| 119 | #$output "/share/icons/hicolor/128x128/apps"))
|
| 120 | (let ((desktop
|
| 121 | (string-append
|
| 122 | #$output "/share/applications/plover.desktop")))
|
| 123 | (install-file "linux/plover.desktop" (dirname desktop))
|
| 124 | (substitute* desktop
|
| 125 | (("Exec=plover")
|
| 126 | (string-append "Exec=" #$output "/bin/plover"))))))
|
| 127 | (add-after 'install 'install-udev-rules
|
| 128 | (lambda _
|
| 129 | (let* ((dir (string-append #$output "/lib/udev/rules.d"))
|
| 130 | (file (string-append dir "/99-plover-uinput.rules")))
|
| 131 | (mkdir-p dir)
|
| 132 | (call-with-output-file file
|
| 133 | (lambda (port)
|
| 134 | (display
|
| 135 | (string-append
|
| 136 | "KERNEL==\"uinput\", MODE=\"0660\", "
|
| 137 | "GROUP=\"input\", OPTIONS+=\"static_node=uinput\"\n")
|
| 138 | port)))))))))
|
| 139 | (native-inputs
|
| 140 | (list python-babel
|
| 141 | python-mock
|
| 142 | python-pytest
|
| 143 | python-pytest-qt
|
| 144 | python-pytest-xvfb
|
| 145 | python-setuptools))
|
| 146 | (inputs
|
| 147 | (list bash-minimal
|
| 148 | dbus
|
| 149 | qtbase
|
| 150 | qtsvg
|
| 151 | qtwayland
|
| 152 | xhost))
|
| 153 | (propagated-inputs
|
| 154 | (list python-appdirs
|
| 155 | python-comrak
|
| 156 | python-dbus
|
| 157 | python-evdev
|
| 158 | python-hidapi
|
| 159 | python-packaging
|
| 160 | python-pkginfo
|
| 161 | python-plover-stroke
|
| 162 | python-psutil
|
| 163 | python-pygments
|
| 164 | python-pyserial
|
| 165 | python-pyside-6
|
| 166 | python-readme-renderer
|
| 167 | python-requests-cache
|
| 168 | python-requests-futures
|
| 169 | python-rtf-tokenize
|
| 170 | python-wcwidth
|
| 171 | python-xkbcommon
|
| 172 | python-xlib))
|
| 173 | (home-page "https://www.openstenoproject.org/plover/")
|
| 174 | (synopsis "Stenography engine")
|
| 175 | (description
|
| 176 | "Plover (rhymes with @emph{lover}) is a desktop application that
|
| 177 | allows anyone to use stenography to write on their computer, up to
|
| 178 | speeds of 200WPM and beyond.")
|
| 179 | (license license:gpl2+)))
|