diff mbox series

[bug#43929] gnu: Add pijul.

Message ID 871rhe1cug.fsf@asu.edu
State New
Headers show
Series [bug#43929] gnu: Add pijul. | expand

Checks

Context Check Description
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

John Soo Oct. 31, 2020, 6:15 p.m. UTC
Hi everyone,

Julien Lepiller <julien@lepiller.eu> writes:

> Le 28 octobre 2020 11:42:07 GMT-04:00, zimoun
>>From my point of view, because of the “time-machine”, it is nice to
>>include any version – especially when it is already done. :-)
>
> Yeah I agree, you don't have to wait, since you already have
> everything available :)

I agree.

Attached the updated patches. I rebased them this morning.

However, during the rebase, I found some that do not build.

I marked these with [WIP]. I believe this to be something amiss with the
rust-openssl-sys@0.9 dependency.

Thanks!

- John

Comments

Efraim Flashner Nov. 22, 2020, 4:34 p.m. UTC | #1
I made it as far as rust-trust-dns-resolver-0.11, but then I had to stop
because there were a couple of cargo-inputs which weren't packaged.
John Soo Nov. 22, 2020, 4:45 p.m. UTC | #2
Efraim Flashner <efraim@flashner.co.il> writes:

> I made it as far as rust-trust-dns-resolver-0.11, but then I had to stop
> because there were a couple of cargo-inputs which weren't packaged.

I am so sorry! That was my mistake. The second patchset should apply and
build ok.
diff mbox series

Patch

From 5105b110d7bcbc7f922691982c798d301595fe3c Mon Sep 17 00:00:00 2001
From: John Soo <jsoo1@asu.edu>
Date: Wed, 17 Jun 2020 18:23:46 -0700
Subject: [PATCH 89/89] gnu: Add pijul.

* gnu/packages/rust-apps.scm (pijul): New variable.
---
 gnu/packages/rust-apps.scm | 114 +++++++++++++++++++++++++++++++++++++
 1 file changed, 114 insertions(+)

diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index fabb4e0380..2b5a426e1b 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -30,8 +30,11 @@ 
   #:use-module (gnu packages compression)
   #:use-module (gnu packages crates-io)
   #:use-module (gnu packages crates-graphics)
+  #:use-module (gnu packages crypto)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages jemalloc)
+  #:use-module (gnu packages llvm)
+  #:use-module (gnu packages nettle)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
@@ -235,6 +238,117 @@  for distinguishing different kinds of bytes such as NULL bytes, printable ASCII
 characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
     (license (list license:expat license:asl2.0))))
 
+(define-public pijul
+  (package
+    (name "pijul")
+    (version "0.12.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (crate-uri "pijul" version))
+       (file-name
+        (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "12aqpfd2si70qbvfnn9kvznxyd5g5gsb1kk1q52wm077cd03yapr"))))
+    (build-system cargo-build-system)
+    (inputs
+     `(("clang" ,clang)
+       ("libressl" ,libressl)
+       ("libsodium" ,libsodium)
+       ("nettle" ,nettle)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:cargo-inputs
+       (("rust-atty" ,rust-atty-0.2)
+        ("rust-base64" ,rust-base64-0.9)
+        ("rust-bincode" ,rust-bincode-1)
+        ("rust-bs58" ,rust-bs58-0.2)
+        ("rust-chrono" ,rust-chrono-0.4)
+        ("rust-clap" ,rust-clap-2)
+        ("rust-cryptovec" ,rust-cryptovec-0.4)
+        ("rust-dirs" ,rust-dirs-1.0)
+        ("rust-env-logger" ,rust-env-logger-0.6)
+        ("rust-failure" ,rust-failure-0.1)
+        ("rust-flate2" ,rust-flate2-1)
+        ("rust-futures" ,rust-futures-0.1)
+        ("rust-getch" ,rust-getch-0.2)
+        ("rust-hex" ,rust-hex-0.3)
+        ("rust-ignore" ,rust-ignore-0.4)
+        ("rust-libpijul" ,rust-libpijul-0.12)
+        ("rust-line" ,rust-line-0.1)
+        ("rust-log" ,rust-log-0.4)
+        ("rust-pathdiff" ,rust-pathdiff-0.1)
+        ("rust-progrs" ,rust-progrs-0.1)
+        ("rust-rand" ,rust-rand-0.6)
+        ("rust-regex" ,rust-regex-1)
+        ("rust-reqwest" ,rust-reqwest-0.9)
+        ("rust-rpassword" ,rust-rpassword-2.1.0)
+        ("rust-sequoia-openpgp" ,rust-sequoia-openpgp-0.9)
+        ("rust-serde" ,rust-serde-1)
+        ("rust-serde-derive" ,rust-serde-derive-1)
+        ("rust-shell-escape" ,rust-shell-escape-0.1)
+        ("rust-tar" ,rust-tar-0.4)
+        ("rust-tempfile" ,rust-tempfile-3)
+        ("rust-term" ,rust-term-0.5)
+        ("rust-thrussh" ,rust-thrussh-0.21)
+        ("rust-thrussh-config" ,rust-thrussh-config-0.2)
+        ("rust-thrussh-keys" ,rust-thrussh-keys-0.11)
+        ("rust-tokio" ,rust-tokio-0.1)
+        ("rust-tokio-uds" ,rust-tokio-uds-0.2)
+        ("rust-toml" ,rust-toml-0.4)
+        ("rust-username" ,rust-username-0.2))
+       #:cargo-development-inputs
+       (("rust-walkdir" ,rust-walkdir-2))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'set-clang-env
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv
+              "LIBCLANG_PATH"
+              (string-append (assoc-ref inputs "clang") "/lib"))
+             #t))
+         (add-after 'install 'install-completions
+           (lambda* (#:key outputs #:allow-other-keys)
+             (use-modules (ice-9 popen)
+                          (ice-9 textual-ports))
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (share (string-append out "/share"))
+                    (bash (string-append
+                           share "/bash-completion/completions"))
+                    (zsh (string-append
+                          share "/zsh/site-functions"))
+                    (fish (string-append
+                           share "/fish/vendor_completions.d")))
+               (for-each
+                (lambda (x)
+                  (let ((dir (cddr x))
+                        (file (cadr x))
+                        (shell (car x)))
+                    (mkdir-p dir)
+                    (call-with-output-file (string-append dir "/" file)
+                      (lambda (f)
+                        (let* ((cmd (string-append
+                                     bin "/pijul generate-completions --"
+                                     shell))
+                               (pipe (open-input-pipe cmd))
+                               (completion (get-string-all pipe)))
+                          (format f "~A" completion)
+                          (close-pipe pipe)))) ))
+                `(("bash" . ("pijul" . ,bash))
+                  ("zsh" . ("_pijul" . ,zsh))
+                  ("fish" . ("pijul.fish" . ,fish))))
+               #t))))))
+    (home-page "https://pijul.org/")
+    (synopsis
+     "Patch-based distributed version control system")
+    (description
+     "This package provides a patch-based distributed version control
+system, easy to use and fast.  Command-line interface.")
+    (license license:gpl2+)))
+
 (define-public ripgrep
   (package
     (name "ripgrep")
-- 
2.28.0