https://github.com/feliciousx/commandbox-flake
https://github.com/feliciousx/commandbox-flake
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/feliciousx/commandbox-flake
- Owner: FeliciousX
- Created: 2023-04-11T00:59:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T05:17:06.000Z (almost 2 years ago)
- Last Synced: 2025-08-26T07:27:06.810Z (11 months ago)
- Language: Nix
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nix Flake for Commandbox
## Usage
```nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-23.11";
flake-utils.url = "github:numtide/flake-utils";
commandbox = {
url = "github:FeliciousX/commandbox-flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs = { self, nixpkgs, flake-utils, commandbox }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
box = commandbox.packages.${system}.default.override {
# defaults to nixpkgs.jdk if not specified
jdk = pkgs.jdk11_headless;
};
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = [ pkgs.bashInteractive ];
packages = [
box
];
};
});
}
```
## TODO:
- [ ] Support windows binary when running on windows
- [ ] Support non-flake
## How to update
Currently updating commandbox version is done manually.
1. Get the commandbox download URL for the latest version from https://commandbox.ortusbooks.com/setup/download
2. Update the url in `flake.nix`
3. Change the sha256 hash to an empty string
4. Run `nix flake update` to update flake.lock file
5. Run `nix shell` to make sure `box` command is available
6. Update sha256 hash from the output
7. Check commandbox version by running `box version`
8. Commit changes and create a PR