nixpkgs/pkgs/development/libraries/rure/default.nix
sternenseemann 452f76cfaf rure: init at 0.2.1
Also regenerate hackage-packages.nix so it picks up on the newly added
library and remove the broken flag no haskell.packages.ghc921.regex-rure
which builds fine now (earlier GHC versions bundle incompatible
bytestring versions).
2022-01-24 12:42:14 +01:00

41 lines
813 B
Nix

{ 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 ];
};
}