Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appthrust/kcl-nix
This repository provides a Nix flake for the KCL (Kubernetes Configuration Language) toolchain, including the KCL CLI and KCL Language Server.
https://github.com/appthrust/kcl-nix
daily-updates kcl nix nix-flake
Last synced: about 1 month ago
JSON representation
This repository provides a Nix flake for the KCL (Kubernetes Configuration Language) toolchain, including the KCL CLI and KCL Language Server.
- Host: GitHub
- URL: https://github.com/appthrust/kcl-nix
- Owner: appthrust
- License: mit
- Created: 2024-09-06T02:01:06.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T23:22:08.000Z (about 2 months ago)
- Last Synced: 2024-09-30T07:23:25.225Z (about 1 month ago)
- Topics: daily-updates, kcl, nix, nix-flake
- Language: Nix
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KCL Nix Flake
This repository provides a Nix flake for the KCL (Kubernetes Configuration Language) toolchain, including the KCL CLI, KCL Language Server, and kubectl-kcl plugin.## Features
- Easy installation and usage of KCL tools through Nix
- Cross-platform support (Linux and macOS, both x86_64 and aarch64)
- Reproducible builds and development environments
- Seamless integration with other Nix-based projects## Prerequisites
- Nix package manager with flakes enabled
## Usage
To use this flake in your project, add it to your `flake.nix` inputs:
```nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
kclpkgs.url = "github:appthrust/kcl-nix";
};outputs = { self, nixpkgs, flake-utils, kclpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
kcl = kclpkgs.default.${system};
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
kcl.cli
kcl.language-server
kcl.kubectl-kcl
];
};
}
);
}
```Then, you can enter a development shell with KCL tools available:
```bash
nix develop
```## Available Tools
- `kcl`: The KCL Command Line Interface
- `kcl-language-server`: The KCL Language Server
- `kubectl-kcl`: The KCL kubectl plugin## Automated Updates
This repository includes a GitHub Actions workflow that automatically checks for new KCL releases daily. When a new version is available, it updates the `flake.nix` file using a template (`flake.nix.tpl`) and a Python script (`update_flake.py`), then creates a pull request with the changes. This ensures that the flake always provides the latest KCL tools.
The `update_flake.py` script handles fetching the latest KCL version, calculating hashes for different architectures, and generating the updated `flake.nix` file.
### Contributing to flake.nix
The `flake.nix` file is automatically generated from the `flake.nix.tpl` template. If you need to make changes to the flake configuration, please modify the template file instead of directly editing `flake.nix`. The automated update process will use your changes in the template to generate the new `flake.nix` file.
If you need to modify the update process itself, you can edit the `update_flake.py` script.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request. Remember to modify `flake.nix.tpl` instead of `flake.nix` when making changes to the flake configuration.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- KCL developers and contributors
- Nix and flakes communityFor more information about KCL, visit the [official KCL documentation](https://kcl-lang.io/).