diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ccdec4c --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Fudo Backplane Client."; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-22.05"; + helpers.url = "git+https://git.fudo.org/fudo-public/nix-helpers.git"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { nixpkgs, helpers, utils, ... }: + utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages."${system}"; + in { + packages = rec { + default = fudoBackplaneClient; + fudoBackplaneClient = import ./package.nix { inherit pkgs helpers; }; + }; + + devShells = rec { + default = update; + update = let + update-deps = pkgs.writeShellApplication { + name = "update-deps"; + runtimeInputs = with pkgs; [ bundle bundix ]; + text = '' + bundle lock + bundix + ''; + }; + in pkgs.mkShell { buildInputs = with pkgs; [ update-deps ]; }; + }; + }); +}