Files
nixpkgs/pkgs/by-name/kc/kclvm/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.2 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
protobuf,
pkg-config,
rustc,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "kclvm";
version = "0.11.2";
src = fetchFromGitHub {
owner = "kcl-lang";
repo = "kcl";
rev = "v${finalAttrs.version}";
hash = "sha256-6XDLxTpgENhP7F51kicAJB7BNMtX4cONKJApAhqgdno=";
};
env = {
PROTOC = "${protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
};
cargoRoot = "kclvm";
cargoHash = "sha256-kX+3wyeElKXUOIyD24X9jfvSzdtg3HFilkqlWulq4cc=";
cargoPatches = [ ./fix-build.patch ];
preBuild = ''
cd kclvm
'';
buildInputs = [ rustc ];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
install_name_tool -id $out/lib/libkclvm_cli_cdylib.dylib $out/lib/libkclvm_cli_cdylib.dylib
'';
nativeBuildInputs = [
pkg-config
protobuf
];
meta = {
description = "High-performance implementation of KCL written in Rust that uses LLVM as the compiler backend";
homepage = "https://github.com/kcl-lang/kcl";
license = lib.licenses.asl20;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
selfuryon
peefy
];
};
})