Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.47 KB

README.md

File metadata and controls

63 lines (47 loc) · 1.47 KB

Hasura DDN CLI packaged for Nix

This repo provides Nix packages for the Hasura v3 CLI via a flake.

To run the CLI directly run,

$ nix run github:hasura/ddn-cli-nix

You probably want to use the flake in this repository as a flake input in your own configuration.

Example flake.nix

{
  description = "..";

  inputs = {
     nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
     flake-utils.url = "github:numtide/flake-utils";
     ddnPkg.url = "github:hasura/ddn-cli-nix";
  };

  outputs = { self, nixpkgs, flake-utils, ddnPkg }:
    flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ] (system:
      let pkgs = nixpkgs.legacyPackages.${system};
          ddn = ddnPkg.packages.${system}.default;
      in {
        devShell = pkgs.mkShell {
          buildInputs = [
            ddn
          ];
        };
      });
}
  1. Install nix and ensure flakes are enabled
  2. Run nix develop
  3. ddn is now available in your shell

Updating

The packages in this repo package a specific version of the CLI. To update the packages to the latest CLI version run the update script:

$ nix run .#update

Or to create packaging for a specific version provide the version string as an argument:

$ nix run .#update v2.15.0

Packages can only be set to use versions that have binaries published on Hasura's CDN.