7GVHKOLT4RH2LXZKIYWU2MCFMQEF5BGPE7VIMADDXFALWIL6RKLQC
O2CDACIIEOLVVBQPBFT5U5DYQXLSLPUD4VB5QQBNJTUMFDDKHS2AC
ENWJBQGQUL3KLYPVGYP2ZSDB5ZUXLTY4W6NCHUA6VTHRRNPRUDHAC
POBHKKNGVKC5M7ANC4I6BDU225AUP5IV5WPG63SDX3KYXRPC4PLAC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
VN6L65VRWLKTIXY7XD7OOZBMNKNSIEJG6PJUX5NKKYVYGVG4DFTAC
G734WNM64AR5BLAZMN5MDPKSFTYXTUQR6MAGB32NRBC5FXFRWSJAC
Q4XPH27LXW4Q343HV3HCBXSHVJ5J7ESBHZHMQKSVTXM2QYKVXVJAC
OP6UAT256FO65GXT64U4XWU2PCRKCYV7Q5YZLSROAO7Q2IFDZ7OQC
{
lib,
clangStdenv,
cargo,
darwin,
libiconv,
libsodium,
openssl,
pkg-config,
rustPlatform,
rustc,
}: let
cargoMeta = builtins.fromTOML (builtins.readFile ./pijul/Cargo.toml);
in
clangStdenv.mkDerivation (self: {
pname = cargoMeta.package.name;
version = cargoMeta.package.version;
src = ./.;
buildAndTestSubdir = "pijul";
doCheck = true;
cargoBuildType = "release";
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [
cargo
libiconv
pkg-config
rustc
];
buildInputs =
[
libsodium
openssl
rustPlatform.cargoBuildHook
rustPlatform.cargoInstallHook
rustPlatform.cargoSetupHook
]
++ lib.optionals clangStdenv.isDarwin [
darwin.apple_sdk.frameworks.SystemConfiguration
];
})
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = builtins.attrValues {
inherit (pkgs)
cargo
libiconv
pkg-config
rustc
;
};
buildInputs = builtins.attrValues (
{
inherit (pkgs)
libsodium
openssl
;
inherit (pkgs.rustPlatform)
cargoBuildHook
cargoInstallHook
cargoSetupHook
;
}
// nixpkgs.lib.optionalAttrs (pkgs.stdenv.isDarwin) {
inherit (pkgs.darwin.apple_sdk.frameworks)
SystemConfiguration
;
}
);
});