2022-07-14 12:49:19 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, patchelf
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2023-03-04 12:14:45 +00:00
|
|
|
, makeBinaryWrapper
|
2022-07-14 12:49:19 +00:00
|
|
|
, pkg-config
|
|
|
|
, curl
|
|
|
|
, Security
|
|
|
|
, CoreServices
|
|
|
|
, libiconv
|
|
|
|
, xz
|
|
|
|
, perl
|
|
|
|
, substituteAll
|
2023-03-04 12:14:45 +00:00
|
|
|
# for passthru.tests:
|
|
|
|
, edgedb
|
|
|
|
, testers
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "edgedb";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "4.0.2";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edgedb";
|
|
|
|
repo = "edgedb-cli";
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-uilotat61U6jW1NLh7fVHOujkzUSFRdpeOx+ECGsByY=";
|
2023-08-04 22:07:22 +00:00
|
|
|
fetchSubmodules = true;
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
2023-03-27 19:17:25 +00:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
outputHashes = {
|
2024-01-13 08:15:51 +00:00
|
|
|
"edgedb-derive-0.5.1" = "sha256-1tbWg3bLab3xlVQxb4G+kpXriO+zQpnrwAESy5Tqsu4=";
|
|
|
|
"edgeql-parser-0.1.0" = "sha256-c5xBuW47xXgy8VLR/P7DvVhLBd0rvI6P9w82IPPsTwo=";
|
2023-08-04 22:07:22 +00: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-27 19:17:25 +00:00
|
|
|
"serde_str-1.0.0" = "sha256-CMBh5lxdQb2085y0jc/DrV6B8iiXvVO2aoZH/lFFjak=";
|
|
|
|
};
|
|
|
|
};
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper pkg-config perl ];
|
2022-07-14 12:49:19 +00: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-03-04 12:14:45 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = edgedb;
|
|
|
|
command = "edgedb --version";
|
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "EdgeDB cli";
|
|
|
|
homepage = "https://www.edgedb.com/docs/cli/index";
|
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
2024-01-13 08:15:51 +00:00
|
|
|
maintainers = with maintainers; [ ahirner kirillrdy ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "edgedb";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
}
|