Skip to content

Commit ee8aae3

Browse files
committed
build: add nix flake
1 parent 29a7fd0 commit ee8aae3

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

flake.nix

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
description = "seekers-api";
3+
4+
inputs = {
5+
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs =
10+
{
11+
nixpkgs,
12+
flake-utils,
13+
...
14+
}:
15+
flake-utils.lib.eachDefaultSystem (
16+
system:
17+
let
18+
pkgs = import nixpkgs {
19+
inherit system;
20+
};
21+
stdenv = pkgs.stdenv;
22+
lib = import nixpkgs.lib;
23+
shell = nixpkgs.legacyPackages."${system}".callPackage ./shell.nix {
24+
pkgs = pkgs;
25+
lib = lib;
26+
};
27+
in
28+
{
29+
# enables use of `nix shell`
30+
devShell = shell;
31+
}
32+
);
33+
}

shell.nix

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
pkgs ? import <nixpkgs> { },
3+
lib ? import <nixpkgs/lib> { },
4+
...
5+
}:
6+
7+
pkgs.mkShell {
8+
packages = with pkgs; [
9+
nixfmt-rfc-style
10+
];
11+
12+
nativeBuildInputs = with pkgs; [
13+
python312Packages.pygame
14+
python312Packages.grpcio
15+
python312Packages.protobuf
16+
];
17+
}

0 commit comments

Comments
 (0)