Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: helix-22.03
@ 2022-03-31  4:24 tranzystorek-io
  2022-03-31  4:27 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tranzystorek-io @ 2022-03-31  4:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]

There is a new pull request by tranzystorek-io against master on the void-packages repository

https://github.com/tranzystorek-io/void-packages helix
https://github.com/void-linux/void-packages/pull/36429

New package: helix-22.03
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/36429.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-helix-36429.patch --]
[-- Type: text/x-diff, Size: 6529 bytes --]

From d16fbb88c3279540db289ee5e11175cf87a4d66f Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 31 Mar 2022 06:11:14 +0200
Subject: [PATCH] New package: helix-22.03

---
 srcpkgs/helix/files/hx                        |   2 +
 ...g-the-format-ident-Rust-feature-1881.patch | 104 ++++++++++++++++++
 srcpkgs/helix/template                        |  25 +++++
 3 files changed, 131 insertions(+)
 create mode 100644 srcpkgs/helix/files/hx
 create mode 100644 srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
 create mode 100644 srcpkgs/helix/template

diff --git a/srcpkgs/helix/files/hx b/srcpkgs/helix/files/hx
new file mode 100644
index 000000000000..a43e49fadc5b
--- /dev/null
+++ b/srcpkgs/helix/files/hx
@@ -0,0 +1,2 @@
+#!/bin/sh
+HELIX_RUNTIME=/usr/lib/helix/runtime exec /usr/lib/helix/hx "$@"
diff --git a/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch b/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
new file mode 100644
index 000000000000..73eafa91cc1b
--- /dev/null
+++ b/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
@@ -0,0 +1,104 @@
+From f2dd3d446914ec0953cd7e056d430fc3b959e75d Mon Sep 17 00:00:00 2001
+From: Marcin Puc <tranzystorek.io@protonmail.com>
+Date: Wed, 30 Mar 2022 02:08:30 +0200
+Subject: [PATCH] Avoid using the format ident Rust feature (#1881)
+
+---
+ helix-loader/src/grammar.rs      | 14 +++++++++-----
+ helix-term/src/commands/typed.rs |  4 ++--
+ helix-term/src/health.rs         |  9 +++++----
+ 3 files changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/helix-loader/src/grammar.rs b/helix-loader/src/grammar.rs
+index 299a06bf..f0c5ea28 100644
+--- a/helix-loader/src/grammar.rs
++++ b/helix-loader/src/grammar.rs
+@@ -63,12 +63,12 @@ pub fn get_language(name: &str) -> Result<Language> {
+     library_path.set_extension(DYLIB_EXTENSION);
+ 
+     let library = unsafe { Library::new(&library_path) }
+-        .with_context(|| format!("Error opening dynamic library {library_path:?}"))?;
++        .with_context(|| format!("Error opening dynamic library {:?}", library_path))?;
+     let language_fn_name = format!("tree_sitter_{}", name.replace('-', "_"));
+     let language = unsafe {
+         let language_fn: Symbol<unsafe extern "C" fn() -> Language> = library
+             .get(language_fn_name.as_bytes())
+-            .with_context(|| format!("Failed to load symbol {language_fn_name}"))?;
++            .with_context(|| format!("Failed to load symbol {}", language_fn_name))?;
+         language_fn()
+     };
+     std::mem::forget(library);
+@@ -133,7 +133,7 @@ where
+     // TODO: print all failures instead of the first one found.
+     rx.iter()
+         .find(|result| result.is_err())
+-        .map(|err| err.with_context(|| format!("Failed to {action} some grammar(s)")))
++        .map(|err| err.with_context(|| format!("Failed to {} some grammar(s)", action)))
+         .unwrap_or(Ok(()))
+ }
+ 
+@@ -238,12 +238,16 @@ fn build_grammar(grammar: GrammarConfiguration) -> Result<()> {
+     };
+ 
+     let grammar_dir_entries = grammar_dir.read_dir().with_context(|| {
+-        format!("Failed to read directory {grammar_dir:?}. Did you use 'hx --grammar fetch'?")
++        format!(
++            "Failed to read directory {:?}. Did you use 'hx --grammar fetch'?",
++            grammar_dir
++        )
+     })?;
+ 
+     if grammar_dir_entries.count() == 0 {
+         return Err(anyhow!(
+-            "Directory {grammar_dir:?} is empty. Did you use 'hx --grammar fetch'?"
++            "Directory {:?} is empty. Did you use 'hx --grammar fetch'?",
++            grammar_dir
+         ));
+     };
+ 
+diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
+index 8b7f481b..c921f85b 100644
+--- a/helix-term/src/commands/typed.rs
++++ b/helix-term/src/commands/typed.rs
+@@ -891,8 +891,8 @@ fn setting(
+     }
+     let (key, arg) = (&args[0].to_lowercase(), &args[1]);
+ 
+-    let key_error = || anyhow::anyhow!("Unknown key `{key}`");
+-    let field_error = |_| anyhow::anyhow!("Could not parse field `{arg}`");
++    let key_error = || anyhow::anyhow!("Unknown key `{}`", key);
++    let field_error = |_| anyhow::anyhow!("Could not parse field `{}`", arg);
+ 
+     let mut config = serde_json::to_value(&cx.editor.config().clone()).unwrap();
+     let pointer = format!("/{}", key.replace('.', "/"));
+diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
+index f13d35f0..2a02e118 100644
+--- a/helix-term/src/health.rs
++++ b/helix-term/src/health.rs
+@@ -89,10 +89,11 @@ pub fn languages_all() {
+ 
+     let column = |item: &str, color: Color| {
+         let data = format!(
+-            "{:column_width$}",
++            "{:width$}",
+             item.get(..column_width - 2)
+-                .map(|s| format!("{s}…"))
+-                .unwrap_or_else(|| item.to_string())
++                .map(|s| format!("{}…", s))
++                .unwrap_or_else(|| item.to_string()),
++            width = column_width,
+         )
+         .stylize()
+         .with(color);
+@@ -158,7 +159,7 @@ pub fn language(lang_str: String) {
+     {
+         Some(l) => l,
+         None => {
+-            let msg = format!("Language '{lang_str}' not found");
++            let msg = format!("Language '{}' not found", lang_str);
+             println!("{}", msg.red());
+             let suggestions: Vec<&str> = syn_loader_conf
+                 .language
+-- 
+2.35.1
+
diff --git a/srcpkgs/helix/template b/srcpkgs/helix/template
new file mode 100644
index 000000000000..140ef64d0e26
--- /dev/null
+++ b/srcpkgs/helix/template
@@ -0,0 +1,25 @@
+# Template file for 'helix'
+pkgname=helix
+version=22.03
+revision=1
+build_style=cargo
+make_install_args="--path helix-term"
+hostmakedepends="git"
+short_desc="Post-modern modal text editor"
+maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
+license="MPL-2.0"
+homepage="https://helix-editor.com/"
+changelog="https://github.com/helix-editor/helix/blob/master/CHANGELOG.md"
+distfiles="https://github.com/helix-editor/helix/archive/${version}.tar.gz"
+checksum=a21f4d7b6390930a89b59567909ad7c613a1eeeafc813167ff7bc3be603997f4
+
+post_install() {
+	rm runtime/grammars/.gitkeep
+	rm runtime/themes/README.md
+	rm -rf runtime/grammars/sources
+
+	vmkdir usr/lib/helix
+	mv ${DESTDIR}/usr/bin/hx ${DESTDIR}/usr/lib/helix/
+	vcopy runtime usr/lib/helix
+	vbin ${FILESDIR}/hx
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
@ 2022-03-31  4:27 ` tranzystorek-io
  2022-03-31 11:29 ` tranzystorek-io
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tranzystorek-io @ 2022-03-31  4:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

There is an updated pull request by tranzystorek-io against master on the void-packages repository

https://github.com/tranzystorek-io/void-packages helix
https://github.com/void-linux/void-packages/pull/36429

New package: helix-22.03
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/36429.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-helix-36429.patch --]
[-- Type: text/x-diff, Size: 6549 bytes --]

From 56e8293dd5fd95986af68b42da90b7b058ec044c Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 31 Mar 2022 06:11:14 +0200
Subject: [PATCH] New package: helix-22.03

---
 srcpkgs/helix/files/hx                        |   2 +
 ...g-the-format-ident-Rust-feature-1881.patch | 104 ++++++++++++++++++
 srcpkgs/helix/template                        |  26 +++++
 3 files changed, 132 insertions(+)
 create mode 100644 srcpkgs/helix/files/hx
 create mode 100644 srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
 create mode 100644 srcpkgs/helix/template

diff --git a/srcpkgs/helix/files/hx b/srcpkgs/helix/files/hx
new file mode 100644
index 000000000000..a43e49fadc5b
--- /dev/null
+++ b/srcpkgs/helix/files/hx
@@ -0,0 +1,2 @@
+#!/bin/sh
+HELIX_RUNTIME=/usr/lib/helix/runtime exec /usr/lib/helix/hx "$@"
diff --git a/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch b/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
new file mode 100644
index 000000000000..73eafa91cc1b
--- /dev/null
+++ b/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
@@ -0,0 +1,104 @@
+From f2dd3d446914ec0953cd7e056d430fc3b959e75d Mon Sep 17 00:00:00 2001
+From: Marcin Puc <tranzystorek.io@protonmail.com>
+Date: Wed, 30 Mar 2022 02:08:30 +0200
+Subject: [PATCH] Avoid using the format ident Rust feature (#1881)
+
+---
+ helix-loader/src/grammar.rs      | 14 +++++++++-----
+ helix-term/src/commands/typed.rs |  4 ++--
+ helix-term/src/health.rs         |  9 +++++----
+ 3 files changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/helix-loader/src/grammar.rs b/helix-loader/src/grammar.rs
+index 299a06bf..f0c5ea28 100644
+--- a/helix-loader/src/grammar.rs
++++ b/helix-loader/src/grammar.rs
+@@ -63,12 +63,12 @@ pub fn get_language(name: &str) -> Result<Language> {
+     library_path.set_extension(DYLIB_EXTENSION);
+ 
+     let library = unsafe { Library::new(&library_path) }
+-        .with_context(|| format!("Error opening dynamic library {library_path:?}"))?;
++        .with_context(|| format!("Error opening dynamic library {:?}", library_path))?;
+     let language_fn_name = format!("tree_sitter_{}", name.replace('-', "_"));
+     let language = unsafe {
+         let language_fn: Symbol<unsafe extern "C" fn() -> Language> = library
+             .get(language_fn_name.as_bytes())
+-            .with_context(|| format!("Failed to load symbol {language_fn_name}"))?;
++            .with_context(|| format!("Failed to load symbol {}", language_fn_name))?;
+         language_fn()
+     };
+     std::mem::forget(library);
+@@ -133,7 +133,7 @@ where
+     // TODO: print all failures instead of the first one found.
+     rx.iter()
+         .find(|result| result.is_err())
+-        .map(|err| err.with_context(|| format!("Failed to {action} some grammar(s)")))
++        .map(|err| err.with_context(|| format!("Failed to {} some grammar(s)", action)))
+         .unwrap_or(Ok(()))
+ }
+ 
+@@ -238,12 +238,16 @@ fn build_grammar(grammar: GrammarConfiguration) -> Result<()> {
+     };
+ 
+     let grammar_dir_entries = grammar_dir.read_dir().with_context(|| {
+-        format!("Failed to read directory {grammar_dir:?}. Did you use 'hx --grammar fetch'?")
++        format!(
++            "Failed to read directory {:?}. Did you use 'hx --grammar fetch'?",
++            grammar_dir
++        )
+     })?;
+ 
+     if grammar_dir_entries.count() == 0 {
+         return Err(anyhow!(
+-            "Directory {grammar_dir:?} is empty. Did you use 'hx --grammar fetch'?"
++            "Directory {:?} is empty. Did you use 'hx --grammar fetch'?",
++            grammar_dir
+         ));
+     };
+ 
+diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
+index 8b7f481b..c921f85b 100644
+--- a/helix-term/src/commands/typed.rs
++++ b/helix-term/src/commands/typed.rs
+@@ -891,8 +891,8 @@ fn setting(
+     }
+     let (key, arg) = (&args[0].to_lowercase(), &args[1]);
+ 
+-    let key_error = || anyhow::anyhow!("Unknown key `{key}`");
+-    let field_error = |_| anyhow::anyhow!("Could not parse field `{arg}`");
++    let key_error = || anyhow::anyhow!("Unknown key `{}`", key);
++    let field_error = |_| anyhow::anyhow!("Could not parse field `{}`", arg);
+ 
+     let mut config = serde_json::to_value(&cx.editor.config().clone()).unwrap();
+     let pointer = format!("/{}", key.replace('.', "/"));
+diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
+index f13d35f0..2a02e118 100644
+--- a/helix-term/src/health.rs
++++ b/helix-term/src/health.rs
+@@ -89,10 +89,11 @@ pub fn languages_all() {
+ 
+     let column = |item: &str, color: Color| {
+         let data = format!(
+-            "{:column_width$}",
++            "{:width$}",
+             item.get(..column_width - 2)
+-                .map(|s| format!("{s}…"))
+-                .unwrap_or_else(|| item.to_string())
++                .map(|s| format!("{}…", s))
++                .unwrap_or_else(|| item.to_string()),
++            width = column_width,
+         )
+         .stylize()
+         .with(color);
+@@ -158,7 +159,7 @@ pub fn language(lang_str: String) {
+     {
+         Some(l) => l,
+         None => {
+-            let msg = format!("Language '{lang_str}' not found");
++            let msg = format!("Language '{}' not found", lang_str);
+             println!("{}", msg.red());
+             let suggestions: Vec<&str> = syn_loader_conf
+                 .language
+-- 
+2.35.1
+
diff --git a/srcpkgs/helix/template b/srcpkgs/helix/template
new file mode 100644
index 000000000000..e5cab3c09aa0
--- /dev/null
+++ b/srcpkgs/helix/template
@@ -0,0 +1,26 @@
+# Template file for 'helix'
+pkgname=helix
+version=22.03
+revision=1
+build_style=cargo
+make_install_args="--path helix-term"
+hostmakedepends="git"
+short_desc="Post-modern modal text editor"
+maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
+license="MPL-2.0"
+homepage="https://helix-editor.com/"
+changelog="https://github.com/helix-editor/helix/blob/master/CHANGELOG.md"
+distfiles="https://github.com/helix-editor/helix/archive/${version}.tar.gz"
+checksum=a21f4d7b6390930a89b59567909ad7c613a1eeeafc813167ff7bc3be603997f4
+conflicts="hex>=0"
+
+post_install() {
+	rm runtime/grammars/.gitkeep
+	rm runtime/themes/README.md
+	rm -rf runtime/grammars/sources
+
+	vmkdir usr/lib/helix
+	mv ${DESTDIR}/usr/bin/hx ${DESTDIR}/usr/lib/helix/
+	vcopy runtime usr/lib/helix
+	vbin ${FILESDIR}/hx
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
  2022-03-31  4:27 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-03-31 11:29 ` tranzystorek-io
  2022-03-31 11:31 ` shizonic
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tranzystorek-io @ 2022-03-31 11:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 187 bytes --]

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/36429#issuecomment-1084454707

Comment:
Credit for previous work by @shizonic

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
  2022-03-31  4:27 ` [PR PATCH] [Updated] " tranzystorek-io
  2022-03-31 11:29 ` tranzystorek-io
@ 2022-03-31 11:31 ` shizonic
  2022-03-31 14:51 ` leahneukirchen
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: shizonic @ 2022-03-31 11:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

New comment by shizonic on void-packages repository

https://github.com/void-linux/void-packages/pull/36429#issuecomment-1084459242

Comment:
> Credit for previous work by @shizonic

Nice work! Thank you for your work and your credits. 🙂

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
                   ` (2 preceding siblings ...)
  2022-03-31 11:31 ` shizonic
@ 2022-03-31 14:51 ` leahneukirchen
  2022-03-31 15:08 ` tranzystorek-io
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2022-03-31 14:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/36429#issuecomment-1084694492

Comment:
Any idea how to fix i686? Else mark broken for this arch.

Else, LGTM.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
                   ` (3 preceding siblings ...)
  2022-03-31 14:51 ` leahneukirchen
@ 2022-03-31 15:08 ` tranzystorek-io
  2022-03-31 15:09 ` tranzystorek-io
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tranzystorek-io @ 2022-03-31 15:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/36429#issuecomment-1084724385

Comment:
> Any idea how to fix i686?

The closest lead I've found is https://bugzilla.redhat.com/show_bug.cgi?id=2020861. On the other hand, Those failing things are doctests built for small usage examples for internal code, I'm guessing we could just disable them and still package i686?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
                   ` (4 preceding siblings ...)
  2022-03-31 15:08 ` tranzystorek-io
@ 2022-03-31 15:09 ` tranzystorek-io
  2022-03-31 18:28 ` [PR PATCH] [Updated] " tranzystorek-io
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tranzystorek-io @ 2022-03-31 15:09 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/36429#issuecomment-1084724385

Comment:
> Any idea how to fix i686?

The closest lead I've found is https://bugzilla.redhat.com/show_bug.cgi?id=2020861. On the other hand, those failing things are doctests built for small usage examples for internal code, I'm guessing we could just disable them and still package i686?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
                   ` (5 preceding siblings ...)
  2022-03-31 15:09 ` tranzystorek-io
@ 2022-03-31 18:28 ` tranzystorek-io
  2022-03-31 18:55 ` tranzystorek-io
  2022-03-31 19:01 ` [PR PATCH] [Merged]: " leahneukirchen
  8 siblings, 0 replies; 10+ messages in thread
From: tranzystorek-io @ 2022-03-31 18:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

There is an updated pull request by tranzystorek-io against master on the void-packages repository

https://github.com/tranzystorek-io/void-packages helix
https://github.com/void-linux/void-packages/pull/36429

New package: helix-22.03
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/36429.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-helix-36429.patch --]
[-- Type: text/x-diff, Size: 6679 bytes --]

From 4e08b6bb60ca03d35908632fc1f1ff4ad8f77b05 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Thu, 31 Mar 2022 06:11:14 +0200
Subject: [PATCH] New package: helix-22.03

---
 srcpkgs/helix/files/hx                        |   2 +
 ...g-the-format-ident-Rust-feature-1881.patch | 104 ++++++++++++++++++
 srcpkgs/helix/template                        |  32 ++++++
 3 files changed, 138 insertions(+)
 create mode 100644 srcpkgs/helix/files/hx
 create mode 100644 srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
 create mode 100644 srcpkgs/helix/template

diff --git a/srcpkgs/helix/files/hx b/srcpkgs/helix/files/hx
new file mode 100644
index 000000000000..a43e49fadc5b
--- /dev/null
+++ b/srcpkgs/helix/files/hx
@@ -0,0 +1,2 @@
+#!/bin/sh
+HELIX_RUNTIME=/usr/lib/helix/runtime exec /usr/lib/helix/hx "$@"
diff --git a/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch b/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
new file mode 100644
index 000000000000..73eafa91cc1b
--- /dev/null
+++ b/srcpkgs/helix/patches/0001-Avoid-using-the-format-ident-Rust-feature-1881.patch
@@ -0,0 +1,104 @@
+From f2dd3d446914ec0953cd7e056d430fc3b959e75d Mon Sep 17 00:00:00 2001
+From: Marcin Puc <tranzystorek.io@protonmail.com>
+Date: Wed, 30 Mar 2022 02:08:30 +0200
+Subject: [PATCH] Avoid using the format ident Rust feature (#1881)
+
+---
+ helix-loader/src/grammar.rs      | 14 +++++++++-----
+ helix-term/src/commands/typed.rs |  4 ++--
+ helix-term/src/health.rs         |  9 +++++----
+ 3 files changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/helix-loader/src/grammar.rs b/helix-loader/src/grammar.rs
+index 299a06bf..f0c5ea28 100644
+--- a/helix-loader/src/grammar.rs
++++ b/helix-loader/src/grammar.rs
+@@ -63,12 +63,12 @@ pub fn get_language(name: &str) -> Result<Language> {
+     library_path.set_extension(DYLIB_EXTENSION);
+ 
+     let library = unsafe { Library::new(&library_path) }
+-        .with_context(|| format!("Error opening dynamic library {library_path:?}"))?;
++        .with_context(|| format!("Error opening dynamic library {:?}", library_path))?;
+     let language_fn_name = format!("tree_sitter_{}", name.replace('-', "_"));
+     let language = unsafe {
+         let language_fn: Symbol<unsafe extern "C" fn() -> Language> = library
+             .get(language_fn_name.as_bytes())
+-            .with_context(|| format!("Failed to load symbol {language_fn_name}"))?;
++            .with_context(|| format!("Failed to load symbol {}", language_fn_name))?;
+         language_fn()
+     };
+     std::mem::forget(library);
+@@ -133,7 +133,7 @@ where
+     // TODO: print all failures instead of the first one found.
+     rx.iter()
+         .find(|result| result.is_err())
+-        .map(|err| err.with_context(|| format!("Failed to {action} some grammar(s)")))
++        .map(|err| err.with_context(|| format!("Failed to {} some grammar(s)", action)))
+         .unwrap_or(Ok(()))
+ }
+ 
+@@ -238,12 +238,16 @@ fn build_grammar(grammar: GrammarConfiguration) -> Result<()> {
+     };
+ 
+     let grammar_dir_entries = grammar_dir.read_dir().with_context(|| {
+-        format!("Failed to read directory {grammar_dir:?}. Did you use 'hx --grammar fetch'?")
++        format!(
++            "Failed to read directory {:?}. Did you use 'hx --grammar fetch'?",
++            grammar_dir
++        )
+     })?;
+ 
+     if grammar_dir_entries.count() == 0 {
+         return Err(anyhow!(
+-            "Directory {grammar_dir:?} is empty. Did you use 'hx --grammar fetch'?"
++            "Directory {:?} is empty. Did you use 'hx --grammar fetch'?",
++            grammar_dir
+         ));
+     };
+ 
+diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
+index 8b7f481b..c921f85b 100644
+--- a/helix-term/src/commands/typed.rs
++++ b/helix-term/src/commands/typed.rs
+@@ -891,8 +891,8 @@ fn setting(
+     }
+     let (key, arg) = (&args[0].to_lowercase(), &args[1]);
+ 
+-    let key_error = || anyhow::anyhow!("Unknown key `{key}`");
+-    let field_error = |_| anyhow::anyhow!("Could not parse field `{arg}`");
++    let key_error = || anyhow::anyhow!("Unknown key `{}`", key);
++    let field_error = |_| anyhow::anyhow!("Could not parse field `{}`", arg);
+ 
+     let mut config = serde_json::to_value(&cx.editor.config().clone()).unwrap();
+     let pointer = format!("/{}", key.replace('.', "/"));
+diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
+index f13d35f0..2a02e118 100644
+--- a/helix-term/src/health.rs
++++ b/helix-term/src/health.rs
+@@ -89,10 +89,11 @@ pub fn languages_all() {
+ 
+     let column = |item: &str, color: Color| {
+         let data = format!(
+-            "{:column_width$}",
++            "{:width$}",
+             item.get(..column_width - 2)
+-                .map(|s| format!("{s}…"))
+-                .unwrap_or_else(|| item.to_string())
++                .map(|s| format!("{}…", s))
++                .unwrap_or_else(|| item.to_string()),
++            width = column_width,
+         )
+         .stylize()
+         .with(color);
+@@ -158,7 +159,7 @@ pub fn language(lang_str: String) {
+     {
+         Some(l) => l,
+         None => {
+-            let msg = format!("Language '{lang_str}' not found");
++            let msg = format!("Language '{}' not found", lang_str);
+             println!("{}", msg.red());
+             let suggestions: Vec<&str> = syn_loader_conf
+                 .language
+-- 
+2.35.1
+
diff --git a/srcpkgs/helix/template b/srcpkgs/helix/template
new file mode 100644
index 000000000000..961a894092b7
--- /dev/null
+++ b/srcpkgs/helix/template
@@ -0,0 +1,32 @@
+# Template file for 'helix'
+pkgname=helix
+version=22.03
+revision=1
+build_style=cargo
+make_install_args="--path helix-term"
+hostmakedepends="git"
+short_desc="Post-modern modal text editor"
+maintainer="Marcin Puc <tranzystorek.io@protonmail.com>"
+license="MPL-2.0"
+homepage="https://helix-editor.com/"
+changelog="https://github.com/helix-editor/helix/blob/master/CHANGELOG.md"
+distfiles="https://github.com/helix-editor/helix/archive/${version}.tar.gz"
+checksum=a21f4d7b6390930a89b59567909ad7c613a1eeeafc813167ff7bc3be603997f4
+conflicts="hex>=0"
+
+# skip problematic doctests on i686
+case "$XBPS_TARGET_MACHINE" in
+	i686*) make_check_args="-- --skip src/";;
+	*) ;;
+esac
+
+post_install() {
+	rm runtime/grammars/.gitkeep
+	rm runtime/themes/README.md
+	rm -rf runtime/grammars/sources
+
+	vmkdir usr/lib/helix
+	mv ${DESTDIR}/usr/bin/hx ${DESTDIR}/usr/lib/helix/
+	vcopy runtime usr/lib/helix
+	vbin ${FILESDIR}/hx
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
                   ` (6 preceding siblings ...)
  2022-03-31 18:28 ` [PR PATCH] [Updated] " tranzystorek-io
@ 2022-03-31 18:55 ` tranzystorek-io
  2022-03-31 19:01 ` [PR PATCH] [Merged]: " leahneukirchen
  8 siblings, 0 replies; 10+ messages in thread
From: tranzystorek-io @ 2022-03-31 18:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/36429#issuecomment-1084986704

Comment:
> we could just disable them and still package i686?

@leahneukirchen I went ahead and did just that, seems successful 😄 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Merged]: New package: helix-22.03
  2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
                   ` (7 preceding siblings ...)
  2022-03-31 18:55 ` tranzystorek-io
@ 2022-03-31 19:01 ` leahneukirchen
  8 siblings, 0 replies; 10+ messages in thread
From: leahneukirchen @ 2022-03-31 19:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]

There's a merged pull request on the void-packages repository

New package: helix-22.03
https://github.com/void-linux/void-packages/pull/36429

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!-- 
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-31 19:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31  4:24 [PR PATCH] New package: helix-22.03 tranzystorek-io
2022-03-31  4:27 ` [PR PATCH] [Updated] " tranzystorek-io
2022-03-31 11:29 ` tranzystorek-io
2022-03-31 11:31 ` shizonic
2022-03-31 14:51 ` leahneukirchen
2022-03-31 15:08 ` tranzystorek-io
2022-03-31 15:09 ` tranzystorek-io
2022-03-31 18:28 ` [PR PATCH] [Updated] " tranzystorek-io
2022-03-31 18:55 ` tranzystorek-io
2022-03-31 19:01 ` [PR PATCH] [Merged]: " leahneukirchen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).