2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
patchelf,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
makeBinaryWrapper,
|
|
|
|
pkg-config,
|
|
|
|
curl,
|
2024-10-04 16:56:33 +00:00
|
|
|
openssl,
|
2024-06-05 15:53:02 +00:00
|
|
|
Security,
|
|
|
|
CoreServices,
|
|
|
|
libiconv,
|
|
|
|
xz,
|
|
|
|
substituteAll,
|
|
|
|
# for passthru.tests:
|
|
|
|
edgedb,
|
|
|
|
testers,
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "edgedb";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "5.3.0";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edgedb";
|
|
|
|
repo = "edgedb-cli";
|
2024-09-19 14:19:46 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-oG3KxORNppQDa84CXjSxM9Z9GDLby+irUbEncyjoJU4=";
|
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-09-19 14:19:46 +00:00
|
|
|
"edgedb-derive-0.5.2" = "sha256-9vmaMOoZ5VmbJ0/eN0XdE5hrID/BK4IkLnIwucgRr2w=";
|
|
|
|
"edgeql-parser-0.1.0" = "sha256-WUNiUgfuzbr+zNYgJivalUK5kPSvkVcgp4Zq3pmoa/w=";
|
2023-08-04 22:07:22 +00:00
|
|
|
"indexmap-2.0.0-pre" = "sha256-QMOmoUHE1F/sp+NeDpgRGqqacWLHWG02YgZc5vAdXZY=";
|
|
|
|
"rustyline-8.0.0" = "sha256-CrICwQbHPzS4QdVIEHxt2euX+g+0pFYe84NfMp1daEc=";
|
2024-09-19 14:19:46 +00:00
|
|
|
"rexpect-0.5.0" = "sha256-vstAL/fJWWx7WbmRxNItKpzvgGF3SvJDs5isq9ym/OA=";
|
2023-03-27 19:17:25 +00:00
|
|
|
"serde_str-1.0.0" = "sha256-CMBh5lxdQb2085y0jc/DrV6B8iiXvVO2aoZH/lFFjak=";
|
2024-06-05 15:53:02 +00:00
|
|
|
"scram-0.7.0" = "sha256-QTPxyXBpMXCDkRRJEMYly1GKp90khrwwuMI1eHc2H+Y=";
|
|
|
|
"test-utils-0.1.0" = "sha256-FoF/U89Q9E2Dlmpoh+cfDcScmhcsSNut+rE7BECJSJI=";
|
|
|
|
"warp-0.3.6" = "sha256-knDt2aw/PJ0iabhKg+okwwnEzCY+vQVhE7HKCTM6QbE=";
|
2023-03-27 19:17:25 +00:00
|
|
|
};
|
|
|
|
};
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeBinaryWrapper
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs =
|
2024-10-04 16:56:33 +00:00
|
|
|
[
|
|
|
|
curl
|
|
|
|
]
|
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
|
|
|
openssl
|
|
|
|
]
|
2024-09-26 11:04:55 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-06-05 15:53:02 +00:00
|
|
|
CoreServices
|
|
|
|
Security
|
|
|
|
libiconv
|
|
|
|
xz
|
|
|
|
];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
checkFeatures = [ ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./0001-dynamically-patchelf-binaries.patch;
|
|
|
|
inherit patchelf;
|
|
|
|
dynamicLinker = stdenv.cc.bintools.dynamicLinker;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
env = {
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
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";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with licenses; [
|
|
|
|
asl20
|
|
|
|
# or
|
|
|
|
mit
|
|
|
|
];
|
|
|
|
maintainers = with maintainers; [
|
|
|
|
ahirner
|
|
|
|
kirillrdy
|
|
|
|
];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "edgedb";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
}
|