2024-07-01 15:47:52 +00:00
|
|
|
{ lib
|
2024-07-27 06:49:29 +00:00
|
|
|
, stdenv
|
2024-07-01 15:47:52 +00:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kclvm
|
2024-07-27 06:49:29 +00:00
|
|
|
, darwin
|
|
|
|
, rustc
|
|
|
|
,
|
2024-07-01 15:47:52 +00:00
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "kclvm_cli";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.10.0";
|
2024-07-01 15:47:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kcl-lang";
|
|
|
|
repo = "kcl";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-OMPo2cT0ngwHuGghVSfGoDgf+FThj2GsZ3Myb1wSxQM=";
|
2024-07-01 15:47:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
sourceRoot = "${src.name}/cli";
|
|
|
|
cargoHash = "sha256-hILG2YcwsAzzJPJno+2KzAHM226HYmQPQt9JVVYn9Jk=";
|
2024-07-01 15:47:52 +00:00
|
|
|
cargoPatches = [ ./cargo_lock.patch ];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
buildInputs = [ kclvm rustc ] ++ (
|
2024-09-26 11:04:55 +00:00
|
|
|
lib.optionals stdenv.hostPlatform.isDarwin [
|
2024-07-27 06:49:29 +00:00
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
|
|
darwin.apple_sdk.frameworks.SystemConfiguration
|
|
|
|
]
|
|
|
|
);
|
2024-07-01 15:47:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A high-performance implementation of KCL written in Rust that uses LLVM as the compiler backend";
|
|
|
|
homepage = "https://github.com/kcl-lang/kcl";
|
|
|
|
license = licenses.asl20;
|
2024-07-27 06:49:29 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2024-07-01 15:47:52 +00:00
|
|
|
maintainers = with maintainers; [ selfuryon peefy ];
|
|
|
|
mainProgram = "kclvm_cli";
|
|
|
|
};
|
|
|
|
}
|