Skip to content

Commit

Permalink
Flakify remarks-server
Browse files Browse the repository at this point in the history
  • Loading branch information
Azeirah committed Nov 23, 2024
1 parent 14ccf3a commit 1e7fa57
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 2 deletions.
44 changes: 44 additions & 0 deletions deployment/remarks-server/flake.lock

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

30 changes: 30 additions & 0 deletions deployment/remarks-server/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
description = "A flake for remarks-server";

inputs = {
pyproject-nix = {
url = "github:nix-community/pyproject.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = {nixpkgs, pyproject-nix, ...}:
let
inherit (nixpkgs) lib;

project = pyproject-nix.lib.project.loadPyproject {
projectRoot = ./.;
};

pkgs = nixpkgs.legacyPackages.x86_64-linux;

python = pkgs.python3;
in
{
packages.x86_64-linux.default =
let
attrs = project.renderers.buildPythonPackage { inherit python; };
in
python.pkgs.buildPythonPackage (attrs // {});
};
}
15 changes: 15 additions & 0 deletions deployment/remarks-server/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.poetry]
name = "remarks-server"
version = "0.1.0"
description = ""
authors = ["Laura Brekelmans <mail@laura.fm>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
Flask = "^3.1.0"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
3 changes: 1 addition & 2 deletions deployment/remarks-server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def process():
print(f"Got a request to process {params['in_path']}")

parent_dir = in_path
for i in range(1):
parent_dir = os.path.dirname(parent_dir)
parent_dir = os.path.dirname(parent_dir)
out_dir = os.path.join(parent_dir, "out")

print(f"Making directory {out_dir}")
Expand Down

0 comments on commit 1e7fa57

Please sign in to comment.