summaryrefslogtreecommitdiff
path: root/vkraus/packages
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2022-10-22 21:59:23 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2022-10-23 07:55:33 +0200
commit3de36a62fc2496a3089dd8e368f7c37fa5b60530 (patch)
treed12b5d7edad9e8e949bf9f663adcc7d04489ab78 /vkraus/packages
parentd2d31e8fdbd9b52b102c78780debd030915c4b7c (diff)
Update package
Diffstat (limited to 'vkraus/packages')
-rw-r--r--vkraus/packages/disfluid.scm110
1 files changed, 96 insertions, 14 deletions
diff --git a/vkraus/packages/disfluid.scm b/vkraus/packages/disfluid.scm
index 0fddd5c..b1c1289 100644
--- a/vkraus/packages/disfluid.scm
+++ b/vkraus/packages/disfluid.scm
@@ -18,6 +18,14 @@
#:use-module
(guix git-download)
#:use-module
+ (guix monads)
+ #:use-module
+ (guix store)
+ #:use-module
+ (guix derivations)
+ #:use-module
+ (guix profiles)
+ #:use-module
(guix packages)
#:use-module
((guix licenses) #:prefix license:)
@@ -41,17 +49,17 @@
(define-public disfluid
(package
(name "disfluid")
- (version "0.0.4-90-g0a23b9d")
+ (version "0.0.4-91-gf20b5ee")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://labo.planete-kraus.eu/disfluid.git")
(commit
- "0a23b9db70ef260d2483d6885b3b5a17e8e49608")))
+ "f20b5ee87c76c179c998b794bfe2cd75b0aa2595")))
(sha256
(base32
- "1qncvwyxq2sindwg0g7kx9dmmfa3b5vn87fgj70jrzyqhcfa96sc"))))
+ "0v9h1q5z6ykh681hbcix6xmkq1n15ywk7jm9v6vdnyv2farkajy9"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -73,7 +81,7 @@
'bootstrap
'fix-hall.scm
(lambda _
- (let ((disfluid-version "0.0.4-90-g0a23b9d"))
+ (let ((disfluid-version "0.0.4-91-gf20b5ee"))
(substitute*
"hall.scm"
(("SNAPSHOT") disfluid-version)))))
@@ -188,7 +196,7 @@
(format
#f
"AC_INIT([disfluid], [~a], [vivien@planete-kraus.eu])\ndnl AC_INIT"
- "0.0.4-90-g0a23b9d")))))
+ "0.0.4-91-gf20b5ee")))))
(add-after
'bootstrap
'fix-po-makefile-shell
@@ -209,15 +217,15 @@
"DISTCHECK_CONFIGURE_FLAGS=SHELL=~a"
(search-input-file inputs "/bin/bash"))))
(copy-file
- "disfluid-0.0.4-90-g0a23b9d.tar.gz"
- "/tmp/disfluid-0.0.4-90-g0a23b9d.tar.gz")
+ "disfluid-0.0.4-91-gf20b5ee.tar.gz"
+ "/tmp/disfluid-0.0.4-91-gf20b5ee.tar.gz")
(with-directory-excursion
"/tmp"
(invoke
"tar"
"xf"
- "disfluid-0.0.4-90-g0a23b9d.tar.gz")
- (delete-file "disfluid-0.0.4-90-g0a23b9d.tar.gz")
+ "disfluid-0.0.4-91-gf20b5ee.tar.gz")
+ (delete-file "disfluid-0.0.4-91-gf20b5ee.tar.gz")
(invoke
"tar"
"--sort=name"
@@ -227,11 +235,11 @@
"--numeric-owner"
"--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"
"-cf"
- "disfluid-0.0.4-90-g0a23b9d.tar.gz"
- "disfluid-0.0.4-90-g0a23b9d"))
+ "disfluid-0.0.4-91-gf20b5ee.tar.gz"
+ "disfluid-0.0.4-91-gf20b5ee"))
(copy-file
- "/tmp/disfluid-0.0.4-90-g0a23b9d.tar.gz"
- "disfluid-0.0.4-90-g0a23b9d.tar.gz")))
+ "/tmp/disfluid-0.0.4-91-gf20b5ee.tar.gz"
+ "disfluid-0.0.4-91-gf20b5ee.tar.gz")))
(add-after
'build
'html
@@ -244,7 +252,7 @@
(let ((out (assoc-ref outputs "out")))
(mkdir-p (string-append out "/share/disfluid"))
(copy-file
- "disfluid-0.0.4-90-g0a23b9d.tar.gz"
+ "disfluid-0.0.4-91-gf20b5ee.tar.gz"
(string-append
out
"/share/disfluid/complete-corresponding-source.tar.gz")))))
@@ -293,4 +301,78 @@
(home-page "https://disfluid.planete-kraus.eu")
(license license:agpl3+)))
+(define-public (disfluid-commit-ostree repo)
+ (define disfluid-bin-pack
+ (mlet* %store-monad
+ ((profile
+ (profile-derivation
+ (packages->manifest (list disfluid))))
+ (tarball
+ (self-contained-tarball
+ "disfluid-pack"
+ profile
+ #:symlinks
+ '(("/var/bin" -> "bin")))))
+ (return tarball)))
+ (define disfluid-bin-drv
+ (run-with-store
+ (open-connection)
+ disfluid-bin-pack))
+ (define script
+ (program-file
+ "update-flatpakrepo"
+ (with-imported-modules
+ (source-module-closure '((guix build utils)))
+ (gexp (begin
+ (use-modules (guix build utils))
+ (let ((output (mkdtemp "/tmp/prepare-XXXXXX")))
+ (mkdir-p (string-append output "/files"))
+ (copy-file
+ (ungexp disfluid-bin-drv)
+ (string-append output "/disfluid-pack.tar.gz"))
+ (chmod (string-append output "/disfluid-pack.tar.gz")
+ 420)
+ (invoke
+ (ungexp (file-append gzip "/bin/gzip"))
+ "-d"
+ (string-append output "/disfluid-pack.tar.gz"))
+ (invoke
+ (ungexp (file-append tar "/bin/tar"))
+ "-C"
+ (string-append output "/files")
+ "-xf"
+ (string-append output "/disfluid-pack.tar"))
+ (call-with-output-file
+ (string-append output "/metadata")
+ (lambda (port)
+ (format
+ port
+ "[Application]\nname=eu.planete_kraus.Disfluid\nruntime=eu.planete_kraus.Disfluid\nsdk=eu.planete_kraus.Disfluid\ncommand=disfluid\n\n[Context]\nshared=network;ipc;\nsockets=x11;wayland;\nfilesystems=\n")))
+ (invoke
+ (ungexp (file-append libostree "/bin/ostree"))
+ "commit"
+ (format
+ #f
+ "--branch=deploy/app/eu.planete_kraus.Disfluid/x86_64/stable")
+ output
+ (format #f "--repo=~a" (ungexp repo)))
+ (invoke
+ (ungexp (file-append coreutils "/bin/chmod"))
+ "-R"
+ "u+w"
+ output)
+ (delete-file-recursively output)))))))
+ (invoke
+ (run-with-store
+ (open-connection)
+ (mlet %store-monad
+ ((update-flatpakrepo
+ (gexp->derivation
+ "invoke-update-flatpakrepo"
+ (gexp (symlink (ungexp script) (ungexp output))))))
+ (mbegin
+ %store-monad
+ (built-derivations (list update-flatpakrepo))
+ (return
+ (derivation->output-path update-flatpakrepo)))))))
disfluid