Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Marc
@corpsmoderne@mamot.fr  ·  activity timestamp 2 days ago

Ok fixed that. I had to remove the cargoLock block and add cargoHash = "" and after that the fix.1 was useful.

But now I'm back at it not building because one dep present in the workspace is missing. How to you build a single #rust executable package from a workspace with #nix ? I don't want the dep to be it's own nix package so far.

  • Copy link
  • Flag this post
  • Block
Marc
@corpsmoderne@mamot.fr replied  ·  activity timestamp 2 days ago

Back at it; in the end my problem is that cargo build fails because it can't find openssl (and pkg-config). I've tried to add:

buildInputs = [ pkgs.openssl pkgs.pkg-config ];

I've also tried with nativeBuildInputs, changed nothing.

The doc I've found ( https://nixos.org/manual/nixpkgs/stable/#compiling-rust-applications-with-cargo ) was not very helpful. Where can I find the full description of all the configuration options of buildRustPackage ? Surely there's something I'm doing wrong, but what?

#nix #nixos

  • Copy link
  • Flag this comment
  • Block
Marc
@corpsmoderne@mamot.fr replied  ·  activity timestamp 2 days ago

ok ok I'm almost there but I really struggle to navigate the documentation 😥

My app needs an assets/ directory to function, which is in the repo I'm building. I'd like to add it to my rust package, or just to the docker image, but I fail do to either. I tried to use installPhase but doing so I've lost the binary and was unable to add it again... #nix

  • Copy link
  • Flag this comment
  • Block
Paul Meyer
@katexochen@infosec.exchange replied  ·  activity timestamp yesterday

@corpsmoderne try postInstall, that won't overwrite the builders installPhase completely but lets you add some additional commands instead.

  • Copy link
  • Flag this comment
  • Block
Marie
@marie@chaos.social replied  ·  activity timestamp 2 days ago

@corpsmoderne pkg-config needs to be in nativeBuildInputs, openssl in buildInputs

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0-rc.3.13 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login