-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build deltachat-rpc-server for macOS with Nix #6095
Comments
How did you create the current flake.nix? Because it seems like there is a lot of repetition in there |
mkCrossRustPackage = arch: packageName:
let
rustTarget = arch2targets."${arch}".rustTarget;
crossTarget = arch2targets."${arch}".crossTarget;
pkgsCross = import nixpkgs {
system = system;
crossSystem.config = crossTarget;
};
in
let
toolchain = fenixPkgs.combine [
fenixPkgs.stable.rustc
fenixPkgs.stable.cargo
fenixPkgs.targets.${rustTarget}.stable.rust-std
];
naersk-lib = pkgs.callPackage naersk {
cargo = toolchain;
rustc = toolchain;
};
in
naersk-lib.buildPackage {
pname = packageName;
cargoBuildOptions = x: x ++ [ "--package" packageName ];
version = manifest.version;
strictDeps = true;
src = rustSrc;
nativeBuildInputs = [
pkgs.perl # Needed to build vendored OpenSSL.
];
auditable = false; # Avoid cargo-auditable failures.
doCheck = false; # Disable test as it requires network access.
CARGO_BUILD_TARGET = rustTarget;
#TARGET_CC = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc";
CARGO_BUILD_RUSTFLAGS = [
"-C"
#"linker=${TARGET_CC}"
];
#CC = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc";
#LD = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc";
};
```
I had to comment out some definitions here because otherwise, I would get infinite recursion.
This has to be looked in also when someone tries this. |
This is what the PR linked above is fixing. |
Wrote it over time. It's not autogenerated or something. |
The macos changes hit unstable. I tried to build in locally, but there are still some problems. |
On git commit e117efa
Running
Full log:
The command being run is |
Tried to compile on GitHub Actions:
Runner image is macos-14-arm64 |
Draft PR is at #5326 |
This depends on NixOS/nixpkgs#346043
We need to wait for this PR to reach nixpkgs-unstable, PR propagation can be tracked at https://nixpk.gs/pr-tracker.html?pr=346043
The text was updated successfully, but these errors were encountered: