summary refs log tree commit diff
path: root/pkgs/applications/networking
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2019-11-26 08:25:12 -0500
committerworldofpeace <worldofpeace@protonmail.ch>2019-11-26 11:41:50 -0500
commit417d6354c8d6f895a1b39d2eb06d26ba405fdf1c (patch)
tree1b09c34d3b7826e9556d86b8ae905edc1a164a41 /pkgs/applications/networking
parente716e86bedf7ca567f902317b9ce105253478e2c (diff)
downloadnixpkgs-417d6354c8d6f895a1b39d2eb06d26ba405fdf1c.tar
nixpkgs-417d6354c8d6f895a1b39d2eb06d26ba405fdf1c.tar.gz
nixpkgs-417d6354c8d6f895a1b39d2eb06d26ba405fdf1c.tar.bz2
nixpkgs-417d6354c8d6f895a1b39d2eb06d26ba405fdf1c.tar.lz
nixpkgs-417d6354c8d6f895a1b39d2eb06d26ba405fdf1c.tar.xz
nixpkgs-417d6354c8d6f895a1b39d2eb06d26ba405fdf1c.tar.zst
nixpkgs-417d6354c8d6f895a1b39d2eb06d26ba405fdf1c.zip
next: Fix #74258
Next had a few issues with its packaging:
* the platform port was exposed in all-packages
  And this is not useful for outside users.
  It's now a local attribute in the next package.

* the platform port wasn't wrapped correctly
  It appears that the lisp core was being wrapped,
  when instead the actual gtk application that's
  called within the lisp core had to be wrapped.

* codestyle/indentation
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r--pkgs/applications/networking/browsers/next-gtk-webkit/default.nix25
-rw-r--r--pkgs/applications/networking/browsers/next/default.nix150
-rw-r--r--pkgs/applications/networking/browsers/next/next-gtk-webkit.nix50
3 files changed, 127 insertions, 98 deletions
diff --git a/pkgs/applications/networking/browsers/next-gtk-webkit/default.nix b/pkgs/applications/networking/browsers/next-gtk-webkit/default.nix
deleted file mode 100644
index 6ab53376310..00000000000
--- a/pkgs/applications/networking/browsers/next-gtk-webkit/default.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ stdenv, gcc7, pkg-config
-, next
-, webkitgtk, gsettings-desktop-schemas
-}:
-
-stdenv.mkDerivation rec {
-  pname = "next-gtk-webkit";
-  inherit (next) src version;
-
-  makeFlags = [ "gtk-webkit" "PREFIX=$(out)" ];
-  installTargets = "install-gtk-webkit";
-
-  nativeBuildInputs = [ gcc7 pkg-config ];
-  buildInputs = [
-    webkitgtk
-    gsettings-desktop-schemas
-  ];
-  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/next/default.nix b/pkgs/applications/networking/browsers/next/default.nix
index 9b537c55337..97c65fc12ef 100644
--- a/pkgs/applications/networking/browsers/next/default.nix
+++ b/pkgs/applications/networking/browsers/next/default.nix
@@ -1,86 +1,90 @@
-{ pkgs, stdenv, fetchFromGitHub
-, gcc7, pkg-config, makeWrapper
-, glib-networking
-, next-gtk-webkit
+{ stdenv
+, fetchFromGitHub
 , lispPackages
 , sbcl
+, callPackage
 }:
 
-stdenv.mkDerivation rec {
-    pname = "next";
-    version = "1.3.4";
+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 {};
 
-    src = fetchFromGitHub {
-      owner = "atlas-engineer";
-      repo = "next";
-      rev = version;
-      sha256 = "00iqv4xarabl98gdl1rzqkc5v0vfljx1nawsxqsx9x3a9mnxmgxi";
-    };
+in
+
+stdenv.mkDerivation rec {
+  pname = "next";
+  version = "1.3.4";
 
-    # Stripping destroys the generated SBCL image
-    dontStrip = true;
+  src = fetchFromGitHub {
+    owner = "atlas-engineer";
+    repo = "next";
+    rev = version;
+    sha256 = "00iqv4xarabl98gdl1rzqkc5v0vfljx1nawsxqsx9x3a9mnxmgxi";
+  };
 
-    prePatch = ''
-      substituteInPlace source/ports/gtk-webkit.lisp \
-        --replace "next-gtk-webkit" "${next-gtk-webkit}/bin/next-gtk-webkit"
-    '';
+  nativeBuildInputs = [
+    sbcl
+  ] ++ (with lispPackages; [
+    prove-asdf
+    trivial-features
+  ]);
 
-    nativeBuildInputs =
-      [ sbcl makeWrapper ] ++ (with lispPackages;
-      [ prove-asdf trivial-features ]);
+  buildInputs = with lispPackages; [
+    alexandria
+    bordeaux-threads
+    cl-annot
+    cl-ansi-text
+    cl-css
+    cl-hooks
+    cl-json
+    cl-markup
+    cl-ppcre
+    cl-ppcre-unicode
+    cl-prevalence
+    closer-mop
+    dbus
+    dexador
+    ironclad
+    local-time
+    log4cl
+    lparallel
+    mk-string-metrics
+    parenscript
+    quri
+    sqlite
+    str
+    swank
+    trivia
+    trivial-clipboard
+    unix-opts
+  ];
 
-    buildInputs = with lispPackages; [
-      alexandria
-      bordeaux-threads
-      cl-annot
-      cl-ansi-text
-      cl-css
-      cl-hooks
-      cl-json
-      cl-markup
-      cl-ppcre
-      cl-ppcre-unicode
-      cl-prevalence
-      closer-mop
-      dbus
-      dexador
-      ironclad
-      local-time
-      log4cl
-      lparallel
-      mk-string-metrics
-      parenscript
-      quri
-      sqlite
-      str
-      swank
-      trivia
-      trivial-clipboard
-      unix-opts
-    ];
-    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
-    '';
+  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
-    '';
+  installPhase = ''
+    install -D -m0755 next $out/bin/next
+  '';
 
-    preFixup = ''
-      wrapProgram $out/bin/next \
-        --prefix GIO_EXTRA_MODULES : "${glib-networking.out}/lib/gio/modules"
-    '';
+  # Stripping destroys the generated SBCL image
+  dontStrip = true;
 
-    meta = with stdenv.lib; {
-      description = "Infinitely extensible web-browser (with Lisp development files)";
-      homepage = https://next.atlas.engineer;
-      license = licenses.bsd3;
-      maintainers = [ maintainers.lewo ];
-      platforms = [ "x86_64-linux" ];
-    };
-  }
+  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
new file mode 100644
index 00000000000..a71583ffbec
--- /dev/null
+++ b/pkgs/applications/networking/browsers/next/next-gtk-webkit.nix
@@ -0,0 +1,50 @@
+# 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.gst-plugins-base
+    gst_all_1.gstreamer
+  ];
+
+  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" ];
+  };
+}