!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

712 Members
Rust163 Servers

Load older messages


SenderMessageTime
16 Sep 2022
@a-kenji:matrix.orga-kenji
In reply to @x10an14:matrix.org
Thanks a-kenji =) So there's no single location documenting this? It's just tribal knowledge? =)
* It is sometimes hard to surface the correct information, maybe that could be tribal knowledge. I find the overview here to be quite good: https://nixos.wiki/wiki/Rust, here is a more in depth one on the nixpkgs specific rust builder, which probably suffices for many builds: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md .
19:56:37
20 Sep 2022
@tengkuizdihar:matrix.orgIzdihar

Hello, anyone knows how to include a dependency so it's usable by the dependecy of a package? Right now I'm trying to build the latest version of lapce (text editor written in rust) but got error explained in the discussion. Basically a dependency called tree-sitter-markdown tries to include a dependency that I have no idea how to include.

  • discussion: https://github.com/NixOS/nixpkgs/issues/191563
  • code: https://github.com/NixOS/nixpkgs/blob/d36fd0a6f00653b3ce99537ae38878b0c597f866/pkgs/applications/editors/lapce/default.nix
12:40:25
@linus:schreibt.jetztLinux Hackerman That's usually addressed by wrapping the program as a GTK app, often just adding wrapGAppsHook to nativeBuildInputs is enough 12:42:27
@linus:schreibt.jetztLinux Hackermanwait no, that's for the gsettings schemas thing12:44:42
@linus:schreibt.jetztLinux Hackermanwhat's tree-sitter-markdown got to do with that?12:44:51
@tengkuizdihar:matrix.orgIzdihar It seems that when it tries to compile one of the rust dependencies of Lapce (tree-sitter-markdown), this dependency tries to find a file that doesn't exist. Here is the log, also available in the discussion Linux Hackerman 12:47:13
@linus:schreibt.jetztLinux HackermanI just don't understand why you've commented on the gsettings schemas issue, what's that got to do with it?12:48:03
@linus:schreibt.jetztLinux Hackerman(that's not a criticism necessarily, I just don't understand)12:48:45
@tengkuizdihar:matrix.orgIzdiharits ok, I know it's not criticism I commented on this issue because I hope that by bumping the version, that issue could be fixed12:50:04
@tengkuizdihar:matrix.orgIzdiharAnd the tree-sitter-markdown thing happened because I'm trying to bump the version from 0.1.2 to 0.212:50:35
@linus:schreibt.jetztLinux Hackermanriiiight12:50:41
@linus:schreibt.jetztLinux Hackermanyeah I'm 99% sure that won't fix the issue, you want wrapGAppsHook as mentioned before :)12:50:59
@linus:schreibt.jetztLinux Hackermanbut looking at tree-sitter-markdown I think it's a bug in its build: it assumes that you're building it with the source tree as the working directory https://github.com/dzhou121/tree-sitter-markdown/blob/split_parser/bindings/rust/build.rs#L212:51:15
@linus:schreibt.jetztLinux Hackermanwhich is probably not the case12:51:19
@tengkuizdihar:matrix.orgIzdihar
In reply to @linus:schreibt.jetzt
yeah I'm 99% sure that won't fix the issue, you want wrapGAppsHook as mentioned before :)
alright I'll do this to my PR thank you
12:52:13
@tengkuizdihar:matrix.orgIzdiharThis guy seems to get it and add a flake to build lapce. I don't know what he does differently though. Maybe because he's using crane instead of buildRustPackage?12:54:06
@tengkuizdihar:matrix.orgIzdiharCan we even use crane in nixpkgs?12:55:28
@tengkuizdihar:matrix.orgIzdihar
In reply to @tengkuizdihar:matrix.org
This guy seems to get it and add a flake to build lapce. I don't know what he does differently though. Maybe because he's using crane instead of buildRustPackage?
forgot to add the link lol https://github.com/lapce/lapce/issues/1049#issuecomment-1251641329
Linux Hackerman
12:56:17
@linus:schreibt.jetztLinux HackermanPossibly crane makes the difference, I don't know anything about it12:57:32
@linus:schreibt.jetztLinux HackermanI suspect we can't use it in nixpkgs, but again I don't know anything about it so 🤷12:58:07
@tengkuizdihar:matrix.orgIzdihar
In reply to @linus:schreibt.jetzt
I suspect we can't use it in nixpkgs, but again I don't know anything about it so 🤷
searched it in nixpkgs, no crane 👌
12:58:32
@tengkuizdihar:matrix.orgIzdihar someone literally just jumps in and said try this and I'm trying it. If it's working, what a chad. 13:03:32
@pareto-optimal-dev:matrix.orgpareto-optimal-dev joined the room.13:43:22
@tengkuizdihar:matrix.orgIzdihar Linux Hackerman: does it need to be in nativebuildinputs or can I also put it in buildInputs? I've accidentally done that and the issue persists... 14:13:12
@linus:schreibt.jetztLinux HackermanNot 100% sure but I do think it's supposed to be in nativeBuildInputs14:13:34
@gianarb:matrix.orgGianluca Arbezzano left the room.14:22:18
@gianarb:matrix.orgGianluca Arbezzano joined the room.14:22:46
@tengkuizdihar:matrix.orgIzdihar yep still the same error in nativeBuildInputs lmao Linux Hackerman 14:34:18
@linus:schreibt.jetztLinux Hackerman Izdihar: ah, I think you also need gsettings-desktop-schemas in buildInputs 14:36:40
@tengkuizdihar:matrix.orgIzdihar
In reply to @linus:schreibt.jetzt
Izdihar: ah, I think you also need gsettings-desktop-schemas in buildInputs
alright, its building time
14:37:17

Show newer messages


Back to Room ListRoom Version: 6