Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, rustPlatform, fetchFromGitHub }: 2 3rustPlatform.buildRustPackage rec { 4 pname = "resvg"; 5 version = "0.34.1"; 6 7 src = fetchFromGitHub { 8 owner = "RazrFalcon"; 9 repo = pname; 10 rev = "v${version}"; 11 hash = "sha256-4sjjd2IKca4NBTCTxhdqdxuzjEMKc85ckRNrNSjhUnE="; 12 }; 13 14 cargoHash = "sha256-PEJjtrsQF4h9rCP1DFFP5EFjW/6ZMgdMCawIc9cW76s="; 15 16 cargoBuildFlags = [ 17 "--package=resvg" 18 "--package=resvg-capi" 19 "--package=usvg" 20 ]; 21 22 postInstall = '' 23 install -Dm644 -t $out/include crates/c-api/*.h 24 ''; 25 26 meta = with lib; { 27 description = "An SVG rendering library"; 28 homepage = "https://github.com/RazrFalcon/resvg"; 29 changelog = "https://github.com/RazrFalcon/resvg/raw/v${version}/CHANGELOG.md"; 30 license = licenses.mpl20; 31 maintainers = [ maintainers.marsam ]; 32 }; 33}