mirror of
https://github.com/chatmail/core.git
synced 2026-09-22 13:01:21 +03:00
27 lines
653 B
Nix
27 lines
653 B
Nix
{ pkgs, fenixToolchain, rustSrc, cargoLock, fenixPkgs, version }:
|
|
let
|
|
rustPlatform = (pkgs.makeRustPlatform {
|
|
cargo = fenixToolchain;
|
|
rustc = fenixToolchain;
|
|
});
|
|
in
|
|
pkgs.stdenv.mkDerivation {
|
|
pname = "libdeltachat";
|
|
inherit version;
|
|
src = rustSrc;
|
|
cargoDeps = pkgs.rustPlatform.importCargoLock cargoLock;
|
|
|
|
nativeBuildInputs = [
|
|
pkgs.perl # Needed to build vendored OpenSSL.
|
|
pkgs.cmake
|
|
rustPlatform.cargoSetupHook
|
|
fenixPkgs.stable.rustc
|
|
fenixPkgs.stable.cargo
|
|
];
|
|
|
|
postInstall = ''
|
|
substituteInPlace $out/include/deltachat.h \
|
|
--replace __FILE__ '"${placeholder "out"}/include/deltachat.h"'
|
|
'';
|
|
}
|