Skip to content

Commit

Permalink
fastapi-dls: init at 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MakiseKurisu committed Nov 24, 2024
1 parent 87ed7eb commit 6ad8520
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions pkgs/by-name/fa/fastapi-dls/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
lib,
python3,
fetchFromGitLab,
gitUpdater,
makeWrapper,
}:

let

pythonEnv = python3.withPackages (
packages:
with packages;
[
fastapi
uvicorn
python-jose
pycryptodome
python-dateutil
sqlalchemy
markdown
python-dotenv
]
++ uvicorn.optional-dependencies.standard
);

version = "1.4.1";

in
python3.pkgs.buildPythonApplication {
pname = "fastapi-dls";
inherit version;
pyproject = false;

src = fetchFromGitLab {
domain = "git.collinwebdesigns.de";
owner = "oscar.krause";
repo = "fastapi-dls";
rev = "refs/tags/${version}";
hash = "sha256-H4mtmJ4iQXPZFWQPm12aH/kdg9TAMgHkvkbaHfxfS3I=";
};

postInstall = ''
mkdir -p $out/bin $out/share/fastapi-dls
cp -r README.md app $out/share/fastapi-dls
makeWrapper ${pythonEnv}/bin/uvicorn $out/bin/fastapi-dls \
--add-flags "--app-dir $out/share/fastapi-dls/app" \
--add-flags "--proxy-headers" \
--add-flags "main:app"
'';

passthru.updateScript = gitUpdater { };

meta = with lib; {
homepage = "https://git.collinwebdesigns.de/oscar.krause/fastapi-dls";
license = licenses.unfree;
description = "Minimal Delegated License Service (DLS)";
mainProgram = "fastapi-dls";
platforms = platforms.linux;
maintainers = with maintainers; [ makisekurisu ];
};
}

0 comments on commit 6ad8520

Please sign in to comment.