mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
bc6c2ee545
This hasn't been an issue on x86_64, but running it anyways shouldn't hurt. aarch64-darwin's trouble could be due to codesigning? Besides that there don't seem to be many differences between the actual derivations. This also unbreaks the test suite of regex-rure.
47 lines
932 B
Nix
47 lines
932 B
Nix
{ lib
|
|
, stdenv
|
|
, rustPlatform
|
|
, fetchCrate
|
|
, fixDarwinDylibNames
|
|
}:
|
|
|
|
let
|
|
pin = lib.importJSON ./pin.json;
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
|
inherit (pin) pname version;
|
|
|
|
src = fetchCrate pin;
|
|
|
|
# upstream doesn't ship a Cargo.lock, is generated by the update script
|
|
postPatch = ''
|
|
cp ${./Cargo.lock} Cargo.lock
|
|
'';
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
# Headers are not handled by cargo nor buildRustPackage
|
|
postInstall = ''
|
|
install -Dm644 include/rure.h -t "$dev/include"
|
|
'';
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
fixDarwinDylibNames
|
|
];
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
meta = {
|
|
description = "A C API for Rust's regular expression library";
|
|
homepage = "https://crates.io/crates/rure";
|
|
license = [
|
|
lib.licenses.mit
|
|
lib.licenses.asl20
|
|
];
|
|
maintainers = [ lib.maintainers.sternenseemann ];
|
|
};
|
|
}
|