64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{ stdenv
|
|
, lib
|
|
, runCommand
|
|
, patchelf
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, makeBinaryWrapper
|
|
, pkg-config
|
|
, curl
|
|
, Security
|
|
, CoreServices
|
|
, libiconv
|
|
, xz
|
|
, perl
|
|
, substituteAll
|
|
# for passthru.tests:
|
|
, edgedb
|
|
, testers
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "edgedb";
|
|
version = "2.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "edgedb";
|
|
repo = "edgedb-cli";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-iL8tD6cvFVWqsQAk6HBUqdz7MJ3lT2XmExGQvdQdIWs=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-dGeRTo6pFwDKd/nTaA3R9DWGiAL0Dm6jEVR1zhF6/BQ=";
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper pkg-config perl ];
|
|
|
|
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;
|
|
|
|
passthru.tests.version = testers.testVersion {
|
|
package = edgedb;
|
|
command = "edgedb --version";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "EdgeDB cli";
|
|
homepage = "https://www.edgedb.com/docs/cli/index";
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
maintainers = [ maintainers.ranfdev ];
|
|
};
|
|
}
|