Accur8 build and deployment scripts collection.
This repository is packaged as a Nix flake, making it easy to use as an input in other flake-based projects.
Add to your flake.nix:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
a8-scripts.url = "github:fizzy33/a8-scripts";
};
outputs = { self, nixpkgs, a8-scripts, ... }: {
# Use in your packages
packages.x86_64-linux.myPackage = pkgs.mkDerivation {
buildInputs = [
a8-scripts.packages.x86_64-linux.default
# or
a8-scripts.packages.x86_64-linux.a8-scripts
];
# ...
};
};
}The flake provides an overlay that adds a8-scripts to nixpkgs:
{
outputs = { self, nixpkgs, a8-scripts, ... }: {
nixosConfigurations.mySystem = nixpkgs.lib.nixosSystem {
modules = [
{
nixpkgs.overlays = [ a8-scripts.overlays.default ];
# Now you can use pkgs.a8-scripts anywhere
environment.systemPackages = [ pkgs.a8-scripts ];
}
];
};
};
}# Build the package
nix build github:fizzy33/a8-scripts
# Run in a shell
nix shell github:fizzy33/a8-scripts
# Enter development shell
nix develop github:fizzy33/a8-scriptsFor systems not using flakes, you can still import the package using the traditional Nix approach:
let
a8-scripts-src = builtins.fetchGit {
url = "https://github.com/fizzy33/a8-scripts.git";
ref = "master";
};
a8-scripts = (import "${a8-scripts-src}/default.nix" {
inherit (pkgs) system python3 openjdk11_headless makeWrapper lib stdenv;
src = a8-scripts-src;
}).a8-scripts;
in
# Use a8-scripts in your derivation
pkgs.mkDerivation {
buildInputs = [ a8-scripts ];
# ...
}After installation, the following commands will be available:
a8-versions- Version management toola8-codegen- Code generation utilitiesa8-zero- Zero deployment toola8-zoo- Zoo management utilitieshoneybadger- Honeybadger integrationcoursier- Coursier dependency managementa8-launcher.py- Python launcher script
To work on a8-scripts locally:
# Clone the repository
git clone https://github.com/fizzy33/a8-scripts.git
cd a8-scripts
# Enter development shell
nix develop
# Build the package
nix build
# Test the build
./result/bin/a8-versions --helpThe flake provides the following outputs:
packages.${system}.default- The main a8-scripts packagepackages.${system}.a8-scripts- Same as default, explicit nameoverlays.default- Overlay that adds a8-scripts to nixpkgsdevShells.${system}.default- Development shell with a8-scripts
- Nix 2.4+ with flakes enabled (for flake usage)
- Nix (any version for legacy usage)
See LICENSE file for details.