Skip to content

Commit

Permalink
hardcode target
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-aitlahcen committed Jul 30, 2024
1 parent 746cf12 commit 5fdf997
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion mpc/mpc.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
{ self, ... }: {
perSystem = { self', pkgs, crane, ... }:
perSystem = { self', pkgs, crane, system, ... }:
let
throwBadSystem = throw "mpc cannot be built on system `${system}`";

attrs = {
rustflags = "-L${self'.packages.galoisd-library}/lib";
CARGO_BUILD_TARGET =
if system == "aarch64-linux" then
"aarch64-unknown-linux-musl"
else if system == "x86_64-linux" then
"x86_64-unknown-linux-musl"
else if system == "aarch64-darwin" then
"aarch64-apple-darwin"
else if system == "x86_64-darwin" then
"x86_64-apple-darwin"
else
throwBadSystem;
};
mpc-client = crane.buildWorkspaceMember (attrs // {
crateDirFromRoot = "mpc/client";
Expand Down

0 comments on commit 5fdf997

Please sign in to comment.