Skip to content

Commit 387a24f

Browse files
committed
feat: add nix flake
1 parent 6934c00 commit 387a24f

4 files changed

Lines changed: 214 additions & 0 deletions

File tree

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,3 +158,7 @@ cython_debug/
158158
# and can be added to the global gitignore or merged into this file. For a more nuclear
159159
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160160
#.idea/
161+
162+
# Nix
163+
result
164+
.direnv

flake.lock

Lines changed: 175 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
description = "A terminal application to view, tail, merge, and search log files (plus JSONL).";
3+
4+
inputs = {
5+
flake-utils.url = "github:numtide/flake-utils";
6+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
7+
poetry2nix = {
8+
url = "github:nix-community/poetry2nix";
9+
inputs.nixpkgs.follows = "nixpkgs";
10+
};
11+
};
12+
13+
outputs = {
14+
self,
15+
nixpkgs,
16+
flake-utils,
17+
poetry2nix,
18+
}:
19+
flake-utils.lib.eachDefaultSystem (system: let
20+
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
21+
pkgs = nixpkgs.legacyPackages.${system};
22+
inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication;
23+
in {
24+
packages = {
25+
toolong = mkPoetryApplication {projectDir = self;};
26+
default = self.packages.${system}.toolong;
27+
};
28+
29+
devShells.default = pkgs.mkShell {
30+
inputsFrom = [self.packages.${system}.toolong];
31+
packages = [pkgs.poetry];
32+
};
33+
});
34+
}

0 commit comments

Comments
 (0)