python312Packages.slack-sdk: 3.33.3 -> 3.33.4 (#358119)
[NixPkgs.git] / pkgs / tools / networking / edgedb / default.nix
blob7355cd8332e12bacfc91c00f4edb5035b61390e0
2   stdenv,
3   lib,
4   patchelf,
5   fetchFromGitHub,
6   rustPlatform,
7   makeBinaryWrapper,
8   pkg-config,
9   curl,
10   openssl,
11   xz,
12   substituteAll,
13   # for passthru.tests:
14   edgedb,
15   testers,
17 rustPlatform.buildRustPackage rec {
18   pname = "edgedb";
19   version = "5.5.2";
21   src = fetchFromGitHub {
22     owner = "edgedb";
23     repo = "edgedb-cli";
24     rev = "refs/tags/v${version}";
25     hash = "sha256-CSs1Ql0zsGgSmZrlZIfj2pJdtAax7HUlfCq8oTbReng=";
26     fetchSubmodules = true;
27   };
29   cargoLock = {
30     lockFile = ./Cargo.lock;
31     outputHashes = {
32       "edgedb-derive-0.5.2" = "sha256-5nvpkmTRcGO4a/Mc+qLp2+u9bWSnHQ/1NT2FW9ii0AU=";
33       "edgeql-parser-0.1.0" = "sha256-dhLwBW4ellai9R9TjlJ/qEhZQRXE9D/+QxZsq3I9PRk=";
34       "rexpect-0.5.0" = "sha256-vstAL/fJWWx7WbmRxNItKpzvgGF3SvJDs5isq9ym/OA=";
35       "scram-0.7.0" = "sha256-QTPxyXBpMXCDkRRJEMYly1GKp90khrwwuMI1eHc2H+Y=";
36       "serde_str-1.0.0" = "sha256-CMBh5lxdQb2085y0jc/DrV6B8iiXvVO2aoZH/lFFjak=";
37       "test-utils-0.1.0" = "sha256-FoF/U89Q9E2Dlmpoh+cfDcScmhcsSNut+rE7BECJSJI=";
38       "warp-0.3.6" = "sha256-knDt2aw/PJ0iabhKg+okwwnEzCY+vQVhE7HKCTM6QbE=";
39     };
40   };
42   nativeBuildInputs = [
43     makeBinaryWrapper
44     pkg-config
45   ];
47   buildInputs =
48     [
49       curl
50     ]
51     ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
52       openssl
53     ]
54     ++ lib.optionals stdenv.hostPlatform.isDarwin [
55       xz
56     ];
58   checkFeatures = [ ];
60   patches = [
61     (substituteAll {
62       src = ./0001-dynamically-patchelf-binaries.patch;
63       inherit patchelf;
64       dynamicLinker = stdenv.cc.bintools.dynamicLinker;
65     })
66   ];
68   env = {
69     OPENSSL_NO_VENDOR = true;
70   };
72   doCheck = false;
74   passthru.tests.version = testers.testVersion {
75     package = edgedb;
76     command = "edgedb --version";
77   };
79   meta = {
80     description = "EdgeDB cli";
81     homepage = "https://www.edgedb.com/docs/cli/index";
82     license = with lib.licenses; [
83       asl20
84       # or
85       mit
86     ];
87     maintainers = with lib.maintainers; [
88       ahirner
89       kirillrdy
90     ];
91     mainProgram = "edgedb";
92   };