Add flake, for real

This commit is contained in:
niten 2023-01-28 10:15:54 -08:00
parent 31fa52bcab
commit 7a8545e60f
1 changed files with 33 additions and 0 deletions

33
flake.nix Normal file
View File

@ -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 ]; };
};
});
}