Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next: Fix #74258 #74265

Merged
merged 1 commit into from Nov 29, 2019
Merged

next: Fix #74258 #74265

merged 1 commit into from Nov 29, 2019

Conversation

worldofpeace
Copy link
Contributor

Commit message

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

Description of change

This is meant to fix #74258.

According to the Next documentation at https://github.com/atlas-engineer/next/tree/master/ports#next-platform-ports, the only part of Next that needs to be treated like a gtk app is the webkitgtk platform port.
To fix this issue we just wrapped this program like any other gtk app, as pre the documentation

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

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
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

seems to hang when trying to go to google.com

@worldofpeace
Copy link
Contributor Author

In a pure nix-shell I see the following in the logs
/home/worldofpeace/.local/share/next/next-gtk-webkit.log

Failed to load TLS database: Failed to load system trust store: Error while reading file.

when visiting google.com. Not other websites though.

As this has been reported upstream, I'm going to assume it's a bug

@jonringer
Copy link
Contributor

if it's an upstream issue, then I'm fine with the change :)

@nlewo
Copy link
Member

nlewo commented Nov 27, 2019

Just note I exposed the next-browser-webkit package to allow users to override it.
But I'm not opposed to the current change.

@worldofpeace Are you using a formatting tool?

Otherwise, I locally tested this PR which works well!

@worldofpeace
Copy link
Contributor Author

worldofpeace commented Nov 29, 2019

@worldofpeace Are you using a formatting tool?

Yeah, nixpkgs-fmt and some of my personal stylistic opinions https://discourse.nixos.org/t/document-attribute-ordering-in-package-expressions/4887.

@worldofpeace
Copy link
Contributor Author

Just note I exposed the next-browser-webkit package to allow users to override it.
But I'm not opposed to the current change.

I'm not sure why it has be separate, and not like all-in-one in the build with some sort of flag.

@worldofpeace worldofpeace merged commit 6687a4a into NixOS:master Nov 29, 2019
@worldofpeace worldofpeace deleted the next-fix branch November 29, 2019 02:51
];

makeFlags = [
"gtk-webkit"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be in buildFlags.

@jtojnar
Copy link
Contributor

jtojnar commented Jan 3, 2020

I tried

diff --git a/pkgs/applications/networking/browsers/next/default.nix b/pkgs/applications/networking/browsers/next/default.nix
index 97c65fc12ef..6cc5316c098 100644
--- a/pkgs/applications/networking/browsers/next/default.nix
+++ b/pkgs/applications/networking/browsers/next/default.nix
@@ -3,6 +3,8 @@
 , lispPackages
 , sbcl
 , callPackage
+, libfixposix
+, xclip
 }:
 
 let
@@ -59,6 +61,7 @@ stdenv.mkDerivation rec {
     trivia
     trivial-clipboard
     unix-opts
+    quicklisp
   ];
 
   prePatch = ''
@@ -66,16 +69,23 @@ stdenv.mkDerivation rec {
       --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
+  preConfigure = ''
+    export HOME=$TMPDIR
   '';
 
-  installPhase = ''
-    install -D -m0755 next $out/bin/next
-  '';
+  makeFlags = [
+    "PREFIX=${placeholder ''out''}"
+    "NEXT_INTERNAL_QUICKLISP=false"
+  ];
+
+  buildFlags = [
+    "next"
+  ];
+
+  installTargets = [
+    "install-next"
+    "install-assets"
+  ];
 
   # Stripping destroys the generated SBCL image
   dontStrip = true;

to see if it fixes #76838 but it failed with

  Package QL does not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gsettings-desktop-schemas dep missing for Next browser
4 participants