File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,3 +8,5 @@ yaci-cli.history
88logs /
99
1010.direnv
11+
12+ result
Original file line number Diff line number Diff line change @@ -13,7 +13,21 @@ Built for newcomers and coding agents alike.
1313
1414## Quick start (pre-release)
1515
16- Requires a recent Rust toolchain (2024 edition). From a clone:
16+ ### Install with Nix (flake)
17+
18+ ``` bash
19+ # Install the CLI into your profile
20+ nix profile add github:input-output-hk/cardano-init
21+
22+ # Or run it without installing
23+ nix run github:input-output-hk/cardano-init -- --help
24+ ```
25+
26+ Then invoke ` cardano-init ` directly (e.g. ` cardano-init --name my-protocol --on-chain aiken ` ).
27+
28+ ### From a clone
29+
30+ Requires a recent Rust toolchain (2024 edition).
1731
1832``` bash
1933# Interactive guided setup
@@ -123,3 +137,5 @@ cargo test # run tests
123137cargo fmt # format
124138cargo clippy # lint
125139```
140+
141+ A Nix flake is provided. Use ` nix develop ` for a dev shell with the Rust toolchain, or ` nix build .#cardano-init ` to build the package.
Original file line number Diff line number Diff line change 11{
2- description = "cardano-init — development environment (Rust toolchain) " ;
2+ description = "cardano-init — scaffolds Cardano protocol projects " ;
33
44 inputs . nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ;
55
1010 systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ] ;
1111 forAllSystems = f :
1212 nixpkgs . lib . genAttrs systems ( system : f nixpkgs . legacyPackages . ${ system } ) ;
13+
14+ version = ( builtins . fromTOML ( builtins . readFile ./Cargo.toml ) ) . package . version ;
1315 in {
16+ packages = forAllSystems ( pkgs : rec {
17+ cardano-init = pkgs . rustPlatform . buildRustPackage {
18+ pname = "cardano-init" ;
19+ inherit version ;
20+
21+ src = pkgs . lib . cleanSource self ;
22+
23+ cargoLock . lockFile = ./Cargo.lock ;
24+
25+ meta = with pkgs . lib ; {
26+ description = "Scaffolds Cardano protocol projects" ;
27+ homepage = "https://github.com/input-output-hk/cardano-init" ;
28+ license = licenses . asl20 ;
29+ mainProgram = "cardano-init" ;
30+ } ;
31+ } ;
32+
33+ default = cardano-init ;
34+ } ) ;
35+
1436 devShells = forAllSystems ( pkgs : {
1537 default = pkgs . mkShell {
1638 packages = with pkgs ; [
You can’t perform that action at this time.
0 commit comments