diff --git a/pkgs/applications/networking/browsers/next/default.nix b/pkgs/applications/networking/browsers/next/default.nix deleted file mode 100644 index e03f918a587..00000000000 --- a/pkgs/applications/networking/browsers/next/default.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ stdenv -, fetchFromGitHub -, lispPackages -, sbcl -, callPackage -}: - -let - - # This is the wrapped webkitgtk platform port that we hardcode into the Lisp Core. - # See https://github.com/atlas-engineer/next/tree/master/ports#next-platform-ports - next-gtk-webkit = callPackage ./next-gtk-webkit.nix {}; - -in - -stdenv.mkDerivation rec { - pname = "next"; - version = "1.5.0"; - - src = fetchFromGitHub { - owner = "atlas-engineer"; - repo = "next"; - rev = version; - sha256 = "1gqkp185wcwaxr8py90hqk44nqjblrrdwvig19gizrbzr2gx2zhy"; - }; - - nativeBuildInputs = [ - sbcl - ] ++ (with lispPackages; [ - prove-asdf - trivial-features - ]); - - buildInputs = with lispPackages; [ - alexandria - bordeaux-threads - cl-annot - cl-ansi-text - cl-css - cl-json - cl-markup - cl-ppcre - cl-ppcre-unicode - cl-prevalence - closer-mop - dbus - dexador - ironclad - local-time - log4cl - lparallel - mk-string-metrics - parenscript - plump - quri - serapeum - sqlite - str - swank - trivia - trivial-clipboard - trivial-types - unix-opts - ]; - - # This reference is unfortunately not detected by Nix - propagatedBuildInputs = [ next-gtk-webkit ]; - - prePatch = '' - substituteInPlace source/ports/gtk-webkit.lisp \ - --replace "next-gtk-webkit" "${next-gtk-webkit}/bin/next-gtk-webkit" - ''; - - buildPhase = '' - common-lisp.sh --eval "(require :asdf)" \ - --eval "(asdf:load-asd (truename \"next.asd\") :name \"next\")" \ - --eval '(asdf:make :next)' \ - --quit - ''; - - installPhase = '' - install -D -m0755 next $out/bin/next - ''; - - # Stripping destroys the generated SBCL image - dontStrip = true; - - meta = with stdenv.lib; { - description = "Infinitely extensible web-browser (with Lisp development files using WebKitGTK platform port)"; - homepage = "https://next.atlas.engineer"; - license = licenses.bsd3; - maintainers = [ maintainers.lewo ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/applications/networking/browsers/next/next-gtk-webkit.nix b/pkgs/applications/networking/browsers/next/next-gtk-webkit.nix deleted file mode 100644 index 316913be000..00000000000 --- a/pkgs/applications/networking/browsers/next/next-gtk-webkit.nix +++ /dev/null @@ -1,54 +0,0 @@ -# https://github.com/atlas-engineer/next/tree/master/ports/gtk-webkit - -{ stdenv -, pkg-config -, next -, webkitgtk -, gtk3 -, glib -, gsettings-desktop-schemas -, glib-networking -, gst_all_1 -, wrapGAppsHook -}: - -stdenv.mkDerivation rec { - pname = "next-gtk-webkit"; - inherit (next) src version; - - nativeBuildInputs = [ - pkg-config - wrapGAppsHook - ]; - - buildInputs = [ - glib - glib-networking - gsettings-desktop-schemas - gtk3 - webkitgtk - gst_all_1.gstreamer - gst_all_1.gst-libav - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-bad - gst_all_1.gst-plugins-ugly - ]; - - makeFlags = [ - "gtk-webkit" - "PREFIX=${placeholder "out"}" - ]; - - installTargets = [ - "install-gtk-webkit" - ]; - - meta = with stdenv.lib; { - description = "Infinitely extensible web-browser (user interface only)"; - homepage = "https://next.atlas.engineer"; - license = licenses.bsd3; - maintainers = [ maintainers.lewo ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/applications/networking/browsers/nyxt/default.nix b/pkgs/applications/networking/browsers/nyxt/default.nix new file mode 100644 index 00000000000..ff99b1c21dd --- /dev/null +++ b/pkgs/applications/networking/browsers/nyxt/default.nix @@ -0,0 +1,57 @@ +{ stdenv, lib, lispPackages, sbcl +, makeWrapper, wrapGAppsHook, gst_all_1 +, glib, gdk-pixbuf, cairo +, mime-types, pango, gtk3 +, glib-networking, gsettings-desktop-schemas +, xclip, notify-osd, enchant +}: + +stdenv.mkDerivation rec { + pname = "nyxt"; + inherit (lispPackages.nyxt.meta) version; + + src = lispPackages.nyxt; + + nativeBuildInputs = [ makeWrapper wrapGAppsHook ]; + gstBuildInputs = with gst_all_1; [ + gstreamer gst-libav + gst-plugins-base + gst-plugins-good + gst-plugins-bad + gst-plugins-ugly + ]; + buildInputs = [ + glib gdk-pixbuf cairo + mime-types pango gtk3 + glib-networking gsettings-desktop-schemas + xclip notify-osd enchant + ] ++ gstBuildInputs; + + GST_PLUGIN_SYSTEM_PATH_1_0 = lib.concatMapStringsSep ":" (p: "${p}/lib/gstreamer-1.0") gstBuildInputs; + + dontWrapGApps = true; + installPhase = '' + mkdir -p $out/share/applications/ + sed "s/VERSION/$version/" $src/lib/common-lisp/nyxt/assets/nyxt.desktop > $out/share/applications/nyxt.desktop + for i in 16 32 128 256 512; do + mkdir -p "$out/share/icons/hicolor/''${i}x''${i}/apps/" + cp -f $src/lib/common-lisp/nyxt/assets/nyxt_''${i}x''${i}.png "$out/share/icons/hicolor/''${i}x''${i}/apps/nyxt.png" + done + + mkdir -p $out/bin && makeWrapper $src/bin/nyxt $out/bin/nyxt \ + --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "${GST_PLUGIN_SYSTEM_PATH_1_0}" \ + --argv0 nyxt "''${gappsWrapperArgs[@]}" + ''; + + checkPhase = '' + $out/bin/nyxt -h + ''; + + meta = with stdenv.lib; { + 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 ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb43a22eeeb..38774895209 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5083,7 +5083,7 @@ in netsniff-ng = callPackage ../tools/networking/netsniff-ng { }; - next = callPackage ../applications/networking/browsers/next { }; + nyxt = callPackage ../applications/networking/browsers/nyxt { }; nfpm = callPackage ../tools/package-management/nfpm { };