crun: 1.8.3 -> 1.8.4
[NixPkgs.git] / pkgs / tools / networking / edgedb / default.nix
blob1409bd070818a207b1e0e128c2bd5964421f1a2c
1 { stdenv
2 , lib
3 , runCommand
4 , patchelf
5 , fetchFromGitHub
6 , rustPlatform
7 , makeBinaryWrapper
8 , pkg-config
9 , curl
10 , Security
11 , CoreServices
12 , libiconv
13 , xz
14 , perl
15 , substituteAll
16 # for passthru.tests:
17 , edgedb
18 , testers
21 rustPlatform.buildRustPackage rec {
22   pname = "edgedb";
23   version = "2.3.1";
25   src = fetchFromGitHub {
26     owner = "edgedb";
27     repo = "edgedb-cli";
28     rev =  "v${version}";
29     sha256 = "sha256-iL8tD6cvFVWqsQAk6HBUqdz7MJ3lT2XmExGQvdQdIWs=";
30   };
32   cargoLock = {
33     lockFile = ./Cargo.lock;
34     outputHashes = {
35       "assert_cmd-1.0.1" = "sha256-0MkQG+JKrZXOn8B8q1HdyhZ1hVVb7dPbGEo/76o2YRc=";
36       "edgedb-derive-0.4.0" = "sha256-pE/GchC3JDg0E4twmov86byne+rn28JpIawBbZcJHOg=";
37       "edgeql-parser-0.1.0" = "sha256-e43PBHirALfrxGKi50KvE9aDAunObpXcWNBs62ssgSM=";
38       "rexpect-0.3.0" = "sha256-0a//fPscEXEwv+73Ja7jRf2eRWfF6VCsck9ZZ15zgog=";
39       "rustyline-8.0.0" = "sha256-FyMx2nAVaX0pc481BTlNxeR/NfNrr57FWKLS7+EjPVw=";
40       "serde_str-1.0.0" = "sha256-CMBh5lxdQb2085y0jc/DrV6B8iiXvVO2aoZH/lFFjak=";
41     };
42   };
44   nativeBuildInputs = [ makeBinaryWrapper pkg-config perl ];
46   buildInputs = [
47     curl
48   ] ++ lib.optionals stdenv.isDarwin [ CoreServices Security libiconv xz ];
50   checkFeatures = [ ];
52   patches = [
53     (substituteAll {
54       src = ./0001-dynamically-patchelf-binaries.patch;
55       inherit patchelf;
56       dynamicLinker = stdenv.cc.bintools.dynamicLinker;
57     })
58   ];
60   doCheck = false;
62   passthru.tests.version = testers.testVersion {
63     package = edgedb;
64     command = "edgedb --version";
65   };
67   meta = with lib; {
68     description = "EdgeDB cli";
69     homepage = "https://www.edgedb.com/docs/cli/index";
70     license = with licenses; [ asl20 /* or */ mit ];
71     maintainers = [ maintainers.ranfdev ];
72   };