nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 nix-update-script,
6}:
7
8rustPlatform.buildRustPackage (finalAttrs: {
9 pname = "dumbpipe";
10 version = "0.33.0";
11
12 src = fetchFromGitHub {
13 owner = "n0-computer";
14 repo = "dumbpipe";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-8iubiYZTOCGD7BjqMDnOi3Or1b7cYffL2HBEikUCXF8=";
17 };
18
19 cargoHash = "sha256-nc/xGi+9kX9OAGLs2uTHMp8Z9+6DLKTvVki2RgNAUV0=";
20
21 __darwinAllowLocalNetworking = true;
22
23 # On Darwin, dumbpipe invokes CoreFoundation APIs that read ICU data from the
24 # system. Ensure these paths are accessible in the sandbox to avoid segfaults
25 # during checkPhase.
26 sandboxProfile = ''
27 (allow file-read* (subpath "/usr/share/icu"))
28 '';
29
30 checkFlags = [
31 # These tests require network access
32 "--skip=connect_listen_ctrlc_connect"
33 "--skip=connect_listen_ctrlc_listen"
34 "--skip=connect_tcp_happy"
35 "--skip=unix_socket_tests::unix_socket_roundtrip"
36 ];
37
38 passthru = {
39 updateScript = nix-update-script { };
40 };
41
42 meta = {
43 description = "Connect A to B - Send Data";
44 homepage = "https://www.dumbpipe.dev/";
45 license = with lib.licenses; [
46 asl20
47 mit
48 ];
49 maintainers = with lib.maintainers; [ cameronfyfe ];
50 mainProgram = "dumbpipe";
51 };
52})