2022-07-02 10:26:59 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, patchelf
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2023-02-22 17:26:04 +01:00
|
|
|
, makeBinaryWrapper
|
2022-07-02 10:26:59 +02:00
|
|
|
, pkg-config
|
|
|
|
, curl
|
|
|
|
, Security
|
|
|
|
, CoreServices
|
|
|
|
, libiconv
|
|
|
|
, xz
|
|
|
|
, perl
|
|
|
|
, substituteAll
|
2023-02-22 17:26:04 +01:00
|
|
|
# for passthru.tests:
|
|
|
|
, edgedb
|
|
|
|
, testers
|
2022-07-02 10:26:59 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "edgedb";
|
2023-08-05 10:54:05 +02:00
|
|
|
version = "3.4.0";
|
2022-07-02 10:26:59 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edgedb";
|
|
|
|
repo = "edgedb-cli";
|
2022-07-29 09:51:50 +02:00
|
|
|
rev = "v${version}";
|
2023-08-05 10:54:05 +02:00
|
|
|
sha256 = "sha256-w6YpjSmh517yat45l4gGdV6qWD4O3aCx/6LL5wea+RA=";
|
2023-06-25 17:47:58 +02:00
|
|
|
fetchSubmodules = true;
|
2022-07-02 10:26:59 +02:00
|
|
|
};
|
|
|
|
|
2023-03-26 00:16:46 +01:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2023-06-25 17:47:58 +02:00
|
|
|
"edgedb-derive-0.5.0" = "sha256-y/mN0XuJtQBtkLmbk2s7hK5joGEH5Ge6sLCD88WyL9o=";
|
2023-08-05 10:54:05 +02:00
|
|
|
"edgeql-parser-0.1.0" = "sha256-Y3gXxPuR7qnTL4fu2nZIa3e20YV1fLvm2jHAng+Ke2Q=";
|
2023-06-25 17:47:58 +02:00
|
|
|
"indexmap-2.0.0-pre" = "sha256-QMOmoUHE1F/sp+NeDpgRGqqacWLHWG02YgZc5vAdXZY=";
|
|
|
|
"rexpect-0.5.0" = "sha256-vstAL/fJWWx7WbmRxNItKpzvgGF3SvJDs5isq9ym/OA=";
|
|
|
|
"rustyline-8.0.0" = "sha256-CrICwQbHPzS4QdVIEHxt2euX+g+0pFYe84NfMp1daEc=";
|
2023-03-26 00:16:46 +01:00
|
|
|
"serde_str-1.0.0" = "sha256-CMBh5lxdQb2085y0jc/DrV6B8iiXvVO2aoZH/lFFjak=";
|
|
|
|
};
|
|
|
|
};
|
2022-07-02 10:26:59 +02:00
|
|
|
|
2023-02-22 17:26:04 +01:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper pkg-config perl ];
|
2022-07-02 10:26:59 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [ CoreServices Security libiconv xz ];
|
|
|
|
|
|
|
|
checkFeatures = [ ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./0001-dynamically-patchelf-binaries.patch;
|
|
|
|
inherit patchelf;
|
|
|
|
dynamicLinker = stdenv.cc.bintools.dynamicLinker;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-22 17:26:04 +01:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = edgedb;
|
|
|
|
command = "edgedb --version";
|
|
|
|
};
|
|
|
|
|
2022-07-02 10:26:59 +02:00
|
|
|
meta = with lib; {
|
|
|
|
description = "EdgeDB cli";
|
|
|
|
homepage = "https://www.edgedb.com/docs/cli/index";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = [ maintainers.ranfdev ];
|
|
|
|
};
|
|
|
|
}
|