gnu: Add mito.
* gnu/packages/lisp-xyz.scm (cl-mito, sbcl-mito): New variables.
This commit is contained in:
parent
257cf3e7db
commit
f5e31b1d35
1 changed files with 112 additions and 0 deletions
|
@ -13602,3 +13602,115 @@ can separate configuration system from an implementation.")
|
||||||
|
|
||||||
(define-public ecl-envy
|
(define-public ecl-envy
|
||||||
(sbcl-package->ecl-package sbcl-envy))
|
(sbcl-package->ecl-package sbcl-envy))
|
||||||
|
|
||||||
|
(define sbcl-mito-core
|
||||||
|
(let ((commit "d3b9e375ef364a65692da2185085a08c969ac88a")
|
||||||
|
(revision "1"))
|
||||||
|
(package
|
||||||
|
(name "sbcl-mito-core")
|
||||||
|
(version (git-version "0.1" revision commit))
|
||||||
|
(home-page "https://github.com/fukamachi/mito")
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url home-page)
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "08mncgzjnbbsf1a6am3l73iw4lyfvz5ldjg5g84awfaxml4p73mb"))))
|
||||||
|
(build-system asdf-build-system/sbcl)
|
||||||
|
(inputs
|
||||||
|
`(("dbi" ,sbcl-dbi)
|
||||||
|
("sxql" ,sbcl-sxql)
|
||||||
|
("cl-ppcre" ,sbcl-cl-ppcre)
|
||||||
|
("closer-mop" ,sbcl-closer-mop)
|
||||||
|
("dissect" ,sbcl-dissect)
|
||||||
|
("optima" ,sbcl-optima)
|
||||||
|
("cl-reexport" ,sbcl-cl-reexport)
|
||||||
|
("local-time" ,sbcl-local-time)
|
||||||
|
("uuid" ,sbcl-uuid)
|
||||||
|
("alexandria" ,sbcl-alexandria)))
|
||||||
|
(synopsis "ORM for Common Lisp with migrations and relationships support")
|
||||||
|
(description "Mito is yet another object relational mapper, and it aims
|
||||||
|
to be a successor of Integral.
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
@item Support MySQL, PostgreSQL and SQLite3.
|
||||||
|
@item Add id (serial/uuid primary key), created_at and updated_at by default
|
||||||
|
like Ruby's ActiveRecord.
|
||||||
|
@item Migrations.
|
||||||
|
@item Database schema versioning.
|
||||||
|
@end itemize\n")
|
||||||
|
(license license:llgpl))))
|
||||||
|
|
||||||
|
(define sbcl-mito-migration
|
||||||
|
(package
|
||||||
|
(inherit sbcl-mito-core)
|
||||||
|
(name "sbcl-mito-migration")
|
||||||
|
(inputs
|
||||||
|
`(("mito-core" ,sbcl-mito-core)
|
||||||
|
("dbi" ,sbcl-dbi)
|
||||||
|
("sxql" ,sbcl-sxql)
|
||||||
|
("closer-mop" ,sbcl-closer-mop)
|
||||||
|
("cl-reexport" ,sbcl-cl-reexport)
|
||||||
|
("uuid" ,sbcl-uuid)
|
||||||
|
("alexandria" ,sbcl-alexandria)
|
||||||
|
("esrap" ,sbcl-esrap)))))
|
||||||
|
|
||||||
|
(define sbcl-lack-middleware-mito
|
||||||
|
(package
|
||||||
|
(inherit sbcl-mito-core)
|
||||||
|
(name "sbcl-lack-middleware-mito")
|
||||||
|
(inputs
|
||||||
|
`(("mito-core" ,sbcl-mito-core)
|
||||||
|
("dbi" ,sbcl-dbi)))
|
||||||
|
(arguments
|
||||||
|
'(#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'fix-build
|
||||||
|
(lambda _
|
||||||
|
(substitute* "lack-middleware-mito.asd"
|
||||||
|
(("cl-dbi") "dbi"))
|
||||||
|
#t)))))))
|
||||||
|
|
||||||
|
(define-public sbcl-mito
|
||||||
|
(package
|
||||||
|
(inherit sbcl-mito-core)
|
||||||
|
(name "sbcl-mito")
|
||||||
|
(inputs
|
||||||
|
`(("mito-core" ,sbcl-mito-core)
|
||||||
|
("mito-migration" ,sbcl-mito-migration)
|
||||||
|
("lack-middleware-mito" ,sbcl-lack-middleware-mito)
|
||||||
|
("cl-reexport" ,sbcl-cl-reexport)))
|
||||||
|
(native-inputs
|
||||||
|
`(("prove" ,sbcl-prove)
|
||||||
|
("prove-asdf" ,sbcl-prove-asdf)
|
||||||
|
("dbd-mysql" ,sbcl-dbd-mysql)
|
||||||
|
("dbd-postgres" ,sbcl-dbd-postgres)
|
||||||
|
("dbd-sqlite3" ,sbcl-dbd-sqlite3)))
|
||||||
|
(arguments
|
||||||
|
'(#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(add-after 'unpack 'remove-non-functional-tests
|
||||||
|
(lambda _
|
||||||
|
(substitute* "mito-test.asd"
|
||||||
|
;; (("\\(:test-file \"migration/mysql\"\\)") "")
|
||||||
|
(("\\(:test-file \"db/mysql\"\\)") "")
|
||||||
|
(("\\(:test-file \"db/postgres\"\\)") "")
|
||||||
|
(("\\(:test-file \"dao\"\\)") "")
|
||||||
|
;; TODO: migration/sqlite3 should work, re-enable once
|
||||||
|
;; upstream has fixed it:
|
||||||
|
;; https://github.com/fukamachi/mito/issues/70
|
||||||
|
(("\\(:test-file \"migration/sqlite3\"\\)") "")
|
||||||
|
(("\\(:test-file \"migration/mysql\"\\)") "")
|
||||||
|
(("\\(:test-file \"migration/postgres\"\\)") "")
|
||||||
|
(("\\(:test-file \"postgres-types\"\\)") "")
|
||||||
|
(("\\(:test-file \"mixin\"\\)") ""))
|
||||||
|
#t)))
|
||||||
|
;; TODO: While all enabled tests pass, the phase fails with:
|
||||||
|
;; Component MITO-ASD::MITO-TEST not found, required by #<SYSTEM "mito">
|
||||||
|
#:tests? #f))))
|
||||||
|
|
||||||
|
(define-public cl-mito
|
||||||
|
(sbcl-package->cl-source-package sbcl-mito))
|
||||||
|
|
Reference in a new issue