My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/libraries/rure/default.nix

41 lines
813 B

{ lib
, stdenv
, rustPlatform
, fetchCrate
}:
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"
'';
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 ];
};
}