nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 rustPlatform,
5 python3,
6 fetchFromGitHub,
7 pkg-config,
8 openssl,
9}:
10
11rustPlatform.buildRustPackage rec {
12 pname = "rust-synapse-compress-state";
13 version = "0.1.4";
14
15 src = fetchFromGitHub {
16 owner = "matrix-org";
17 repo = "rust-synapse-compress-state";
18 rev = "v${version}";
19 hash = "sha256-nNQ/d4FFAvI+UY+XeqExyhngq+k+j5Pkz94ch27aoVM=";
20 };
21
22 cargoHash = "sha256-l8N6+xh0CbFKt4eEbSAvUJ5oHxhp5jf2YHLheYAegnU=";
23
24 cargoBuildFlags = [
25 "--all"
26 ];
27
28 # Needed to get openssl-sys to use pkgconfig.
29 env.OPENSSL_NO_VENDOR = 1;
30
31 nativeBuildInputs = [
32 python3
33 pkg-config
34 ];
35
36 buildInputs = [ openssl ];
37
38 meta = {
39 broken = stdenv.hostPlatform.isDarwin;
40 description = "Tool to compress some state in a Synapse instance's database";
41 homepage = "https://github.com/matrix-org/rust-synapse-compress-state";
42 license = lib.licenses.asl20;
43 maintainers = with lib.maintainers; [
44 hexa
45 maralorn
46 ];
47 };
48}