1{ lib
2, rustPlatform
3, fetchFromGitHub
4, rust-cbindgen
5}:
6
7rustPlatform.buildRustPackage rec {
8 pname = "orz";
9 version = "1.6.2";
10
11 src = fetchFromGitHub {
12 owner = "richox";
13 repo = "orz";
14 rev = "v${version}";
15 hash = "sha256-Yro+iXlg18Pj/AkU4IjvgA88xctK65yStfTilz+IRs0=";
16 };
17
18 cargoHash = "sha256-aUsRbIajBP6esjW7Wj7mqIkbYUCbZ2GgxjRXMPTnHYg=";
19
20 outputs = [ "out" "dev" "lib" ];
21
22 nativeBuildInputs = [
23 rust-cbindgen
24 ];
25
26 postInstall = ''
27 cbindgen -o $dev/include/orz.h
28
29 mkdir -p $lib
30 mv $out/lib "$lib"
31 '';
32
33 meta = with lib; {
34 description = "A high performance, general purpose data compressor written in rust";
35 homepage = "https://github.com/richox/orz";
36 license = licenses.mit;
37 maintainers = with maintainers; [ figsoda ];
38 };
39}