From 7a8545e60f8a27b96427942557da35cd8f115f92 Mon Sep 17 00:00:00 2001 From: niten Date: Sat, 28 Jan 2023 10:15:54 -0800 Subject: [PATCH] Add flake, for real --- flake.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 flake.nix 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 ]; }; + }; + }); +}