2024-05-07 06:46:08 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
patchelf,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
makeBinaryWrapper,
|
|
|
|
pkg-config,
|
|
|
|
curl,
|
2024-09-05 13:59:07 +00:00
|
|
|
openssl,
|
2024-05-07 06:46:08 +00:00
|
|
|
xz,
|
|
|
|
substituteAll,
|
|
|
|
# for passthru.tests:
|
|
|
|
edgedb,
|
|
|
|
testers,
|
2022-07-02 08:26:59 +00:00
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "edgedb";
|
2024-12-11 05:29:14 +00:00
|
|
|
version = "6.0.2";
|
2022-07-02 08:26:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "edgedb";
|
|
|
|
repo = "edgedb-cli";
|
2024-09-11 14:07:44 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-12-11 05:29:14 +00:00
|
|
|
hash = "sha256-P55LwByDVO3pEzg4OZldXiyli8s5oHvV8MXCDwkF2+8=";
|
2023-06-25 15:47:58 +00:00
|
|
|
fetchSubmodules = true;
|
2022-07-02 08:26:59 +00:00
|
|
|
};
|
|
|
|
|
2024-12-11 05:29:14 +00:00
|
|
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
|
|
|
inherit pname version src;
|
|
|
|
hash = "sha256-oRtgORzp0tabPcyArPgG8LGfYlSPhpaeRPT9QWF5BGs=";
|
2023-03-25 23:16:46 +00:00
|
|
|
};
|
2022-07-02 08:26:59 +00:00
|
|
|
|
2024-05-07 07:38:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeBinaryWrapper
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-07-02 08:26:59 +00:00
|
|
|
|
2024-05-07 06:46:08 +00:00
|
|
|
buildInputs =
|
2024-09-05 13:59:07 +00:00
|
|
|
[
|
|
|
|
curl
|
|
|
|
]
|
|
|
|
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
|
|
|
|
openssl
|
|
|
|
]
|
2024-05-07 07:38:01 +00:00
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
xz
|
|
|
|
];
|
2022-07-02 08:26:59 +00:00
|
|
|
|
2024-05-07 07:38:01 +00:00
|
|
|
checkFeatures = [ ];
|
2022-07-02 08:26:59 +00:00
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./0001-dynamically-patchelf-binaries.patch;
|
|
|
|
inherit patchelf;
|
|
|
|
dynamicLinker = stdenv.cc.bintools.dynamicLinker;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-09-05 13:59:07 +00:00
|
|
|
env = {
|
|
|
|
OPENSSL_NO_VENDOR = true;
|
|
|
|
};
|
|
|
|
|
2022-07-02 08:26:59 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2023-02-22 16:26:04 +00:00
|
|
|
passthru.tests.version = testers.testVersion {
|
|
|
|
package = edgedb;
|
|
|
|
command = "edgedb --version";
|
|
|
|
};
|
|
|
|
|
2024-10-26 14:46:40 +00:00
|
|
|
meta = {
|
2022-07-02 08:26:59 +00:00
|
|
|
description = "EdgeDB cli";
|
|
|
|
homepage = "https://www.edgedb.com/docs/cli/index";
|
2024-10-26 14:46:40 +00:00
|
|
|
license = with lib.licenses; [
|
2024-05-07 06:46:08 +00:00
|
|
|
asl20
|
2024-05-07 07:38:01 +00:00
|
|
|
# or
|
2024-05-07 06:46:08 +00:00
|
|
|
mit
|
|
|
|
];
|
2024-10-26 14:46:40 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
2024-05-07 07:38:01 +00:00
|
|
|
ahirner
|
|
|
|
kirillrdy
|
|
|
|
];
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "edgedb";
|
2022-07-02 08:26:59 +00:00
|
|
|
};
|
|
|
|
}
|