PriceBot/flake.nix

68 lines
2.0 KiB
Nix
Raw Normal View History

2022-06-17 11:24:48 -07:00
{
description = "Fudo Coinbase Price Bot.";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
utils.url = "github:numtide/flake-utils";
clj-nix = {
url = "github:jlesquembre/clj-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, utils, clj-nix, ... }:
2022-06-19 11:02:01 -07:00
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}";
cljpkgs = clj-nix.packages."${system}";
update-deps = pkgs.writeShellScriptBin "update-deps.sh" ''
${clj-nix.packages."${system}".deps-lock}/bin/deps-lock
'';
in {
packages."${system}".fudo-pricebot = cljpkgs.mkCljBin {
projectSrc = ./.;
name = "org.fudo/pricebot";
main-ns = "pricebot.core";
jdkRunner = pkgs.jdk17_headless;
version = "0.1";
};
defaultPackage = self.packages."${system}".fudo-pricebot;
2022-06-19 12:15:40 -07:00
nixosModule = pkgs.callPackage ./module.nix {
2022-06-19 12:11:44 -07:00
pricebot = self.packages."${system}".fudo-pricebot;
};
2022-06-19 11:02:01 -07:00
devShell =
pkgs.mkShell { buildInputs = with pkgs; [ clojure update-deps ]; };
};
# outputs = { self, nixpkgs, utils, clj-nix, ... }:
# utils.lib.eachDefaultSystem (system:
# let
# pkgs = nixpkgs.legacyPackages."${system}";
# cljpkgs = clj-nix.packages."${system}";
# update-deps = pkgs.writeShellScriptBin "update-deps.sh" ''
# ${clj-nix.packages."${system}".deps-lock}/bin/deps-lock
# '';
# in {
# packages = {
# fudo-pricebot = cljpkgs.mkCljBin {
# projectSrc = ./.;
# name = "org.fudo/pricebot";
# main-ns = "pricebot.core";
# jdkRunner = pkgs.jdk17_headless;
# version = "0.1";
# };
# };
# defaultPackage = self.packages."${system}".fudo-pricebot;
# nixosModule =
# import ./module.nix self.packages."${system}".fudo-pricebot;
# devShell =
# pkgs.mkShell { buildInputs = with pkgs; [ clojure update-deps ]; };
# });
2022-06-17 11:24:48 -07:00
}