!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

710 Members
Rust162 Servers

Load older messages


SenderMessageTime
14 Sep 2022
@x10an14:matrix.orgx10an14
In reply to @farcaller:matrix.org
arrterian.nix-env-selector didn't do anything useful for me :( what did you set rust-analyzer.server.path to?

To answer your question;

{
  "rust-analyzer.server.path": "rust-analyzer" 
}
15:38:16
@farcaller:matrix.orgfarcallerah huh.15:58:26
@schuelermine:matrix.orgschuelermine farcaller: maybe you need to set the environment variable RUST_SRC_PATH to ${rustPlatform.rustLibSrc}? 17:11:23
@farcaller:matrix.orgfarcaller
In reply to @schuelermine:matrix.org
farcaller: maybe you need to set the environment variable RUST_SRC_PATH to ${rustPlatform.rustLibSrc}?
what's rustPlatform? where is it coming from?
17:13:24
@schuelermine:matrix.orgschuelermine sorry, I mean pkgs.rustPlatform.rustLibSrc 17:13:54
@schuelermine:matrix.orgschuelermineat any rate that was the issue I had which made VSCode not work17:14:16
@farcaller:matrix.orgfarcallerno cricket, same glibc issue :(17:19:06
@farcaller:matrix.orgfarcallerthanks for the idea, still.17:19:15
@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

Show newer messages


Back to Room ListRoom Version: 6