mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-15 19:28:00 +01:00
- testDeps should be separate, in nativeBuildInputs to allow for disabling checks. - rust should be a native dependency as it doesn't need to be put nowhere next to the resulting binary.
39 lines
726 B
Nix
39 lines
726 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
rust-bin, # From overlay
|
|
makeRustPlatform,
|
|
packageToml,
|
|
rust,
|
|
libiconv,
|
|
darwin,
|
|
python3,
|
|
}: let
|
|
mkPackage = rust:
|
|
(makeRustPlatform {
|
|
cargo = rust;
|
|
rustc = rust;
|
|
})
|
|
.buildRustPackage {
|
|
pname = packageToml.name;
|
|
inherit (packageToml) version;
|
|
|
|
src = builtins.path {
|
|
path = ./.;
|
|
inherit (packageToml) name;
|
|
};
|
|
|
|
dontUseCargoParallelTests = true;
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
nativeBuildInputs = [ rust ];
|
|
buildInputs = (lib.optional stdenv.isDarwin [
|
|
libiconv
|
|
darwin.apple_sdk.frameworks.Foundation
|
|
]);
|
|
|
|
nativeCheckInputs = [python3];
|
|
};
|
|
in (mkPackage rust-bin.stable.latest.minimal)
|