nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4
5 fetchFromGitHub,
6 fetchYarnDeps,
7
8 cargo,
9 cargo-tauri_1,
10 cmake,
11 jq,
12 moreutils,
13 nodejs-slim,
14 pkg-config,
15 rustc,
16 rustPlatform,
17 yarnConfigHook,
18
19 cyrus_sasl,
20 freetype,
21 libsoup_2_4,
22 openssl,
23}:
24
25stdenv.mkDerivation rec {
26 pname = "insulator2";
27 version = "2.13.2";
28
29 src = fetchFromGitHub {
30 owner = "andrewinci";
31 repo = "insulator2";
32 rev = "v${version}";
33 hash = "sha256-34JRIB7/x7miReWOxR/m+atjfUiE3XGyh9OBSbMg3m4=";
34 };
35
36 patches = [
37 # see: https://github.com/andrewinci/insulator2/pull/733
38 ./fix-rust-1.80.0.patch
39 ];
40
41 # Yarn *really* wants us to use corepack if this is set
42 postPatch = ''
43 jq 'del(.packageManager)' package.json | sponge package.json
44 '';
45
46 yarnOfflineCache = fetchYarnDeps {
47 yarnLock = "${src}/yarn.lock";
48 hash = "sha256-5wOgVrcHJVF07QpnN52d4VWEM3FKw3NdLrZ1goAP2oI=";
49 };
50
51 cargoDeps = rustPlatform.importCargoLock {
52 lockFile = ./Cargo.lock;
53 outputHashes = {
54 "apache-avro-0.16.0" = "sha256-v4TeJEhLEqQUgj+EHgFRVUGoLC+SpOUhAXngMP7R7nM=";
55 "rust-keystore-0.1.1" = "sha256-Cj64uJFZNxnrplhRuqf9/HK/RAaawzfYHo/J9snZ+TU=";
56 };
57 };
58
59 cargoRoot = "backend/";
60 buildAndTestSubdir = cargoRoot;
61
62 strictDeps = true;
63
64 dontUseCmakeConfigure = true;
65
66 nativeBuildInputs = [
67 cargo
68 cargo-tauri_1.hook
69 cmake
70 jq
71 moreutils # for sponge
72 nodejs-slim
73 pkg-config
74 rustc
75 rustPlatform.cargoSetupHook
76 yarnConfigHook
77 ];
78
79 buildInputs = [
80 cyrus_sasl
81 freetype
82 libsoup_2_4
83 openssl
84 # webkitgtk_4_0
85 ];
86
87 env.OPENSSL_NO_VENDOR = 1;
88
89 meta = {
90 # webkitgtk_4_0 was removed
91 broken = true;
92 description = "Client UI to inspect Kafka topics, consume, produce and much more";
93 homepage = "https://github.com/andrewinci/insulator2";
94 license = lib.licenses.gpl3Only;
95 maintainers = with lib.maintainers; [ tc-kaluza ];
96 mainProgram = "insulator-2";
97 };
98}