PriceBot/flake.nix

50 lines
1.4 KiB
Nix
Raw Normal View History

2022-06-17 11:24:48 -07:00
{
description = "Fudo Coinbase Price Bot.";
inputs = {
2022-08-22 09:30:34 -07:00
nixpkgs.url = "nixpkgs/nixos-21.11";
2022-06-17 11:24:48 -07:00
utils.url = "github:numtide/flake-utils";
clj-nix = {
url = "github:jlesquembre/clj-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, utils, clj-nix, ... }:
2022-08-22 09:30:34 -07:00
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";
};
2022-06-19 11:02:01 -07:00
2022-08-22 09:30:34 -07:00
default = fudo-pricebot;
};
2022-06-19 11:02:01 -07:00
2022-08-22 09:30:34 -07:00
legacyPackages = {
fudo-pricebot = self.packages."${system}".fudo-pricebot;
};
2022-06-19 11:02:01 -07:00
2022-08-22 09:30:34 -07:00
devShells.default =
pkgs.mkShell { buildInputs = with pkgs; [ update-deps ]; };
}) // {
2022-08-22 13:56:19 -07:00
nixosModules.default = {
2022-08-22 13:57:16 -07:00
nixpkgs.overlays = [ self.overlays.default ];
2022-08-22 13:57:57 -07:00
imports = [ (import ./module.nix) ];
2022-08-22 13:56:19 -07:00
};
2022-08-22 12:59:12 -07:00
overlays.default = final: prev: {
fudo-pricebot = self.packages."${prev.system}".fudo-pricebot;
};
2022-08-22 09:30:34 -07:00
};
2022-06-17 11:24:48 -07:00
}