Skip to content

Commit

Permalink
Merge pull request #17 from buurro/main
Browse files Browse the repository at this point in the history
Add nix flake
  • Loading branch information
lcfd authored Oct 13, 2023
2 parents 79563a0 + 30b7708 commit c863752
Show file tree
Hide file tree
Showing 4 changed files with 180 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
result
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ pipx install trakcli
### Brew

TBA

### Nix

If you have [Nix](https://nixos.org/download.html) installed and flakes enabled, you can try trak using:

```bash
nix run github:lcfd/trak
```

The package will be built from source, so it might take a while.

You can pass arguments like this:

`nix run github:lcfd/trak -- --help`

### Local

Run `poetry build` and then
Expand Down
138 changes: 138 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
inputs.poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};

outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
let
cli = poetry2nix.legacyPackages.${system}.mkPoetryApplication {
projectDir = ./cli;
preferWheels = true;
python = nixpkgs.legacyPackages.${system}.python311;
checkGroups = [ ];
meta.mainProgram = "trak";
};
in
{
packages = {
default = cli;
};
}
);
}

0 comments on commit c863752

Please sign in to comment.