From fddd1bd76eefe16e5ab17a0aa7cb222d2c3884fe Mon Sep 17 00:00:00 2001 From: niten Date: Mon, 11 Mar 2024 14:28:26 -0700 Subject: [PATCH] Add initial flake --- flake.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..bb8fd4a --- /dev/null +++ b/flake.nix @@ -0,0 +1,35 @@ +{ + description = "Clojure library for interacting with MQTT."; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-23.11"; + utils.url = "github:numtide/flake-utils"; + helpers = { + url = + "git+https://git.fudo.org/fudo-public/nix-helpers.git?ref=with-deps"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, utils, helpers, ... }: + utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages."${system}"; + in { + packages = rec { + default = milquetoast; + milquetoast = helpers.packages."${system}".mkClojureLib { + name = "org.fudo/milquetoast"; + src = ./.; + buildCommand = "clojure -T:build uberjar"; + }; + }; + + devShells = rec { + default = updateDeps; + updateDeps = pkgs.mkShell { + buildInputs = with helpers.packages."${system}"; + [ updateClojureDeps ]; + }; + }; + }); +}