{ description = "Fudo Coinbase Price Bot."; inputs = { nixpkgs.url = "nixpkgs/nixos-21.11"; utils.url = "github:numtide/flake-utils"; clj-nix = { url = "github:jlesquembre/clj-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { self, nixpkgs, utils, clj-nix, ... }: utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}"; mkCljBin = clj-nix.packages."${system}".mkCljBin; update-deps = pkgs.writeShellScriptBin "update-deps.sh" '' ${clj-nix.packages."${system}".deps-lock}/bin/deps-lock ''; in { packages = rec { fudo-pricebot = mkCljBin { projectSrc = ./.; name = "org.fudo/pricebot"; main-ns = "pricebot.core"; jdkRunner = pkgs.jdk17_headless; version = "0.1"; }; default = fudo-pricebot; }; legacyPackages = { fudo-pricebot = self.packages."${system}".fudo-pricebot; }; devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ update-deps ]; }; }) // { nixosModules.default = { nixpkgs.overlays = [ self.overlays.default ]; imports = [ (import ./module.nix) ]; }; overlays.default = final: prev: { fudo-pricebot = self.packages."${prev.system}".fudo-pricebot; }; }; }