From 10b06ee6fe017d50b7e402f27469b2c0d9f5d775 Mon Sep 17 00:00:00 2001 From: dariof4 Date: Sat, 3 Jun 2023 22:37:34 +0200 Subject: [PATCH 1/6] maintainers: add dariof4 --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 7586a34a64f6..5778df1c1fb9 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3554,6 +3554,12 @@ fingerprint = "4779 D1D5 3C97 2EAE 34A5 ED3D D8AF C4BF 0567 0F9D"; }]; }; + dariof4 = { + name = "dariof4"; + email = "dazedtank@gmail.com"; + github = "dariof4"; + githubId = 9992814; + }; darkonion0 = { name = "Alexandre Peruggia"; email = "darkgenius1@protonmail.com"; From 4b9678150e01108a38b4d2b53308a941f5b93910 Mon Sep 17 00:00:00 2001 From: dariof4 Date: Tue, 6 Jun 2023 17:34:32 +0200 Subject: [PATCH 2/6] sbcl: add more heap size Set the `--dynamic-spzce-size` flag for sbcl to add more heap size to make certain packages be able to compile. ref: https://github.com/NixOS/nixpkgs/pull/235095#issuecomment-1574352970 --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 349550028226..929c7cbeeb05 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25120,10 +25120,12 @@ with pkgs; sbcl_2_3_4 = wrapLisp { pkg = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.3.4"; }; faslExt = "fasl"; + flags = [ "--dynamic-space-size" "3000" ]; }; sbcl_2_3_5 = wrapLisp { pkg = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.3.5"; }; faslExt = "fasl"; + flags = [ "--dynamic-space-size" "3000" ]; }; sbcl = sbcl_2_3_5; From a71d35f73ad9f64058049d3f41f2180c39fa38d4 Mon Sep 17 00:00:00 2001 From: dariof4 Date: Mon, 29 May 2023 15:54:54 +0200 Subject: [PATCH 3/6] lisp-modules: add updated lispLibs for nyxt Adds various updated lisp packages that are needed to update nyxt to 3.1.0. --- pkgs/development/lisp-modules/packages.nix | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 3bc7e276122d..93e5e7484c1a 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -261,6 +261,113 @@ let lispLibs = super.mathkit.lispLibs ++ [ super.sb-cga ]; }; + quri_7_0 = build-asdf-system { + inherit (super.quri) pname systems lispLibs; + version = "0.7.0"; + + src = pkgs.fetchFromGitHub { + owner = "fukamachi"; + repo = "quri"; + rev = "0.7.0"; + sha256 = "sha256-/9p67rfbkdrx5nn4kXEUAM9MzV7NYUsRcKsrP/e2MlA="; + }; + }; + + cl-colors2_0_5_3 = build-asdf-system { + inherit (super.cl-colors2) pname systems lispLibs; + version = "0.5.3"; + + src = pkgs.fetchgit { + url = "https://notabug.org/cage/cl-colors2"; + rev = "refs/tags/v0.5.3"; + sha256 = "sha256-anYkLJoNOVBQoXzWVBgbEusQDdud0RA8nZzedl8V93w="; + }; + }; + + cl-webkit2_3_5_8 = build-asdf-system { + inherit (super.cl-webkit2) pname systems nativeLibs lispLibs; + version = "3.5.8"; + + src = pkgs.fetchFromGitHub { + owner = "joachifm"; + repo = "cl-webkit"; + rev = "3.5.8"; + sha256 = "sha256-wZ/zRRJlTiOIny4BsU+wsFtxtS5YKx3WalwpCVQPFSY="; + }; + }; + + nasdf-unstable = build-asdf-system { + inherit (super.nasdf) pname systems; + version = "20230524-git"; + src = pkgs.fetchFromGitHub { + owner = "atlas-engineer"; + repo = "ntemplate"; + rev = "51a884f388ec526c32914093fcad6bb2434e3c14"; + sha256 = "sha256-bjQPkiHAxhjsHCnWpCGMsmQlGDJFGtQEdevnhK2k+kY="; + }; + }; + + njson_1_0_0 = build-asdf-system { + inherit (super.njson) pname; + version = "1.0.0"; + src = pkgs.fetchFromGitHub { + owner = "atlas-engineer"; + repo = "njson"; + rev = "1.0.0"; + sha256 = "sha256-zeOxkoi5cPl1sw1oEOaMsKhhs3Pb8EzzKTjvuDNj/Ko="; + }; + lispLibs = [ self.nasdf-unstable super.cl-json ]; + systems = [ "njson" "njson/cl-json" ]; + }; + + nsymbols_0_3_1 = build-asdf-system { + inherit (super.nsymbols) pname; + version = "0.3.1"; + src = pkgs.fetchFromGitHub { + owner = "atlas-engineer"; + repo = "nsymbols"; + rev = "0.3.1"; + sha256 = "sha256-KcrE06bG5Khp5/807wb/TbPG3nWTlNWHrDpmK6bm7ZM="; + }; + lispLibs = [ super.closer-mop ]; + systems = [ "nsymbols" "nsymbols/star" ]; + + }; + + nclasses_0_5_0 = build-asdf-system { + inherit (super.nclasses) pname systems; + version = "0.5.0"; + src = pkgs.fetchFromGitHub { + owner = "atlas-engineer"; + repo = "nclasses"; + rev = "0.5.0"; + sha256 = "sha256-UcavZ0fCA2hkVU/CqUZfyCqJ8gXKPpXTCP0WLUIF1Ss="; + }; + lispLibs = [ self.nasdf-unstable super.moptilities ]; + }; + + nfiles_1_1_2 = build-asdf-system { + inherit (super.nfiles) pname systems; + version = "1.1.2"; + src = pkgs.fetchFromGitHub { + owner = "atlas-engineer"; + repo = "nfiles"; + rev = "1.1.2"; + sha256 = "sha256-YsVcCFrJIFL9Z4wQNAv6chiz6wB/eB8v/EUMXPLs3fw="; + }; + lispLibs = [ + self.nasdf-unstable + self.nclasses_0_5_0 + self.quri_7_0 + super.alexandria + super.iolib + super.serapeum + super.trivial-garbage + super.trivial-package-local-nicknames + super.trivial-types + ]; + }; + nyxt-gtk = build-asdf-system { inherit (super.nyxt) pname; version = "2.2.4"; From e59c30b59d83ad22dbbc99372f155d18347a12a5 Mon Sep 17 00:00:00 2001 From: dariof4 Date: Mon, 29 May 2023 16:04:13 +0200 Subject: [PATCH 4/6] lisp-modules.prompter: init at 0.1.0 Promter was an internal part of nyxt that was split off as it's own external library in nyxt 3.0.0. --- pkgs/development/lisp-modules/packages.nix | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 93e5e7484c1a..d49ba12ed91b 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -296,6 +296,32 @@ let }; }; + prompter = build-asdf-system { + pname = "prompter"; + version = "0.1.0"; + + src = pkgs.fetchFromGitHub { + owner = "atlas-engineer"; + repo = "prompter"; + rev = "0.1.0"; + sha256 = "sha256-Duv7L2lMjr3VXsoujQDOMNHCbdUDX4RWoncVm9LDCZE="; + }; + + lispLibs = [ + self.cl-containers + self.nclasses_0_5_0 + super.alexandria + super.calispel + super.closer-mop + super.lparallel + super.moptilities + super.serapeum + super.str + super.trivial-package-local-nicknames + ]; + + }; + nasdf-unstable = build-asdf-system { inherit (super.nasdf) pname systems; version = "20230524-git"; From e577ef5d6e4156bf7ef0ef533147118579d3f03a Mon Sep 17 00:00:00 2001 From: dariof4 Date: Tue, 6 Jun 2023 17:59:45 +0200 Subject: [PATCH 5/6] lisp-modules.nyxt-gtk: use gi-gtk system instead of gtk system Package :nyxt/gi-gtk-application instead of :nyxt/gtk-application. ref: https://github.com/NixOS/nixpkgs/issues/217888#issuecomment-1562523130 --- pkgs/development/lisp-modules/packages.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index d49ba12ed91b..68b42cdd3f24 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -419,7 +419,7 @@ let buildScript = pkgs.writeText "build-nyxt.lisp" '' (load "${super.nyxt.asdfFasl}/asdf.${super.nyxt.faslExt}") - (asdf:load-system :nyxt/gtk-application) + (asdf:load-system :nyxt/gi-gtk-application) (sb-ext:save-lisp-and-die "nyxt" :executable t #+sb-core-compression :compression #+sb-core-compression t @@ -438,6 +438,7 @@ let --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \ --prefix XDG_DATA_DIRS : $XDG_ICON_DIRS \ --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \ + --prefix GI_TYPELIB_PATH : $GI_TYPELIB_PATH \ --prefix GIO_EXTRA_MODULES ":" ${pkgs.dconf.lib}/lib/gio/modules/ \ --prefix GIO_EXTRA_MODULES ":" ${pkgs.glib-networking}/lib/gio/modules/ ''; From 2a8e901c2f6ae0d19165536173c9e383ba5821da Mon Sep 17 00:00:00 2001 From: dariof4 Date: Mon, 29 May 2023 16:28:43 +0200 Subject: [PATCH 6/6] nyxt: 2.2.4 -> 3.1.0 `WEBKIT_FORCE_SANDBOX=0` is no longer needed since web extension support has been diabled by default. ref: https://github.com/atlas-engineer/nyxt/pull/2897 Release notes: https://nyxt.atlas.engineer/article/release-3.0.0.org https://github.com/atlas-engineer/nyxt/releases/tag/3.1.0 --- .../networking/browsers/nyxt/default.nix | 9 +- pkgs/development/lisp-modules/packages.nix | 94 +++++++++++++++---- 2 files changed, 84 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/networking/browsers/nyxt/default.nix b/pkgs/applications/networking/browsers/nyxt/default.nix index 3e526bf20334..6ed870aa9321 100644 --- a/pkgs/applications/networking/browsers/nyxt/default.nix +++ b/pkgs/applications/networking/browsers/nyxt/default.nix @@ -24,11 +24,14 @@ stdenv.mkDerivation rec { glib gdk-pixbuf cairo mailcap pango gtk3 glib-networking gsettings-desktop-schemas - xclip notify-osd enchant + notify-osd enchant ] ++ gstBuildInputs; GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" gstBuildInputs; + # The executable is already built in sbclPackages.nyxt, buildPhase tries to build using the makefile which we ignore + dontBuild = true; + dontWrapGApps = true; installPhase = '' mkdir -p $out/share/applications/ @@ -38,7 +41,9 @@ stdenv.mkDerivation rec { cp -f $src/assets/nyxt_''${i}x''${i}.png "$out/share/icons/hicolor/''${i}x''${i}/apps/nyxt.png" done + # Need to suffix PATH with xclip to be able to copy/paste in Nyxt even if xclip/xsel/wl-clipboard are not in the user's PATH mkdir -p $out/bin && makeWrapper $src/bin/nyxt $out/bin/nyxt \ + --suffix PATH : ${lib.makeBinPath [ xclip ]} \ --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "${GST_PLUGIN_SYSTEM_PATH_1_0}" \ --argv0 nyxt "''${gappsWrapperArgs[@]}" ''; @@ -51,7 +56,7 @@ stdenv.mkDerivation rec { description = "Infinitely extensible web-browser (with Lisp development files using WebKitGTK platform port)"; homepage = "https://nyxt.atlas.engineer"; license = licenses.bsd3; - maintainers = with maintainers; [ lewo payas ]; + maintainers = with maintainers; [ lewo dariof4 ]; platforms = platforms.all; }; } diff --git a/pkgs/development/lisp-modules/packages.nix b/pkgs/development/lisp-modules/packages.nix index 68b42cdd3f24..a752f713043f 100644 --- a/pkgs/development/lisp-modules/packages.nix +++ b/pkgs/development/lisp-modules/packages.nix @@ -396,15 +396,76 @@ let nyxt-gtk = build-asdf-system { inherit (super.nyxt) pname; - version = "2.2.4"; + version = "3.1.0"; - lispLibs = super.nyxt.lispLibs ++ (with super; [ - cl-cffi-gtk cl-webkit2 mk-string-metrics cl-css - ]); + lispLibs = with super; [ + self.nasdf-unstable + self.prompter + self.cl-colors2_0_5_3 + self.njson_1_0_0 + self.nsymbols_0_3_1 + self.nclasses_0_5_0 + self.nfiles_1_1_2 + self.quri_7_0 + self.cl-webkit2_3_5_8 + self.swank + alexandria + bordeaux-threads + calispel + cl-base64 + cl-gopher + cl-html-diff + cl-json + cl-ppcre + cl-ppcre-unicode + cl-prevalence + cl-qrencode + cl-tld + closer-mop + cl-containers + dissect + moptilities + dexador + enchant + flexi-streams + history-tree + idna + iolib + lass + local-time + lparallel + log4cl + montezuma + ndebug + nhooks + nkeymaps + osicat + parenscript + py-configparser + serapeum + str + phos + plump + clss + spinneret + slynk + trivia + trivial-clipboard + trivial-features + trivial-garbage + trivial-package-local-nicknames + trivial-types + unix-opts + cluffer + cl-cffi-gtk + cl-gobject-introspection + ]; - src = pkgs.fetchzip { - url = "https://github.com/atlas-engineer/nyxt/archive/2.2.4.tar.gz"; - sha256 = "12l7ir3q29v06jx0zng5cvlbmap7p709ka3ik6x29lw334qshm9b"; + src = pkgs.fetchFromGitHub { + owner = "atlas-engineer"; + repo = "nyxt"; + rev = "3.1.0"; + sha256 = "sha256-H3AlslECb/VvIC6zAGkLNTaGJ/nb97J6RXAN8sEgAgY="; }; nativeBuildInputs = [ pkgs.makeWrapper ]; @@ -417,24 +478,23 @@ let pkgs.gnome.adwaita-icon-theme ]; - buildScript = pkgs.writeText "build-nyxt.lisp" '' - (load "${super.nyxt.asdfFasl}/asdf.${super.nyxt.faslExt}") - (asdf:load-system :nyxt/gi-gtk-application) - (sb-ext:save-lisp-and-die "nyxt" :executable t - #+sb-core-compression :compression - #+sb-core-compression t - :toplevel #'nyxt:entry-point) + # This is needed since asdf:make tries to write in the directory of the .asd file of the system it's compiling + postConfigure = '' + export CL_SOURCE_REGISTRY=$CL_SOURCE_REGISTRY:$(pwd)// + ''; + + buildScript = pkgs.writeText "build-nyxt.lisp" '' + (load "${super.nyxt.asdfFasl}/asdf.${super.nyxt.faslExt}") + ;; There's a weird error while copy/pasting in Nyxt that manifests with sb-ext:save-lisp-and-die, so we use asdf:make instead + (asdf:make :nyxt/gi-gtk-application) ''; - # Run with WEBKIT_FORCE_SANDBOX=0 if getting a runtime error - # See https://github.com/atlas-engineer/nyxt/issues/1781 # TODO(kasper): use wrapGAppsHook installPhase = super.nyxt.installPhase + '' rm -v $out/nyxt mkdir -p $out/bin cp -v nyxt $out/bin wrapProgram $out/bin/nyxt \ - --set WEBKIT_FORCE_SANDBOX 0 \ --prefix LD_LIBRARY_PATH : $LD_LIBRARY_PATH \ --prefix XDG_DATA_DIRS : $XDG_ICON_DIRS \ --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \