guix_mirror_bot pushed a commit to branch master
in repository guix.
commit eff0f4ee583c89b13b118492fb6594d6b0a4122f
Author: Giacomo Leidi <[email protected]>
AuthorDate: Tue Sep 16 11:24:00 2025 +0200
gnu: Add elixir-needle.
* gnu/packages/elixir-databases.scm (elixir-needle): New variable.
Change-Id: Ia4cff19deb34236c7d2058f4c4b36972146f21ab
Signed-off-by: Ludovic Courtès <[email protected]>
---
gnu/packages/elixir-databases.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/gnu/packages/elixir-databases.scm
b/gnu/packages/elixir-databases.scm
index 55a9d4cc4d..883073a790 100644
--- a/gnu/packages/elixir-databases.scm
+++ b/gnu/packages/elixir-databases.scm
@@ -228,6 +228,33 @@ ULID datatype for @code{Ecto} (using @code{ex_ulid}) and
related helpers.")
(home-page "https://hexdocs.pm/needle_ulid/")
(license license:expat)))
+(define-public elixir-needle
+ (package
+ (name "elixir-needle")
+ (version "0.8.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (hexpm-uri "needle" version))
+ (sha256
+ (base32 "0gf1bniwf650xrczvimmw1drg6cjqz21539nlhqw4la4m91jl7h4"))))
+ (build-system mix-build-system)
+ (propagated-inputs (list elixir-ecto-sql elixir-exto elixir-needle-ulid
+ erlang-telemetry))
+ (synopsis
+ "Universal foreign keys, virtual schemas, and shared data mixins")
+ (description
+ "When using a relational DB (such an @code{Ecto} schema with a Postgres
+table), usually a foreign key field has to be pre-defined with a reference
+pointing to a specific field in a specific table.
+
+Besides regular schemas with universal foreign keys (@code{Pointable}),
+@code{Needle} provides @code{Virtual} for schemas that don’t have any fields on
+their own, and @code{Mixin} for storing common fields that can be re-used by
+multiple @code{Pointable}s or @code{Virtual}s.")
+ (home-page "https://hexdocs.pm/needle/")
+ (license license:asl2.0)))
+
(define-public elixir-postgrex
(package
(name "elixir-postgrex")