Skip to content

Instantly share code, notes, and snippets.

@suhr
Last active December 16, 2023 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suhr/49139b2a2b18818cc5a967c0f2b1bfcb to your computer and use it in GitHub Desktop.
Save suhr/49139b2a2b18818cc5a967c0f2b1bfcb to your computer and use it in GitHub Desktop.
{
description = "oTerm Application";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
pkgs = import nixpkgs {system="x86_64-linux";};
aiosql91 = pkgs.python311Packages.aiosql.overrideAttrs rec {
version = "9.1";
src = pkgs.fetchFromGitHub {
owner = "nackjicholson";
repo = "aiosql";
rev = "refs/tags/${version}";
hash = "sha256-xcrNnp3ZfWLbz+/77N3R5x7N2n7nPcw0khqaIeHn0+Y=";
};
};
oterm = pkgs.python311Packages.buildPythonPackage rec {
name = "oterm-${version}";
version = "0.1.16";
src = ./.;
propagatedBuildInputs = with pkgs.python311Packages; [
poetry-core
textual
typer
python-dotenv
httpx
aiosql91
aiosqlite
pyperclip
packaging
];
buildInputs = with pkgs.python311Packages; [
# pdbpp
pkgs.ruff
black
pytest
pytest-asyncio
textual-dev
aiohttp
];
format = "pyproject";
};
in {
packages.x86_64-linux.default = oterm;
apps.x86_64-linux.default = {
type = "app";
program = "${oterm}/bin/oterm";
};
devShells.x86_64-linux.default = pkgs.mkShell {
buildInputs = [ oterm ];
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment