-
-
Notifications
You must be signed in to change notification settings - Fork 412
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
Running Nyxt on Nix #984
Comments
Thank you for your report and interest! It seems trivial clipboard is not finding xclip on your system. Can you please try installing the latest Nyxt from source? |
I'll need to properly override the Nix derivation which I'm having some problems with. Has someone already done this for HEAD of master? Pinging @nlewo who maintains the package in nixpkgs and might know. So far I have nyxt = next.overrideDerivation (old: {
name = "next";
version = "git";
src = fetchFromGitHub {
owner = "atlas-engineer";
repo = "next";
rev = "54b0639e257d0252171d36e8bfe517f986040080"; # HEAD as of writing
sha256 = "0iba5db8xa2kjizhidmlihg5s82lps6absi1g0gxkv1h135skax3";
fetchSubmodules = true;
};
prePatch = "";
buildPhase = "make all";
}); which fails complaining that it can't find alexandria, but its in |
More likely @walseb can help you, as he has the latest master running on his system. |
I'm pretty sure that's because of the new lisp dependencies added since the old nixpgs version. I will send you my nix file that just fetches everything that's needed after work. But it won't build as a pure build script because it relies on quicklisp to download all the lisp dependencies because cl-containers for example isn't up on nixpkgs. Instead if you want to you it you need to clone this repo and run make inside nix-shell. This issue goes into more detail #753 |
Oh and then you might also run into this problem #925 |
Oh sorry I didn't read your last paragraph. I think the problem there is that you need to put it in native build inputs or whatever it's called. But even if you solve that problem you still need cl-containers which isn't in nixpkgs. |
Sorry I forgot to post until now. This is my shell.nix file. It uses libressl instead of openssl and is a bit messy
|
Nyxt uses the Common Lisp library trivial-clipboard for copy-pasting.
This library leverages xclip or xsel.
The Nix package should put xclip (or xsel) in the input of the
trivial-clipboard package and patch the code to use the store path of xclip.
Alternatively, you could add xclip as a propagated input of Nyxt,
although that's less clean.
|
Thank you! I've added your shell.nix to the repository. Can you produce a standalone executable using the shell.nix file? If so, how do you do it on NixOS? |
In other words, how can we turn your nix shell into a nix package definition? |
The only thing stopping us as discussed in #753 is that Oh and I just noticed, you might want to change |
I see, thank you. Hopefully we can get this packaged for Nix! In the meantime, is there a way to utilize your script to make an executable? |
I am very new to NixOS, and I have used the script verbatim as it is in the shell.nix and I am able to run Nyxt, so I don't know if it is necessary to use |
Great! The way you probably did it (by just using the |
For the record, I just get around that by breaking the sandbox. I'm also not sure my derivation even works for the newest commit |
The following Lisp packages must be added:
The following Lisp packages should be updated if possible:
Then, hopefully we can have it packaged for Nix! |
LispPackages has been updated on nixpkgs master (will reach unstable-small and unstable in a few days respectively). In the mean time, here is a poorly written derivation that seems to work reasonably: https://github.com/bqv/nixrc/blob/live/pkgs/applications/networking/browsers/nyxt/default.nix |
Packages have been very kindly updated by @7c6f434c |
thanks for sharing @bqv, and thank you for following through with your help! |
@bqv how would a user utilize your derivation in the meantime? I tried copying the derivation into a file titled 'default.nix' and then executing the following command: however, I was met with:
|
That particular file, I think you could run with Either way, there is now a bona-fide nyxt package in nixpkgs ( |
that would mean adding the unstable channel and then installing it? yes? |
excuse my ignorance, i am very new to Nix and still trying to wrap my head around many concepts. |
Yes. You might also be able to use the following: # build nyxt and link the result to ./result (it's only in unstable-small so far)
nix-build channel:nixos-unstable-small -A nyxt
# install it, if you want
nix-env -i ./result
# or just run it
./result/bin/nyxt |
I see, thank you. |
@tmplt unless you're still experiencing this error, this can be closed, as it should be solved in the nixpkgs version, which has now reached nixos-unstable |
On 30-10-2020 14:58, Tony O wrote:
@tmplt unless you're still experiencing this error, this can be closed, as it should be solved in the nixpkgs version, which has now reached nixos-unstable
Thanks to all involved for packaging it. My X11 environment have broken
down, however. I'll check the package out when I have fixed it.
|
@jmercouris: Is it working well for you on nixos-unstable?
|
Indeed, the commands are resolved at compile time:
```lisp
(defvar *clipboard-in-command*
#+(or darwin macosx)
"pbcopy"
#+(and :unix (:not :darwin))
(or (executable-find "wl-copy")
(executable-find "/gnu/store/5mh2pln3wmgqk82rarqsbbkv8kkvl6y5-xclip-0.13/bin/xclip")
(executable-find "xsel")
""))
```
So xclip (or xsel) need to be available.
That said, I think this should be resolved at runtime. I'll ping
upstream about it.
|
I'm not sure how to build and use nyxt on Nix.
when having flake enable. Without it, it fails with a different error. |
I have the same issue with
But at the beginning of the build I also get this:
I'd love to start hacking on Nyxt but I don't know much about CL builds yet so not sure I can contribute a fix. |
What I have done is the following:
hopefully that helps! |
Thanks @jmercouris. I tried adding
Maybe the cl-webkit package in nixpkgs is a different (probably lower) version than you expect? |
Ah that's true, it is , I also commented out the code that relied on that! |
Ah, okay. Can you be a bit more specific? In a more general sense, isn't basing the |
I commented out line 865 in renderer-gtk.lisp, which should look like this:
|
You could just comment out the whole |
Thanks @jmercouris, it works now! Of course, this issue should stay open until it's fixed "for real". |
No problem, I am glad to hear it :-) |
i get the same error both with & without flakes, any ideas? |
Have the updates on the Nixpkgs side help anything? |
Indeed they have :-), thank you very much for your help. What they have not completely solved is xclip. I had to install it |
On Wayland, the dependency should be wl-clipboard I think.
|
Hmm. Good question whether to make both mandatory dependencies of trivial-clipboard (by patching in the full paths) |
In Guix, I've made xclip a mandatory dep by patching in the full path.
To be more complete, we could have multiple outputs: the default would
have xclip, then a `wayland` output with wl-tools, and optionally an
`xsel` output with xsel.
|
Hey folks. The nixpkgs version of Nix is still at 2.0.0. I recently figured out how to get it working via overlay. Basically copying the changes from https://github.com/NixOS/nixpkgs/pull/131665/files. In case others are interested: (final: prev: {
lispPackages = prev.lispPackages // {
cl-webkit2 = prev.lispPackages.cl-webkit2.overrideAttrs (oldAttrs:
{
src = prev.fetchFromGitHub {
owner = "joachifm";
repo = "cl-webkit";
rev = "90b1469713265096768fd865e64a0a70292c733d";
sha256 = "sha256:0lxws342nh553xlk4h5lb78q4ibiwbm2hljd7f55w3csk6z7bi06";
};
});
nyxt = prev.lispPackages.nyxt.overrideAttrs (oldAttrs:
{
version = "2.1.1";
src = prev.fetchFromGitHub {
owner = "atlas-engineer";
repo = "nyxt";
rev = "93a2af10f0b305740db0a3232ecb690cd43791f9";
sha256 = "sha256-GdTOFu5yIIL9776kfbo+KS1gHH1xNCfZSWF5yHUB9U8=";
};
});
};
}) |
Follow up question: why was the flake.nix removed? NixOS flakes are quickly becoming a standard feature (https://discourse.nixos.org/t/nix-release-schedule-and-roadmap/14204). Other projects (for example neovim) have a flake.nix. I think it would be keep to stay up to date with a flake (and make it easier for new NixOS users). |
Flakes are not yet a standard feature, when they are, I can re-add them. |
As per updating Nyxt: NixOS/nixpkgs#131665 |
Thanks to @DieracDelta, having done the work previously on [1]. [1]: atlas-engineer/nyxt#984 (comment)
i'd like to see the above flake added to the project. |
Can you please show how a user would build the latest revision using a flake? What commands would they have to type, what would they have to do? |
see also https://nixos.wiki/wiki/Flakes |
Stale. The latest Nyxt should be soon available on Nix. If you find issues with Nyxt on Nix, please contact the Nix maintainers first. The Nix maintainers can request our help so that we figure it out issues together. Thanks. |
Describe the bug
copy-url
,copy-hint-url
, andnext-version
yield the error in the output below.Precise recipe to reproduce the issue
Open any buffer, try to run
copy-url
orcopy-hint-url
. Alternatively try to runnext-version
.Information
OS name+version: NixOS 20.03
Graphics card and driver:
Desktop environment / Window manager name+version: XMonad
How you installed Nyxt (Guix pack, package manager, build from source):
nix-env -Ai nixos.next
Information from command copy-system-information:
If you can't run copy-system-information, please provide the following:
Linux 5.4.54 #1-NixOS
Output when started from a shell
The text was updated successfully, but these errors were encountered: