Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: helix-bin-22.03
@ 2022-03-30  9:23 shizonic
  2022-03-30  9:30 ` tranzystorek-io
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: shizonic @ 2022-03-30  9:23 UTC (permalink / raw)
  To: ml

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

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

https://github.com/shizonic/void-packages helix-bin
https://github.com/void-linux/void-packages/pull/36414

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

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

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

<!-- 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/36414.patch is attached

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

From fb1eba99b45819cd014bfb0f04bffe533ba0bdd0 Mon Sep 17 00:00:00 2001
From: Toby Merz <realtiaz@gmail.com>
Date: Tue, 15 Jun 2021 11:44:45 +0200
Subject: [PATCH] New package: helix-bin-22.03

---
 srcpkgs/helix-bin/files/hx                    |   2 +
 ...3d446914ec0953cd7e056d430fc3b959e75d.patch | 101 ++++++++++++++++++
 srcpkgs/helix-bin/template                    |  20 ++++
 3 files changed, 123 insertions(+)
 create mode 100755 srcpkgs/helix-bin/files/hx
 create mode 100644 srcpkgs/helix-bin/patches/f2dd3d446914ec0953cd7e056d430fc3b959e75d.patch
 create mode 100644 srcpkgs/helix-bin/template

diff --git a/srcpkgs/helix-bin/files/hx b/srcpkgs/helix-bin/files/hx
new file mode 100755
index 000000000000..845ed5293826
--- /dev/null
+++ b/srcpkgs/helix-bin/files/hx
@@ -0,0 +1,2 @@
+#!/usr/bin/sh
+HELIX_RUNTIME=/usr/lib/helix/runtime exec /usr/lib/helix/hx $@
diff --git a/srcpkgs/helix-bin/patches/f2dd3d446914ec0953cd7e056d430fc3b959e75d.patch b/srcpkgs/helix-bin/patches/f2dd3d446914ec0953cd7e056d430fc3b959e75d.patch
new file mode 100644
index 000000000000..5e77fb9b304c
--- /dev/null
+++ b/srcpkgs/helix-bin/patches/f2dd3d446914ec0953cd7e056d430fc3b959e75d.patch
@@ -0,0 +1,101 @@
+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 299a06bfe..f0c5ea282 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 8b7f481b9..c921f85b2 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 f13d35f09..2a02e118c 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
diff --git a/srcpkgs/helix-bin/template b/srcpkgs/helix-bin/template
new file mode 100644
index 000000000000..f5fa65a1b34d
--- /dev/null
+++ b/srcpkgs/helix-bin/template
@@ -0,0 +1,20 @@
+# Template file for 'helix-bin'
+pkgname=helix-bin
+version=22.03
+revision=1
+archs="x86_64"
+wrksrc="helix-${version}-x86_64-linux"
+short_desc="Kakoune / neovim inspired editor, written in Rust"
+maintainer="shizonic <realtiaz@gmail.com>"
+license="MPL-2.0"
+homepage="https://helix-editor.com/"
+distfiles="https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-x86_64-linux.tar.xz"
+checksum=844ec88c81e2e4ca6153499a8b371cfbd3602f32492326b91bf2547d515f528f
+conflicts="hex>=0"
+
+do_install() {
+	vmkdir usr/lib/helix
+	vcopy runtime usr/lib/helix/
+	vcopy hx usr/lib/helix
+	vbin ${FILESDIR}/hx
+}

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

* Re: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
@ 2022-03-30  9:30 ` tranzystorek-io
  2022-03-30  9:45 ` [PR PATCH] [Updated] " shizonic
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tranzystorek-io @ 2022-03-30  9:30 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/36414#issuecomment-1082841412

Comment:
I think in this release we could realy easily build from the .tar.gz source, since the build process automatically fetches the grammar files, just as long as there is `hostmakedepens="git"`

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

* Re: [PR PATCH] [Updated] New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
  2022-03-30  9:30 ` tranzystorek-io
@ 2022-03-30  9:45 ` shizonic
  2022-03-30 10:10 ` tranzystorek-io
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: shizonic @ 2022-03-30  9:45 UTC (permalink / raw)
  To: ml

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

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

https://github.com/shizonic/void-packages helix-bin
https://github.com/void-linux/void-packages/pull/36414

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

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

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

<!-- 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/36414.patch is attached

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

From e567282338b0e82523380690985a746ee32b3639 Mon Sep 17 00:00:00 2001
From: Toby Merz <realtiaz@gmail.com>
Date: Tue, 15 Jun 2021 11:44:45 +0200
Subject: [PATCH] New package: helix-bin-22.03

---
 srcpkgs/helix-bin/files/hx |  2 ++
 srcpkgs/helix-bin/template | 21 +++++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100755 srcpkgs/helix-bin/files/hx
 create mode 100644 srcpkgs/helix-bin/template

diff --git a/srcpkgs/helix-bin/files/hx b/srcpkgs/helix-bin/files/hx
new file mode 100755
index 000000000000..845ed5293826
--- /dev/null
+++ b/srcpkgs/helix-bin/files/hx
@@ -0,0 +1,2 @@
+#!/usr/bin/sh
+HELIX_RUNTIME=/usr/lib/helix/runtime exec /usr/lib/helix/hx $@
diff --git a/srcpkgs/helix-bin/template b/srcpkgs/helix-bin/template
new file mode 100644
index 000000000000..7cfe9043529a
--- /dev/null
+++ b/srcpkgs/helix-bin/template
@@ -0,0 +1,21 @@
+# Template file for 'helix-bin'
+pkgname=helix-bin
+version=22.03
+revision=1
+archs="x86_64"
+wrksrc="helix-${version}-x86_64-linux"
+hostmakedepends="git"
+short_desc="Kakoune / neovim inspired editor, written in Rust"
+maintainer="shizonic <realtiaz@gmail.com>"
+license="MPL-2.0"
+homepage="https://helix-editor.com/"
+distfiles="https://github.com/helix-editor/helix/releases/download/${version}/helix-${version}-x86_64-linux.tar.xz"
+checksum=844ec88c81e2e4ca6153499a8b371cfbd3602f32492326b91bf2547d515f528f
+conflicts="hex>=0"
+
+do_install() {
+	vmkdir usr/lib/helix
+	vcopy runtime usr/lib/helix/
+	vcopy hx usr/lib/helix
+	vbin ${FILESDIR}/hx
+}

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

* Re: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
  2022-03-30  9:30 ` tranzystorek-io
  2022-03-30  9:45 ` [PR PATCH] [Updated] " shizonic
@ 2022-03-30 10:10 ` tranzystorek-io
  2022-03-30 10:21 ` tranzystorek-io
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tranzystorek-io @ 2022-03-30 10:10 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/36414#issuecomment-1082893327

Comment:
To clarify what I meant:

1. Switch from `helix-bin` to just `helix`
2. Use `build_style=cargo`
3. Switch the distfile to the `22.03.tar.gz` source package (instead of the prebuilt binary)
4. Keep the Rust patch to fix the source code
5. Allow targets other than `x86_64`, I just built it this way for i686 so it should be fine
6. Copy the built binary from `target/${RUST_TARGET}/release/` to `/usr/lib/helix/`
7. Remove the runtime/grammars/.gitkeep file

@paper42 Is automated fetching external files via git acceptable for source packages?

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

* Re: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
                   ` (2 preceding siblings ...)
  2022-03-30 10:10 ` tranzystorek-io
@ 2022-03-30 10:21 ` tranzystorek-io
  2022-03-30 12:06 ` leahneukirchen
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: tranzystorek-io @ 2022-03-30 10:21 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/36414#issuecomment-1082893327

Comment:
To clarify what I meant:

1. Switch from `helix-bin` to just `helix`
2. Use `build_style=cargo`
3. Switch the distfile to the `22.03.tar.gz` source package (instead of the prebuilt binary)
4. Keep the Rust patch to fix the source code
5. Allow targets other than `x86_64`, I just built it this way for i686 so it should be fine
6. In `post_install`, move the built binary to `/usr/lib/helix/`
7. Remove the `runtime/grammars/.gitkeep` file

@paper42 Is automated fetching external files via git acceptable for source packages?

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

* Re: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
                   ` (3 preceding siblings ...)
  2022-03-30 10:21 ` tranzystorek-io
@ 2022-03-30 12:06 ` leahneukirchen
  2022-03-30 14:33 ` [PR PATCH] [Closed]: " shizonic
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: leahneukirchen @ 2022-03-30 12:06 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on void-packages repository

https://github.com/void-linux/void-packages/pull/36414#issuecomment-1083056989

Comment:
Ideally the git resources are pinned somehow, but it's acceptable.

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

* Re: [PR PATCH] [Closed]: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
                   ` (4 preceding siblings ...)
  2022-03-30 12:06 ` leahneukirchen
@ 2022-03-30 14:33 ` shizonic
  2022-03-30 14:33 ` shizonic
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: shizonic @ 2022-03-30 14:33 UTC (permalink / raw)
  To: ml

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

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

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

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**|**NO**
-->

<!-- 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] 11+ messages in thread

* Re: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
                   ` (5 preceding siblings ...)
  2022-03-30 14:33 ` [PR PATCH] [Closed]: " shizonic
@ 2022-03-30 14:33 ` shizonic
  2022-03-30 14:35 ` tranzystorek-io
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: shizonic @ 2022-03-30 14:33 UTC (permalink / raw)
  To: ml

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

New comment by shizonic on void-packages repository

https://github.com/void-linux/void-packages/pull/36414#issuecomment-1083216800

Comment:
@tranzystorek-io Thanks for all you effort. Due to the fact, that I do not really use helix anymore I suggest that you become the package maintainer, make all the required changes and make a new PR. Would this be okay for you?

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

* Re: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
                   ` (6 preceding siblings ...)
  2022-03-30 14:33 ` shizonic
@ 2022-03-30 14:35 ` tranzystorek-io
  2022-03-30 14:38 ` shizonic
  2022-03-30 14:39 ` shizonic
  9 siblings, 0 replies; 11+ messages in thread
From: tranzystorek-io @ 2022-03-30 14:35 UTC (permalink / raw)
  To: ml

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

New comment by tranzystorek-io on void-packages repository

https://github.com/void-linux/void-packages/pull/36414#issuecomment-1083219400

Comment:
@shizonic thanks for the heads up, gladly!

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

* Re: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
                   ` (7 preceding siblings ...)
  2022-03-30 14:35 ` tranzystorek-io
@ 2022-03-30 14:38 ` shizonic
  2022-03-30 14:39 ` shizonic
  9 siblings, 0 replies; 11+ messages in thread
From: shizonic @ 2022-03-30 14:38 UTC (permalink / raw)
  To: ml

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

New comment by shizonic on void-packages repository

https://github.com/void-linux/void-packages/pull/36414#issuecomment-1083216800

Comment:
@tranzystorek-io Thanks for all your effort. Due to the fact, that I do not really use helix anymore I suggest that you become the package maintainer, make all the required changes and make a new PR. Would this be okay for you?

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

* Re: New package: helix-bin-22.03
  2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
                   ` (8 preceding siblings ...)
  2022-03-30 14:38 ` shizonic
@ 2022-03-30 14:39 ` shizonic
  9 siblings, 0 replies; 11+ messages in thread
From: shizonic @ 2022-03-30 14:39 UTC (permalink / raw)
  To: ml

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

New comment by shizonic on void-packages repository

https://github.com/void-linux/void-packages/pull/36414#issuecomment-1083224806

Comment:
@tranzystorek-io I started to make you changes here if you like to use it for you PR: https://github.com/shizonic/void-packages/commit/06ec0a1353673a819ed51af6ca5fe9b2cf8ba5a1

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

end of thread, other threads:[~2022-03-30 14:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30  9:23 [PR PATCH] New package: helix-bin-22.03 shizonic
2022-03-30  9:30 ` tranzystorek-io
2022-03-30  9:45 ` [PR PATCH] [Updated] " shizonic
2022-03-30 10:10 ` tranzystorek-io
2022-03-30 10:21 ` tranzystorek-io
2022-03-30 12:06 ` leahneukirchen
2022-03-30 14:33 ` [PR PATCH] [Closed]: " shizonic
2022-03-30 14:33 ` shizonic
2022-03-30 14:35 ` tranzystorek-io
2022-03-30 14:38 ` shizonic
2022-03-30 14:39 ` shizonic

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).