add flake and source

This commit is contained in:
2025-02-11 16:05:41 -06:00
parent 8332de95a2
commit 0b2415e684
3 changed files with 72 additions and 0 deletions

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1739206421,
"narHash": "sha256-PwQASeL2cGVmrtQYlrBur0U20Xy07uSWVnFup2PHnDs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "44534bc021b85c8d78e465021e21f33b856e2540",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

36
flake.nix Normal file
View File

@@ -0,0 +1,36 @@
{
description = "Build Project Siren";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};
outputs = { self, nixpkgs, ... }: let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
Siren = pkgs.stdenv.mkDerivation {
name = "Siren";
src = ./src;
buildInputs = with pkgs; [
(python311.withPackages (ps: with ps; [
ollama
]))
];
buildPhase = ''
'';
installPhase = ''
mkdir -p $out/bin
'';
};
packages.${system}.default = self.Siren;
};
}

9
src/siren.py Normal file
View File

@@ -0,0 +1,9 @@
import ollama
c = ollama.Client(
host='https://ollama.blunkall.us'
)
r = c.generate(model='llama3.2', prompt='say hello')['response']
print(r)