nixpkgs/pkgs/by-name/kc/kclvm/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.2 KiB
Nix
Raw Normal View History

2024-06-10 13:51:31 +03:00
{
lib,
stdenv,
2024-06-10 13:51:31 +03:00
rustPlatform,
fetchFromGitHub,
protobuf,
pkg-config,
rustc,
2024-06-10 13:51:31 +03:00
}:
rustPlatform.buildRustPackage rec {
pname = "kclvm";
2025-04-06 14:10:53 +00:00
version = "0.11.1";
2024-06-10 13:51:31 +03:00
src = fetchFromGitHub {
owner = "kcl-lang";
repo = "kcl";
rev = "v${version}";
2025-04-06 14:10:53 +00:00
hash = "sha256-14yFGa8y8w3wbCmx0JOSN0TShXLZZpTdVynEfUKkjuE=";
2024-06-10 13:51:31 +03:00
};
2024-08-02 14:53:11 +02:00
sourceRoot = "${src.name}/kclvm";
2025-03-24 12:40:48 +01:00
useFetchCargoVendor = true;
2025-04-06 14:10:53 +00:00
cargoHash = "sha256-o7YFyqRWAMjq23mcAqDrcN4infdBgp1KNvviYOLR35s=";
2024-06-10 13:51:31 +03:00
buildInputs = [ rustc ];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool -id $out/lib/libkclvm_cli_cdylib.dylib $out/lib/libkclvm_cli_cdylib.dylib
'';
2024-06-10 13:51:31 +03:00
nativeBuildInputs = [
pkg-config
protobuf
];
patches = [ ./enable_protoc_env.patch ];
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
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;
platforms = platforms.linux ++ platforms.darwin;
2024-06-10 13:51:31 +03:00
maintainers = with maintainers; [
selfuryon
peefy
];
};
}