wip updates

This commit is contained in:
Efraim Flashner 2020-09-06 15:28:07 +03:00
parent 2c56e7e618
commit 4a9b3c06a6
Signed by: efraim
GPG key ID: 41AAE7DCCA3D8351
2 changed files with 229 additions and 2 deletions

View file

@ -24,6 +24,7 @@
#:use-module (guix build-system python)
#:use-module (gnu packages audio)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages freedesktop)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-web)
@ -31,6 +32,7 @@
#:use-module (gnu packages speech)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages time)
#:use-module (gnu packages version-control)
#:use-module (gnu packages xiph))
(define-public mycroft-core
@ -69,8 +71,8 @@
("python-fasteners" ,python-fasteners)
("python-PyYAML" ,python-pyyaml)
;("python-lingua-franca" ,python-lingua-franca)
;("python-msm" ,python-msm)
("python-lingua-franca" ,python-lingua-franca)
("python-msm" ,python-msm)
;("python-msk" ,python-msk)
;("python-adapt-parser" ,python-adapt-parser)
;("python-padatious" ,python-padatious)
@ -323,3 +325,118 @@ http library.")
(description
"Wrapper to use Mycroft Precise Wake Word Listener")
(license license:asl2.0)))
(define-public python-lingua-franca
(package
(name "python-lingua-franca")
(version "0.2.2")
(source
(origin
;; Some files are missing from PyPi.
(method git-fetch)
(uri (git-reference
(url "https://github.com/MycroftAI/lingua-franca")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"08fw9kz8760qpzm8bnbpal7kpkxk9dfjzcg3bdmk0pisymjg7ysx"))))
(build-system python-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-dependency-versions
(lambda _
(substitute* "requirements.txt"
(("==.*") "\n"))
#t)))))
(propagated-inputs
`(("python-dateutil" ,python-dateutil)))
(home-page "https://github.com/MycroftAI/lingua-franca")
(synopsis "Multilingual text parsing and formatting library")
(description
"Mycroft's multilingual text parsing and formatting library.")
(license license:asl2.0)))
(define-public python-msm
(package
(name "python-msm")
(version "0.8.8")
(source
(origin
;; Tests not included in release tarball.
(method git-fetch)
(uri (git-reference
(url "https://github.com/MycroftAI/mycroft-skills-manager")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0y2c8dyl3d59p1v49sr31wgrvjx0sxsqvsyhm2k55amkh7pxalnw"))))
(build-system python-build-system)
(arguments
'(#:tests? #f ; Tests try to access the internet.
#:phases
(modify-phases %standard-phases
(replace 'check
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
(if tests?
(invoke "pytest" "tests")
#t))))))
(propagated-inputs
`(("python-fasteners" ,python-fasteners)
("python-gitpython" ,python-gitpython)
("python-lazy" ,python-lazy)
("python-pako" ,python-pako)
("python-pyyaml" ,python-pyyaml)
("python-requests" ,python-requests)))
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://github.com/MycroftAI/mycroft-skills-manager")
(synopsis "Mycroft Skills Manager")
(description "Mycroft Skills Manager is a command line tool and a Python
module for interacting with the mycroft-skills repository. It allows querying
the repository for information (skill listings, skill meta data, etc) and of
course installing and removing skills from the system.")
(license license:asl2.0)))
(define-public python-lazy
(package
(name "python-lazy")
(version "1.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "lazy" version ".zip"))
(sha256
(base32
"0hsvbzv92qv0qsq03idwxhvwpb83fjj521ij6mabh3qkmfjjfv9c"))))
(build-system python-build-system)
(native-inputs `(("unzip" ,unzip)))
(home-page "https://github.com/stefanholek/lazy")
(synopsis "Lazy attributes for Python objects")
(description
"Lazy attributes for Python objects")
(license license:bsd-2)))
(define-public python-pako
(package
(name "python-pako")
(version "0.2.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pako" version))
(sha256
(base32
"0y4pllaii6lc3859s7789iv9wgbsqk0khx7kfhlz19m2qpc5zrbb"))))
(build-system python-build-system)
(propagated-inputs
`(("python-appdirs" ,python-appdirs)))
(home-page "https://github.com/MycroftAI/pako")
(synopsis
"The universal package manager library")
(description
"The universal package manager library")
(license license:asl2.0)))

110
wip/pbuilder.scm Normal file
View file

@ -0,0 +1,110 @@
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is an addendum to 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 <http://www.gnu.org/licenses/>.
(define-module (wip pbuilder)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module (dfsg main dpkg)
#:use-module (gnu packages base)
#:use-module (gnu packages gettext)
#:use-module (gnu packages linux)
#:use-module (gnu packages man)
#:use-module (gnu packages perl)
#:use-module (gnu packages xml)
)
;; TODO: Wrap bins with Debian's devscripts
(define-public pbuilder
(package
(name "pbuilder")
(version "0.230.4")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://salsa.debian.org/pbuilder-team/pbuilder.git/")
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32
"10hhjd1pk3gysafblvyyla08l82j483lddwz64phkvkgm91xq24l"))))
(build-system gnu-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(delete 'configure) ; no configure script
(add-after 'unpack 'patch-source
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(substitute* '("Makefile"
"pbuildd/Makefile")
(("/usr") "")
;; Skip documentation for now
((".*-C Documentation.*") "")
)
(substitute* '(
"debuild-pbuilder"
"pbuilder"
"pbuilder-checkparams"
"pbuilder-loadconfig"
"pdebuild"
)
(("/usr/lib/pbuilder") (string-append out "/lib/pbuilder"))
)
(substitute* "pbuildd/buildd-config.sh"
(("/usr/share/doc/pbuilder") (string-append out "/share/doc/pbuilder"))
)
#t)))
(add-after 'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(for-each
(lambda (file)
(wrap-program file
`("PATH" ":" prefix (,(dirname (which "sed"))
,(dirname (which "readlink"))
,(dirname (which "dpkg-architecture"))
))))
(cons* (string-append out "/bin/pdebuild")
(string-append out "/sbin/pbuilder")
(find-files (string-append out "/lib/pbuilder") ".")))
#t)))
)
#:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
#:tests? #f
))
(inputs
`(
))
(native-inputs
`(
("dpkg" ,dpkg)
("grep" ,grep)
("libxslt" ,libxslt)
("man-db" ,man-db)
("perl" ,perl)
("po4a" ,po4a)
("util-linux" ,util-linux)
))
(home-page "https://pbuilder-team.pages.debian.net/pbuilder/")
(synopsis "Personal package builder for Debian packages")
(description
"@code{pbuilder} is a personal package builder for Debian packages.")
(license license:gpl2+)))