nixpkgs/pkgs/tools/graphics/resvg/default.nix

34 lines
816 B
Nix

{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "resvg";
version = "0.34.0";
src = fetchFromGitHub {
owner = "RazrFalcon";
repo = pname;
rev = "v${version}";
hash = "sha256-S0HhaZ8zHcuMmo9mSJwmUXnDExMBsv176lrM9YmSEg8=";
};
cargoHash = "sha256-SFQ2w/Um1hgpy+cz+OZoaLjvJPcOa5Wc29v66pt+k3g=";
cargoBuildFlags = [
"--package=resvg"
"--package=resvg-capi"
"--package=usvg"
];
postInstall = ''
install -Dm644 -t $out/include crates/c-api/*.h
'';
meta = with lib; {
description = "An SVG rendering library";
homepage = "https://github.com/RazrFalcon/resvg";
changelog = "https://github.com/RazrFalcon/resvg/raw/v${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = [ maintainers.marsam ];
};
}