!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

710 Members
Rust162 Servers

Load older messages


SenderMessageTime
9 Oct 2022
@figsoda:matrix.orgfigsodaWhat do you guys think about deprecating carnix and cratesIO? https://github.com/NixOS/nixpkgs/issues/19527920:45:36
11 Oct 2022
@gvolpe:matrix.orggvolpe joined the room.09:35:14
@gvolpe:matrix.orggvolpe

trying to package an application that needs mpv at runtime, seems to be using this (quite abandoned) project: https://github.com/ParadoxSpiral/libmpv-rs

the application builds but I can't get it to play any music. mpv by itself works fine. Does anyone have any idea on how to fix this?

https://github.com/gvolpe/ytui-music-nix

09:42:30
12 Oct 2022
@m1-s:matrix.orgm1-s joined the room.11:49:57
@m1-s:matrix.orgm1-sHi, has anyone gotten cargo-udeps working in nix? it requires nightly rust which I can get from the oxalica overlay but I do not know how I call pkgs.cargo-udeps with the nightly rust version.11:52:43
@a-kenji:matrix.orga-kenji Since you got the nightly from the overlay, if it is applied to pkgs, then shouldn't you have the nightly toolchain in scope? 11:54:31
@a-kenji:matrix.orga-kenjiI am not home currently, but will check it out later.11:54:44
@m1-s:matrix.orgm1-s

i tried something like this:

          udeps-wrapper = pkgs.symlinkJoin {
              name = "cargo-udeps-wrapped";
              paths = [ pkgs.cargo-udeps ];
              nativeBuildInputs = [ pkgs.makeWrapper ];
              postBuild = ''
                wrapProgram $out/bin/cargo-udeps \
                  --prefix PATH : ${pkgs.lib.makeBinPath [ rustNightly ]}
              '';
            };

somehow its not working. will have to retry later.

12:51:44
@m1-s:matrix.orgm1-s *

i tried something like this:

            udeps-wrapper = pkgs.symlinkJoin {
              name = "cargo-udeps-wrapped";
              paths = [ pkgs.cargo-udeps ];
              nativeBuildInputs = [ pkgs.makeWrapper ];
              postBuild = ''
                wrapProgram $out/bin/cargo-udeps \
                  --prefix PATH : ${pkgs.lib.makeBinPath [ rustNightly ]}
              '';
            };

somehow its not working. will have to retry later.

12:51:50
@shane:sveller.socialshanesvellerThat's somewhat close to how I do it and it's working for me, let me see what I had13:34:14
@shane:sveller.socialshanesvellerah no nm I just have it as separate devShells that I use on the fly when I need to call udeps13:36:33
@shane:sveller.socialshanesvellerI would expect your version to be roughly correct though, depending on how rustNightly is defined13:37:07
@shane:sveller.socialshanesveller ie pkgs.rust-bin.nightly.latest.default 13:37:49
@a-kenji:matrix.orga-kenji

Yeah, I think it does work: ``` (pkgs.symlinkJoin {
name = "cargo-udeps-wrapped";
paths = [ pkgs.cargo-udeps ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/cargo-udeps
--prefix PATH : ${pkgs.lib.makeBinPath [
(pkgs.rust-bin.selectLatestNightlyWith
(toolchain: toolchain.default))
]}
'';
})

13:38:06
@a-kenji:matrix.orga-kenji *

Yeah, I think it does work: ``` (pkgs.symlinkJoin {
name = "cargo-udeps-wrapped";
paths = [ pkgs.cargo-udeps ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/cargo-udeps
--prefix PATH : ${pkgs.lib.makeBinPath [
(pkgs.rust-bin.selectLatestNightlyWith
(toolchain: toolchain.default))
]}
'';
})

13:38:20
@a-kenji:matrix.orga-kenji *

Yeah, I think it does work:

       (pkgs.symlinkJoin {
          name = "cargo-udeps-wrapped";
          paths = [ pkgs.cargo-udeps ];
          nativeBuildInputs = [ pkgs.makeWrapper ];
          postBuild = ''
            wrapProgram $out/bin/cargo-udeps \
              --prefix PATH : ${pkgs.lib.makeBinPath [
              (pkgs.rust-bin.selectLatestNightlyWith
                (toolchain: toolchain.default))
            ]}
          '';
        })
13:38:38
@m1-s:matrix.orgm1-scool. thanks for your confirmation. i will retry.13:40:01
@m1-s:matrix.orgm1-sSo I have retried and it is somewhat working except that it requires internet access because it wants to lookup https://github.com/rust-lang/crates.io-index. Is there any way to avoid this so I can use udeps in the nix sandbox?17:06:45
@m1-s:matrix.orgm1-s * So I have retried and it is somewhat working except that it requires internet access because it wants to lookup https://github.com/rust-lang/crates.io-index. Is there any way to avoid this so I can use udeps in the nix sandbox? 17:07:04
13 Oct 2022
@charles:computer.surgeryCharles ⚡️ joined the room.03:09:06
@charles:computer.surgeryCharles ⚡️ is there any reason why buildRustPackage doesn't use builtins.fetchGit for cargo git deps? my understanding is that that would make it so you don't need to specify anything for cargoLock.outputHashes 15:47:15
@benjamin:computer.surgerybenjamin ⚡️ joined the room.16:36:07
@shane:sveller.socialshanesvellerfetchGit itself would still need to receive a checksum for purity, wouldn't it?19:07:40
@charles:computer.surgeryCharles ⚡️i thought not requiring a checksum and relying on the commit hash was the point of fetchGit19:10:11
@charles:computer.surgeryCharles ⚡️https://nixos.org/manual/nix/stable/language/builtins.html#builtins-fetchGit19:10:12
15 Oct 2022
@tinybronca:sibnsk.netunderpantsgnome! changed their display name from underpantsgnome to underpantsgnome!.00:31:14
16 Oct 2022
@charles:computer.surgeryCharles ⚡️ is it harmful to always use stdenv = pkgs.clangStdenv even if you don't use bindgen? 00:15:13
@charles:computer.surgeryCharles ⚡️i ask because i have a project template for nix + rust projects, and including that (and setting the right environment variable to the right thing) is straightforward but only if you know that's a thing you have to do00:15:55
@charles:computer.surgeryCharles ⚡️ so i'm thinking it could be beneficial to just always use clangStdenv by default from a usability standpoint 00:16:28
@charles:computer.surgeryCharles ⚡️i suppose i could also include it but have it be commented by default with a note like "uncomment this if you use bindgen"00:17:14

Show newer messages


Back to Room ListRoom Version: 6