Skip to content

pulsar: init at 1.103.0#221862

Merged
mkg20001 merged 2 commits intoNixOS:masterfrom
COLAMAroro:submit/pulsar
Apr 6, 2023
Merged

pulsar: init at 1.103.0#221862
mkg20001 merged 2 commits intoNixOS:masterfrom
COLAMAroro:submit/pulsar

Conversation

@COLAMAroro
Copy link
Contributor

@COLAMAroro COLAMAroro commented Mar 18, 2023

Description of changes

Community maintained fork of the sunset Atom editor.
https://github.com/pulsar-edit/pulsar

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@COLAMAroro
Copy link
Contributor Author

Requesting reviews and opinion from @ysndr and @offlinehacker, as they are the registered maintainers of Atom.

Atom has been sunset by GitHub. Should it be disabled and aliased to Pulsar instead ? Also, are you interested in being registered as maintainers of Pulsar ?

Copy link
Contributor

@OPNA2608 OPNA2608 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Nixpkgs 🙂! Some suggestions on this.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Mar 18, 2023
@ysndr
Copy link
Member

ysndr commented Mar 18, 2023

Welcome!

I agree with most of @OPNA2608's suggestions.

Reg. maintainership, I am unfortunately no longer using linux/nixos as a desktop system, so beyond having an eye on the nix, there's not much I can do these days to maintain.

@COLAMAroro
Copy link
Contributor Author

Hello ! Thanks for your feedbacks ! I've fixed the easy fixes.

@OPNA2608
Copy link
Contributor

I think you ran maintainers/maintainer-list.nix through some auto-formatter, which caused some undesirable formatting changes to the comments.
image

@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. label Mar 18, 2023
@COLAMAroro
Copy link
Contributor Author

Oops ! Didn't see that in my commit diff, sorry about that.

@bennyandresen bennyandresen mentioned this pull request Mar 19, 2023
12 tasks
@AndersonTorres AndersonTorres marked this pull request as draft March 19, 2023 14:30
@COLAMAroro COLAMAroro marked this pull request as ready for review March 20, 2023 19:08
@COLAMAroro
Copy link
Contributor Author

COLAMAroro commented Mar 20, 2023

I found an aarch64 device, but sadly without any graphical output. As it is, the package builds on aarch64, but I have no way of testing if it runs like intended. Here is the output when running on an headless machine:

root@anunnaki:~/nixpkgs# ./result/opt/Pulsar/pulsar --no-sandbox
Fontconfig error: Cannot load default config file: No such file: (null)
Segmentation fault (core dumped)

This fontconfig doesn't surprise me, but I can't really test if this segfault is caused by a lack of fontconfig, or by something else.

No behaviour change on x86_64.

@COLAMAroro COLAMAroro requested review from OPNA2608 and ysndr and removed request for OPNA2608 March 20, 2023 20:47
@OPNA2608
Copy link
Contributor

I have an aarch64-linux system with graphics, launches fine.

screenshot20230320_214659562

@COLAMAroro
Copy link
Contributor Author

Perfect ! Thanks :)

Unless there is an official fix to make ofborg okay with not having a darwin package, or there is other parts that can be enhances, I think I'm ready for the final review

@COLAMAroro
Copy link
Contributor Author

COLAMAroro commented Mar 20, 2023

I think it's good, builds to the same result on aarch64 and x86-64 :)

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. and removed 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Mar 20, 2023
@COLAMAroro COLAMAroro requested review from OPNA2608 and removed request for ysndr March 21, 2023 21:40
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please follow the contributing guide when naming your commits.

@COLAMAroro COLAMAroro removed the request for review from OPNA2608 March 24, 2023 15:24
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/1990

@Alizter
Copy link
Contributor

Alizter commented Mar 26, 2023

Result of nixpkgs-review pr 221862 run on x86_64-linux 1

1 package built:
  • pulsar

@Alizter
Copy link
Contributor

Alizter commented Mar 26, 2023

Can you separate the maintainers changes from the pulsar change? As In put them in separate commits?

@COLAMAroro COLAMAroro marked this pull request as draft March 27, 2023 20:18
@mkg20001
Copy link
Member

When a package attempts to build native bindings, it fails as gcc/g++ is not available

Also ppm cli is not exposed as it's own command in path, that would be nice to have

@mkg20001
Copy link
Member

you'll need to rebase and squash your commits into

maintainers: add colamaroro

pulsar: init at 1.103.0

also since pulsar updates quite frequently you could look into creating an update-script https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/haste-server/update.sh

@mkg20001
Copy link
Member

patch for update script:

From ee7b8de45a012c87c604cfb5bd684c526876d3cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= <mkg20001@gmail.com>
Date: Tue, 28 Mar 2023 12:15:13 +0200
Subject: [PATCH] pulsar update

---
 pkgs/applications/editors/pulsar/default.nix |  4 ++++
 pkgs/applications/editors/pulsar/update.sh   | 15 +++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100755 pkgs/applications/editors/pulsar/update.sh

diff --git a/pkgs/applications/editors/pulsar/default.nix b/pkgs/applications/editors/pulsar/default.nix
index 6df6f3b47962..2d4991eacb8d 100644
--- a/pkgs/applications/editors/pulsar/default.nix
+++ b/pkgs/applications/editors/pulsar/default.nix
@@ -144,6 +144,10 @@ stdenv.mkDerivation rec {
 
   desktopItems = [ desktopItem ];
 
+  passthru = {
+    updateScript = ./update.sh;
+  };
+
   meta = with lib; {
     description = "A Community-led Hyper-Hackable Text Editor";
     longDescription = ''
diff --git a/pkgs/applications/editors/pulsar/update.sh b/pkgs/applications/editors/pulsar/update.sh
new file mode 100755
index 000000000000..db7fa1c4171e
--- /dev/null
+++ b/pkgs/applications/editors/pulsar/update.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl common-updater-scripts gnused nix coreutils jq
+
+set -euo pipefail
+
+latestVersion="$(curl -s "https://api.github.com/repos/pulsar-edit/pulsar/releases" | jq -r ".[] | select(.prerelease == false) | .tag_name" | head -n 1 | sed "s|v||g")"
+currentVersion=$(nix-instantiate --eval -E "with import ./. {}; pulsar.version or (lib.getVersion pulsar)" | tr -d '"')
+
+if [[ "$currentVersion" == "$latestVersion" ]]; then
+  echo "pulsar is up-to-date: $currentVersion"
+  exit 0
+fi
+
+update-source-version pulsar 0 sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
+update-source-version pulsar "$latestVersion"
-- 
2.39.2

@COLAMAroro COLAMAroro marked this pull request as ready for review March 30, 2023 13:51
@COLAMAroro
Copy link
Contributor Author

After some struggles with git, it's good !

Added the maintainer file by itself, patched and exposed ppm and finally added the update script and the nemo action :)

@COLAMAroro COLAMAroro requested a review from mkg20001 March 30, 2023 13:56
Copy link
Member

@mkg20001 mkg20001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@COLAMAroro COLAMAroro requested a review from mkg20001 March 31, 2023 12:37
@COLAMAroro
Copy link
Contributor Author

Hello ! Sorry for the downtime !

Applied the suggestions, still building on x86_64 and aarch64 :)
The update scripts now base itself on the provided sha256 sums in the release page (making the build slightly more secure, and substantially faster)

@COLAMAroro COLAMAroro requested a review from mkg20001 April 6, 2023 08:48
Community maintained fork of the sunset Atom editor.
https://github.com/pulsar-edit/pulsar
@mkg20001 mkg20001 merged commit e72dedd into NixOS:master Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants