summaryrefslogtreecommitdiff
path: root/Omni/Bild/Deps
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Bild/Deps')
-rw-r--r--Omni/Bild/Deps/C.nix1
-rw-r--r--Omni/Bild/Deps/Haskell.nix72
-rw-r--r--Omni/Bild/Deps/Python.nix1
-rw-r--r--Omni/Bild/Deps/accelerate.nix16
-rw-r--r--Omni/Bild/Deps/bitsandbytes.nix86
-rw-r--r--Omni/Bild/Deps/guile-opengl.nix32
-rw-r--r--Omni/Bild/Deps/inspekt3d.nix30
-rw-r--r--Omni/Bild/Deps/interegular.nix21
-rw-r--r--Omni/Bild/Deps/lion-pytorch.nix27
-rw-r--r--Omni/Bild/Deps/llm-ollama.nix40
-rw-r--r--Omni/Bild/Deps/llm-sentence-transformers.nix42
-rw-r--r--Omni/Bild/Deps/nostr-rs-relay.nix19
-rw-r--r--Omni/Bild/Deps/outlines.nix34
-rw-r--r--Omni/Bild/Deps/perscache.nix25
14 files changed, 446 insertions, 0 deletions
diff --git a/Omni/Bild/Deps/C.nix b/Omni/Bild/Deps/C.nix
new file mode 100644
index 0000000..3f670cd
--- /dev/null
+++ b/Omni/Bild/Deps/C.nix
@@ -0,0 +1 @@
+[ "libsodium" ]
diff --git a/Omni/Bild/Deps/Haskell.nix b/Omni/Bild/Deps/Haskell.nix
new file mode 100644
index 0000000..04f3a74
--- /dev/null
+++ b/Omni/Bild/Deps/Haskell.nix
@@ -0,0 +1,72 @@
+# This is the global set of Haskell packages which gets deployed to Hoogle, and
+# is available for selecting.
+
+[
+ "MonadRandom"
+ "QuickCheck"
+ "SafeSemaphore"
+ "acid-state"
+ "aeson"
+ "async"
+ "base"
+ "bytestring"
+ "clay"
+ "cmark"
+ "cmark-lucid"
+ "conduit"
+ "conduit-extra"
+ "config-ini"
+ "containers"
+ "directory"
+ "docopt"
+ "envy"
+ "fast-logger"
+ "filepath"
+ "github"
+ "haskeline"
+ "hostname"
+ "http-types"
+ "ixset"
+ "katip"
+ "lucid"
+ "monad-logger"
+ "mtl"
+ "neat-interpolation"
+ "network-uri"
+ "niv"
+ "optparse-simple"
+ "parsec"
+ "process"
+ "protolude"
+ "quickcheck-instances"
+ "rainbow"
+ "random"
+ "regex-applicative"
+ "req"
+ "safecopy"
+ "saltine"
+ "servant"
+ "servant-auth"
+ "servant-auth-server"
+ "servant-lucid"
+ "servant-server"
+ "split"
+ "stm"
+ "tasty"
+ "tasty-hunit"
+ "tasty-quickcheck"
+ "text"
+ "time"
+ "transformers"
+ "unagi-chan"
+ "unix"
+ "unordered-containers"
+ "uuid"
+ "vector"
+ "wai"
+ "wai-app-static"
+ "wai-extra"
+ "wai-middleware-metrics"
+ "warp"
+ "x509"
+]
diff --git a/Omni/Bild/Deps/Python.nix b/Omni/Bild/Deps/Python.nix
new file mode 100644
index 0000000..b0b2465
--- /dev/null
+++ b/Omni/Bild/Deps/Python.nix
@@ -0,0 +1 @@
+[ "cryptography" "llm" "mypy" "nltk" "slixmpp" ]
diff --git a/Omni/Bild/Deps/accelerate.nix b/Omni/Bild/Deps/accelerate.nix
new file mode 100644
index 0000000..be1d2fd
--- /dev/null
+++ b/Omni/Bild/Deps/accelerate.nix
@@ -0,0 +1,16 @@
+{ fetchFromGitHub, buildPythonPackage, numpy, packaging, psutil, pyyaml, torch
+}:
+
+buildPythonPackage rec {
+ name = "accelerate";
+ version = "0.15.0";
+ propagatedBuildInputs = [ numpy packaging psutil pyyaml torch ];
+ doCheck = false;
+ src = fetchFromGitHub {
+ owner = "huggingface";
+ repo = "accelerate";
+ rev = "v${version}";
+ sha256 = "sha256-agfbOaa+Nm10HZkd2Y7zR3R37n+vLNsxCyxZax6O3Lo=";
+ };
+}
+
diff --git a/Omni/Bild/Deps/bitsandbytes.nix b/Omni/Bild/Deps/bitsandbytes.nix
new file mode 100644
index 0000000..eb32aac
--- /dev/null
+++ b/Omni/Bild/Deps/bitsandbytes.nix
@@ -0,0 +1,86 @@
+{ lib, buildPythonPackage, fetchFromGitHub, python, pythonOlder, pytestCheckHook
+, setuptools, torch, einops, lion-pytorch, scipy, symlinkJoin }:
+
+let
+ pname = "bitsandbytes";
+ version = "0.38.0";
+
+ inherit (torch) cudaPackages cudaSupport;
+ inherit (cudaPackages) cudaVersion;
+
+ # NOTE: torchvision doesn't use cudnn; torch does!
+ # For this reason it is not included.
+ cuda-common-redist = with cudaPackages; [
+ cuda_cccl # <thrust/*>
+ libcublas # cublas_v2.h
+ libcurand
+ libcusolver # cusolverDn.h
+ libcusparse # cusparse.h
+ ];
+
+ cuda-native-redist = symlinkJoin {
+ name = "cuda-native-redist-${cudaVersion}";
+ paths = with cudaPackages;
+ [
+ cuda_cudart # cuda_runtime.h cuda_runtime_api.h
+ cuda_nvcc
+ ] ++ cuda-common-redist;
+ };
+
+ cuda-redist = symlinkJoin {
+ name = "cuda-redist-${cudaVersion}";
+ paths = cuda-common-redist;
+ };
+
+in buildPythonPackage {
+ inherit pname version;
+ format = "pyproject";
+
+ disabled = pythonOlder "3.7";
+
+ src = fetchFromGitHub {
+ owner = "TimDettmers";
+ repo = pname;
+ rev = "refs/tags/${version}";
+ hash = "sha256-gGlbzTDvZNo4MhcYzLvWuB2ec7q+Qt5/LtTbJ0Rc+Kk=";
+ };
+
+ postPatch = ''
+ substituteInPlace Makefile --replace "/usr/bin/g++" "g++" --replace "lib64" "lib"
+ substituteInPlace bitsandbytes/cuda_setup/main.py \
+ --replace "binary_path = package_dir / binary_name" \
+ "binary_path = Path('$out/${python.sitePackages}/${pname}')/binary_name"
+ '' + lib.optionalString torch.cudaSupport ''
+ substituteInPlace bitsandbytes/cuda_setup/main.py \
+ --replace "/usr/local/cuda/lib64" "${cuda-native-redist}/lib"
+ '';
+
+ CUDA_HOME = "${cuda-native-redist}";
+
+ preBuild = if torch.cudaSupport then
+ with torch.cudaPackages;
+ let
+ cudaVersion = lib.concatStrings
+ (lib.splitVersion torch.cudaPackages.cudaMajorMinorVersion);
+ in "make CUDA_VERSION=${cudaVersion} cuda${cudaMajorVersion}x"
+ else
+ "make CUDA_VERSION=CPU cpuonly";
+
+ nativeBuildInputs = [ setuptools ]
+ ++ lib.optionals torch.cudaSupport [ cuda-native-redist ];
+ buildInputs = lib.optionals torch.cudaSupport [ cuda-redist ];
+
+ propagatedBuildInputs = [ torch ];
+
+ doCheck = false; # tests require CUDA and also GPU access
+ nativeCheckInputs = [ pytestCheckHook einops lion-pytorch scipy ];
+
+ pythonImportsCheck = [ "bitsandbytes" ];
+
+ meta = with lib; {
+ homepage = "https://github.com/TimDettmers/bitsandbytes";
+ description = "8-bit CUDA functions for PyTorch";
+ license = licenses.mit;
+ maintainers = with maintainers; [ bcdarwin ];
+ };
+}
diff --git a/Omni/Bild/Deps/guile-opengl.nix b/Omni/Bild/Deps/guile-opengl.nix
new file mode 100644
index 0000000..af01082
--- /dev/null
+++ b/Omni/Bild/Deps/guile-opengl.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchurl, pkg-config, guile, libGL, libGLU, freeglut }:
+
+let
+ name = "guile-opengl-${version}";
+ version = "0.1.0";
+in stdenv.mkDerivation {
+ inherit name;
+
+ src = fetchurl {
+ url = "mirror://gnu/guile-opengl/${name}.tar.gz";
+ sha256 = "13qfx4xh8baryxqrv986l848ygd0piqwm6s2s90pxk9c0m9vklim";
+ };
+
+ patchPhase = ''
+ substituteInPlace glx/runtime.scm \
+ --replace '(dynamic-link "libGL")' '(dynamic-link "${libGL}/lib/libGL.so")'
+ substituteInPlace glu/runtime.scm \
+ --replace '(dynamic-link "libGLU")' '(dynamic-link "${libGLU}/lib/libGLU.so")'
+ substituteInPlace glut/runtime.scm \
+ --replace '(dynamic-link "libglut")' '(dynamic-link "${freeglut}/lib/libglut.so")'
+ '';
+
+ nativeBuildInputs = [ pkg-config guile libGL libGLU freeglut ];
+
+ meta = with lib; {
+ description = "Guile bindings for the OpenGL graphics API";
+ homepage = "https://www.gnu.org/software/guile-opengl/";
+ license = licenses.gpl3Plus;
+ maintainers = with maintainers; [ vyp ];
+ platforms = platforms.all;
+ };
+}
diff --git a/Omni/Bild/Deps/inspekt3d.nix b/Omni/Bild/Deps/inspekt3d.nix
new file mode 100644
index 0000000..3146350
--- /dev/null
+++ b/Omni/Bild/Deps/inspekt3d.nix
@@ -0,0 +1,30 @@
+{ stdenv, lib, autoreconfHook, pkg-config, guile, guile-opengl, mesa
+, glibcLocales, libfive, sources }:
+
+stdenv.mkDerivation {
+ name = "inspekt3d-unstable";
+
+ src = sources.inspekt3d;
+ version = "unstable-2018-10-17";
+
+ nativeBuildInputs = [ pkg-config autoreconfHook ];
+ buildInputs = [ guile glibcLocales mesa ];
+ propagatedBuildInputs = [ guile-opengl libfive ];
+
+ preBuild = ''
+ substituteInPlace inspekt3d/library.scm \
+ --replace '"libfive-guile"' '"${libfive}/lib/libfive-guile.so"' \
+ --replace '"libfive"' '"${libfive}/lib/libfive.so"'
+ '';
+
+ GUILE_AUTO_COMPILE = 0;
+ preConfigure = "./bootstrap";
+
+ meta = with lib; {
+ description = "Lightweight 3D viewer for Libfive written in Guile Scheme";
+ homepage = "https://sr.ht/~morgansmith/inspekt3d";
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ bsima ];
+ platforms = platforms.all;
+ };
+}
diff --git a/Omni/Bild/Deps/interegular.nix b/Omni/Bild/Deps/interegular.nix
new file mode 100644
index 0000000..24065d8
--- /dev/null
+++ b/Omni/Bild/Deps/interegular.nix
@@ -0,0 +1,21 @@
+{ lib, sources, buildPythonPackage }:
+
+buildPythonPackage rec {
+ pname = "interegular";
+ version = sources.interegular.rev;
+ format = "setuptools";
+
+ src = sources.interegular;
+
+ propagatedBuildInputs = [ ];
+
+ doCheck = false; # no tests currently
+ pythonImportsCheck = [ "interegular" ];
+
+ meta = with lib; {
+ description = "Allows to check regexes for overlaps.";
+ homepage = "https://github.com/MegaIng/interegular";
+ license = licenses.mit;
+ maintainers = with maintainers; [ bsima ];
+ };
+}
diff --git a/Omni/Bild/Deps/lion-pytorch.nix b/Omni/Bild/Deps/lion-pytorch.nix
new file mode 100644
index 0000000..7b06e78
--- /dev/null
+++ b/Omni/Bild/Deps/lion-pytorch.nix
@@ -0,0 +1,27 @@
+{ lib, buildPythonPackage, pythonOlder, fetchFromGitHub, torch }:
+
+buildPythonPackage rec {
+ pname = "lion-pytorch";
+ version = "0.1.2";
+ format = "setuptools";
+ disabled = pythonOlder "3.6";
+
+ src = fetchFromGitHub {
+ owner = "lucidrains";
+ repo = "lion-pytorch";
+ rev = "refs/tags/${version}";
+ hash = "sha256-9hdpRJvCpv3PeC7f0IXpHt6i+e6LiT0QUl5jeDGelQE=";
+ };
+
+ propagatedBuildInputs = [ torch ];
+
+ pythonImportsCheck = [ "lion_pytorch" ];
+ doCheck = false; # no tests currently
+
+ meta = with lib; {
+ description = "Optimizer tuned by Google Brain using genetic algorithms";
+ homepage = "https://github.com/lucidrains/lion-pytorch";
+ license = licenses.mit;
+ maintainers = with maintainers; [ bcdarwin ];
+ };
+}
diff --git a/Omni/Bild/Deps/llm-ollama.nix b/Omni/Bild/Deps/llm-ollama.nix
new file mode 100644
index 0000000..e2b6a66
--- /dev/null
+++ b/Omni/Bild/Deps/llm-ollama.nix
@@ -0,0 +1,40 @@
+{ buildPythonPackage, fetchFromGitHub, lib, llm, ollama, pytestCheckHook
+, setuptools, pythonOlder, }:
+buildPythonPackage rec {
+ pname = "llm-ollama";
+ version = "0.3.0";
+ pyproject = true;
+
+ disabled = pythonOlder "3.8";
+
+ src = fetchFromGitHub {
+ owner = "taketwo";
+ repo = pname;
+ rev = "refs/tags/${version}";
+ hash = "sha256-Ar0Ux8BNGY0i764CEk7+48J6jnndlRIIMPZ9tFpXiy4=";
+ };
+
+ nativeBuildInputs = [ setuptools ];
+
+ buildInputs = [ llm ollama ];
+
+ propagatedBuildInputs = [ ollama ];
+
+ disabledTests = [
+ # wants to mkdir in the /homeless-shelter
+ "test_registered_models"
+ ];
+
+ nativeCheckInputs = [ pytestCheckHook ];
+
+ pythonImportsCheck = [ "llm_ollama" ];
+
+ meta = with lib; {
+ homepage = "https://github.com/taketwo/llm-ollama";
+ description =
+ "LLM plugin providing access to local Ollama models usting HTTP API";
+ changelog = "https://github.com/taketwo/llm-ollama/releases/tag/${version}";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ bsima ];
+ };
+}
diff --git a/Omni/Bild/Deps/llm-sentence-transformers.nix b/Omni/Bild/Deps/llm-sentence-transformers.nix
new file mode 100644
index 0000000..4d63c83
--- /dev/null
+++ b/Omni/Bild/Deps/llm-sentence-transformers.nix
@@ -0,0 +1,42 @@
+{ buildPythonPackage, fetchFromGitHub, lib, llm, sentence-transformers
+, pytestCheckHook, setuptools, pythonOlder, }:
+buildPythonPackage rec {
+ pname = "llm-sentence-transformers";
+ version = "0.2";
+ pyproject = true;
+
+ disabled = pythonOlder "3.8";
+
+ src = fetchFromGitHub {
+ owner = "simonw";
+ repo = pname;
+ rev = "refs/tags/${version}";
+ hash = "sha256-1NlKPWekdVLrNkIMWXLCRWn54RlAEuEDWMCDnQHNkBc=";
+ };
+
+ nativeBuildInputs = [ setuptools ];
+
+ buildInputs = [ llm sentence-transformers ];
+
+ propagatedBuildInputs = [ sentence-transformers ];
+
+ # fails because of some pydantic warnings
+ doCheck = false;
+ disabledTests = [
+ # wants to mkdir in the /homeless-shelter
+ "test_sentence_transformers"
+ ];
+
+ nativeCheckInputs = [ pytestCheckHook ];
+
+ pythonImportsCheck = [ "llm_sentence_transformers" ];
+
+ meta = with lib; {
+ homepage = "https://github.com/taketwo/llm-sentence-transformers";
+ description = "LLM plugin for embeddings using sentence-transformers";
+ changelog =
+ "https://github.com/taketwo/llm-sentence-transformers/releases/tag/${version}";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ bsima ];
+ };
+}
diff --git a/Omni/Bild/Deps/nostr-rs-relay.nix b/Omni/Bild/Deps/nostr-rs-relay.nix
new file mode 100644
index 0000000..0eef13f
--- /dev/null
+++ b/Omni/Bild/Deps/nostr-rs-relay.nix
@@ -0,0 +1,19 @@
+{ fetchFromSourcehut, rustPlatform, pkg-config, openssl }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "nostr-rs-relay";
+ version = "0.7.15";
+
+ src = fetchFromSourcehut {
+ owner = "~gheartsfield";
+ repo = pname;
+ rev = version;
+ sha256 = "sha256-aa1uFJcpQPMVzIWpkQ2MW6LIzTnhXNQc220scbzwJ5k=";
+ };
+
+ cargoSha256 = "sha256-3593pjc4A4NsEnE/ZYsR1vSMCvw2ZJue4EIY6cFa2WA=";
+
+ nativeBuildInputs = [ pkg-config openssl.dev ];
+
+ buildInputs = [ openssl.dev ];
+}
diff --git a/Omni/Bild/Deps/outlines.nix b/Omni/Bild/Deps/outlines.nix
new file mode 100644
index 0000000..29ef41b
--- /dev/null
+++ b/Omni/Bild/Deps/outlines.nix
@@ -0,0 +1,34 @@
+{ lib, sources, buildPythonPackage, interegular, jinja2, lark, numpy, perscache
+, pillow, pydantic, regex, scipy, tenacity, torch }:
+
+buildPythonPackage rec {
+ pname = "outlines";
+ version = sources.outlines.rev;
+ format = "pyproject";
+
+ src = sources.outlines;
+
+ propagatedBuildInputs = [
+ interegular
+ jinja2
+ lark
+ numpy
+ perscache
+ pillow
+ pydantic
+ regex
+ scipy
+ tenacity
+ torch
+ ];
+
+ doCheck = false; # no tests currently
+ pythonImportsCheck = [ "outlines" ];
+
+ meta = with lib; {
+ description = "Probabilistic Generative Model Programming";
+ homepage = "https://github.com/normal-computing/outlines";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ bsima ];
+ };
+}
diff --git a/Omni/Bild/Deps/perscache.nix b/Omni/Bild/Deps/perscache.nix
new file mode 100644
index 0000000..508a261
--- /dev/null
+++ b/Omni/Bild/Deps/perscache.nix
@@ -0,0 +1,25 @@
+{ lib, sources, buildPythonPackage, beartype, cloudpickle, icontract, pbr }:
+
+buildPythonPackage rec {
+ pname = "perscache";
+ version = sources.perscache.rev;
+
+ src = sources.perscache;
+
+ propagatedBuildInputs = [ beartype cloudpickle icontract pbr ];
+ PBR_VERSION = version;
+
+ doCheck = false; # no tests currently
+ pythonImportsCheck = [ "perscache" ];
+
+ meta = with lib; {
+ description = ''
+ An easy to use decorator for persistent memoization: like
+ `functools.lrucache`, but results can be saved in any format to any
+ storage.
+ '';
+ homepage = "https://github.com/leshchenko1979/perscache";
+ license = licenses.mit;
+ maintainers = with maintainers; [ bsima ];
+ };
+}