Skip to content

How to use with a build script #115

Answered by dpc
justinrubek asked this question in Q&A
Sep 22, 2022 · 3 comments · 6 replies
Discussion options

You must be logged in to vote

@justinrubek Here is a workaround

> git diff HEAD
diff --git a/flake.nix b/flake.nix
index 2e08534..dd03611 100644
--- a/flake.nix
+++ b/flake.nix
@@ -35,14 +35,19 @@
         inputs',
         ...
       }: let
-        toolchain = inputs'.fenix.packages.minimal.toolchain;
+        toolchain = inputs'.fenix.packages.stable.toolchain;
 
         craneLib = inputs.crane.lib.${system}.overrideToolchain
           toolchain;
+
+
       in rec {
         packages = {
           default = craneLib.buildPackage {
             src = ./.;
+
+            buildInputs = [ pkgs.protobuf ];
+            cargoBuildCommand = "touch crates/example/build.rs && cargo build --profile release";
           };…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@dpc
Comment options

@dpc
Comment options

@dpc
Comment options

@justinrubek
Comment options

Comment options

You must be logged in to vote
2 replies
@dpc
Comment options

@ipetkov
Comment options

Answer selected by justinrubek
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants