From 6857e3bd36e831775e350fc5a2e70c3d47991471 Mon Sep 17 00:00:00 2001 From: niten Date: Wed, 10 May 2023 10:49:39 -0700 Subject: [PATCH] Add flake.nix for lib --- deps.edn | 3 --- flake.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 flake.nix diff --git a/deps.edn b/deps.edn index 3ac30f1..d81012c 100644 --- a/deps.edn +++ b/deps.edn @@ -2,9 +2,6 @@ :paths ["src/clj" "src/java"] :deps { org.clojure/clojure { :mvn/version "1.11.1" } - ;;org.freedesktop/libdbus-java { :mvn/version "2.7" } - ;;com.github.hypfvieh/libmatthew { :mvn/version "0.8.3" } - ;;com.github.hypfvieh/dbus-java { :mvn/version "3.3.2" } com.github.hypfvieh/dbus-java-core { :mvn/version "4.3.0" } com.github.hypfvieh/dbus-java-transport-native-unixsocket { :mvn/version "4.3.0" } } diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e12511c --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Library for sending DBus notifications."; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-22.11"; + utils.url = "github:numtide/flake-utils"; + helpers = { + url = "git+https://git.fudo.org/fudo-public/nix-helpers.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, utils, helpers, ... }: + utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages."${system}"; + in { + packages = rec { + default = notifier; + notifier = helpers.packages."${system}".mkClojureLib { + name = "org.fudo/notifier"; + src = ./.; + }; + }; + + devShells = rec { + default = updateDeps; + updateDeps = pkgs.mkShell { + buildInputs = with helpers.packages."${system}"; + [ updateClojureDeps ]; + }; + }; + }); +}