bebot/flake.nix

37 lines
1.0 KiB
Nix
Raw Normal View History

2022-05-27 11:40:56 -07:00
{
description = "BeBot Mattermost chatbot Clojure library.";
inputs = {
2022-06-02 19:58:01 -07:00
nixpkgs.url = "nixpkgs/nixos-22.05";
2022-05-27 11:40:56 -07:00
utils.url = "github:numtide/flake-utils";
2022-06-02 19:58:01 -07:00
clj-nix = {
url = "github:jlesquembre/clj-nix";
2022-05-27 11:40:56 -07:00
inputs.nixpkgs.follows = "nixpkgs";
};
};
2022-06-02 19:58:01 -07:00
outputs = { self, nixpkgs, utils, clj-nix, ... }:
2022-05-27 11:40:56 -07:00
utils.lib.eachDefaultSystem (system:
let
2022-06-02 19:58:01 -07:00
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
'';
2022-05-27 11:40:56 -07:00
in {
2022-06-02 19:58:01 -07:00
packages = {
bebot = cljpkgs.mkCljBin {
projectSrc = ./.;
name = "org.fudo/bebot";
main-ns = "bebot.core";
jdkRunner = pkgs.jdk17_headless;
};
2022-05-27 11:40:56 -07:00
};
2022-06-02 19:58:01 -07:00
defaultPackage = self.packages."${system}".bebot;
devShell =
pkgs.mkShell { buildInputs = with pkgs; [ clojure update-deps ]; };
2022-05-27 11:40:56 -07:00
});
}