!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

674 Members
Rust154 Servers

Load older messages


SenderMessageTime
14 Sep 2022
@schuelermine:matrix.orgschuelermineoh are you running vscode in a fhs?17:22:21
@farcaller:matrix.orgfarcallerI'm running vscode on windows and nix in WSL :)17:28:17
@farcaller:matrix.orgfarcallerso it has nothing to do with the frontend because it's pretty far away from nixos17:28:53
@schuelermine:matrix.orgschuelerminehm okay, no idea then!17:37:27
15 Sep 2022
@m_algery:leohoo.xyzm_algery joined the room.12:00:58
@m_algery:leohoo.xyzm_algery left the room.12:01:01
@gianarb:matrix.orgGianluca Arbezzano joined the room.15:09:36
@gianarb:matrix.orgGianluca Arbezzano

Hello! I am not sure if I am doing something that has sense or not. But I would like to build a rust project that does not have a flake.nix checked out in the repo itself. And I would like to avoid that right now. I was thinking about something like this:

{
  description = "";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
    naersk.url = "github:nix-community/naersk";
  };

  outputs = { self, nixpkgs, naersk, ... }:
    let
      system = "x86_64-linux";
    in
    {
      packages.${system}.quarry = naersk.lib.${system}.buildPackage {
        pname = "quarry";
        src = nixpkgs.lib.fetchgit {
          url = "git+ssh://git@github.com/testtest/test";
          rev = "a3f0e0f9d4085b24334b37da5fb7db3cd84188bf";
          sha256 = "69b056298cf570debd3718b2e2cb7e63ad9465919c8190cf38043791ce61d0d6";
        };
      };
    };
}

but I get this error error: attribute 'fetchgit' missing and I am not sure if what I am doing is possible

15:11:16
@farcaller:matrix.orgfarcaller isn't it builtins.fetchGit? 15:12:14
@farcaller:matrix.orgfarcallerhttps://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchGit15:12:25
@gianarb:matrix.orgGianluca ArbezzanoAh you are right! 15:21:28
@gianarb:matrix.orgGianluca ArbezzanoThanks15:21:31
@gianarb:matrix.orgGianluca Arbezzano

I think I have another question, the build process fails because the rust project I am trying to build has a private build-dependency:

[build-dependencies]
buildinfo = { git = "ssh://git@github.com/test/testprivate.git", tag = "0.2.0"}
$ nix build
fetching Git repository 'ssh://git@github.com/test/testprivate.git'fatal: couldn't find remote ref refs/heads/0.2.0
error: program 'git' failed with exit code 128

I can't find if it is supported or not

16:07:40
@gianarb:matrix.orgGianluca Arbezzano *

I think I have another question, the build process fails because the rust project I am trying to build has a private build-dependency:

[build-dependencies]
testprivate = { git = "ssh://git@github.com/test/testprivate.git", tag = "0.2.0"}
$ nix build
fetching Git repository 'ssh://git@github.com/test/testprivate.git'fatal: couldn't find remote ref refs/heads/0.2.0
error: program 'git' failed with exit code 128

I can't find if it is supported or not

16:07:47
@gianarb:matrix.orgGianluca Arbezzano *

(opened an issue for this https://github.com/nix-community/naersk/issues/264)I think I have another question, the build process fails because the rust project I am trying to build has a private build-dependency:

[build-dependencies]
testprivate = { git = "ssh://git@github.com/test/testprivate.git", tag = "0.2.0"}
$ nix build
fetching Git repository 'ssh://git@github.com/test/testprivate.git'fatal: couldn't find remote ref refs/heads/0.2.0
error: program 'git' failed with exit code 128

I can't find if it is supported or not

16:38:47
16 Sep 2022
@tyberius_prime:matrix.orgTyberiusPrime (fiber at home when) changed their display name from TyberiusPrime to TyberiusPrime (fiber at home when).07:37:11
@x10an14:matrix.orgx10an14

Anyone know of any overview that can help me understand the differences so that I can choose between the following (non-exhaustive list):

  • fenix
  • oxalica/rust-overlay
  • naersk
  • lorri (just heard of in the same context after searching this chat)

I want to start a new project, and I have no idea how to choose one...

17:36:00
@x10an14:matrix.orgx10an14 *

Anyone know of any overview that can help me understand the differences so that I can choose between the following (non-exhaustive list):

  • fenix
  • oxalica/rust-overlay
  • naersk
  • lorri (just heard of in the same context after searching this chat)

I want to start a new project, and I have no idea which one(s) to choose...

17:36:21
@jhillyerd:matrix.orgjhillyerdI don't have experience with these tools, but stopped looking into lorri as soon as I saw it didn't support flakes.19:00:53
@a-kenji:matrix.orga-kenji
In reply to @x10an14:matrix.org

Anyone know of any overview that can help me understand the differences so that I can choose between the following (non-exhaustive list):

  • fenix
  • oxalica/rust-overlay
  • naersk
  • lorri (just heard of in the same context after searching this chat)

I want to start a new project, and I have no idea how to choose one...

Do you need a special tool chain, that is not in nixpkgs then use one of the overlays: fenix, or oxalica. They both work. I personally prefer the oxalica one just because I like the UX a little better.
19:35:08
@a-kenji:matrix.orga-kenji
In reply to @x10an14:matrix.org

Anyone know of any overview that can help me understand the differences so that I can choose between the following (non-exhaustive list):

  • fenix
  • oxalica/rust-overlay
  • naersk
  • lorri (just heard of in the same context after searching this chat)

I want to start a new project, and I have no idea how to choose one...

Naersk is a 2nix tool, unless your u need something very specific from it, then I personally don't see a reason to use it.
19:35:59
@a-kenji:matrix.orga-kenji
In reply to @x10an14:matrix.org

Anyone know of any overview that can help me understand the differences so that I can choose between the following (non-exhaustive list):

  • fenix
  • oxalica/rust-overlay
  • naersk
  • lorri (just heard of in the same context after searching this chat)

I want to start a new project, and I have no idea how to choose one...

Lorri is a daemon that allows you to evaluate shells in a non blocking way in the background and it also sets gc roots.
19:38:03
@a-kenji:matrix.orga-kenji* Naersk is a 2nix tool, unless you need something very specific from it, then I personally don't see a reason to use it.19:38:36
@x10an14:matrix.orgx10an14 Thanks a-kenji =) So there's no single location documenting this? It's just tribal knowledge? =) 19:43:42
@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 surfices for many builds: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md .
19:55:43
@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

There are no newer messages yet.


Back to Room ListRoom Version: 6