This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Claudex - A CLI proxy to run Claude API requests against OpenAI-compatible LLM providers"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib | |
, buildPythonPackage | |
, fetchPypi | |
, pytestCheckHook | |
, pythonOlder | |
, poetry-core | |
}: | |
buildPythonPackage rec { | |
pname = "terminaltexteffects"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example from https://www.scala-lang.org/blog/2016/12/07/implicit-function-types.html | |
import scala.collection.mutable.ListBuffer | |
import scala.util.chaining.* | |
class Transaction: | |
private val log = ListBuffer[String]() | |
private var aborted = false | |
private var committed = false | |
def println(s: String): Unit = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> { } }: | |
(pkgs.buildFHSUserEnv { | |
name = "DungeonDraftFhs"; | |
targetPkgs = pkgs: | |
with pkgs; [ | |
alsaLib | |
libglvnd | |
pulseaudioLight | |
] ++ (with xlibs; [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {}}: | |
(pkgs.buildFHSUserEnv { | |
name = "OtherWorldMapper-FHS"; | |
targetPkgs = pkgs: with pkgs; [ | |
gtk2-x11 | |
xorg.libX11 | |
expat | |
util-linux | |
pango |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.ByteArrayOutputStream | |
import java.nio.charset.StandardCharsets | |
import java.nio.file.{Path, Paths} | |
import java.util.zip.{ZipEntry, ZipOutputStream} | |
import akka.NotUsed | |
import akka.actor.ActorSystem | |
import akka.stream.{ActorMaterializer, IOResult} | |
import akka.stream.scaladsl.{FileIO, Flow, Keep, Source} | |
import akka.util.ByteString |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: with pkgs.dockerTools; | |
let | |
someBaseImage = pullImage { | |
imageName = "nixos/nix"; | |
imageDigest = "sha256:1b97dc98b599779d80271d4203275627c0749d8bd5e9b9c868154249395cbc1b"; | |
sha256 = "134h20xgpqchcvgv0f13knsi2p7jfl4m9mk8hkvdgh8hnz0hj3hc"; | |
}; | |
in | |
buildImage { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: with pkgs.dockerTools; | |
let | |
someBaseImage = pullImage { | |
imageName = "nixos/nix"; | |
imageDigest = "sha256:1b97dc98b599779d80271d4203275627c0749d8bd5e9b9c868154249395cbc1b"; | |
sha256 = "134h20xgpqchcvgv0f13knsi2p7jfl4m9mk8hkvdgh8hnz0hj3hc"; | |
}; | |
in | |
buildImage { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {}}: with pkgs; | |
let | |
libPath = stdenv.lib.makeLibraryPath (with pkgs.xorg; [ | |
alsaLib | |
atk | |
cairo | |
cups | |
dbus_daemon.lib | |
expat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this command to build the pdf: | |
# > nix-shell --pure shell.nix --command 'cd src; make' | |
{ pkgs ? import <nixpkgs> {} }: with pkgs; | |
mkShell { | |
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ inconsolata-lgc libertine libertinus ]; }; | |
buildInputs = [ | |
(texlive.combine { | |
inherit (texlive) | |
fvextra |
NewerOlder