Add flake.nix to project
This commit is contained in:
parent
e04d558b3a
commit
cebb6ccb86
4
.gitignore
vendored
4
.gitignore
vendored
@ -18,4 +18,6 @@ venv.bak/
|
||||
.env.production.local
|
||||
.env.local
|
||||
|
||||
dist/
|
||||
dist/
|
||||
|
||||
result
|
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1683014792,
|
||||
"narHash": "sha256-6Va9iVtmmsw4raBc3QKvQT2KT/NGRWlvUlJj46zN8B8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1a411f23ba299db155a5b45d5e145b85a7aafc42",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
44
flake.nix
Normal file
44
flake.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{
|
||||
# inputs.nixpkgs.url = "nixpkgs/nixos-22.11";
|
||||
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { self, nixpkgs }: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
inherit (pkgs) lib;
|
||||
in {
|
||||
apps.${system} = let
|
||||
app = program: {
|
||||
type = "app";
|
||||
inherit program;
|
||||
};
|
||||
in {
|
||||
default = self.apps.${system}.dev;
|
||||
dev = app "${self.packages.${system}.worblehat}/bin/dev";
|
||||
scanner = app "${self.packages.${system}.worblehat}/bin/scanner";
|
||||
};
|
||||
|
||||
packages.${system} = {
|
||||
default = self.packages.${system}.worblehat;
|
||||
worblehat = with pkgs.python3Packages; buildPythonPackage {
|
||||
pname = "worblehat";
|
||||
version = "0.1.0";
|
||||
src = ./.;
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
buildInputs = [ poetry-core ];
|
||||
propagatedBuildInputs = [
|
||||
alembic
|
||||
click
|
||||
flask
|
||||
flask-admin
|
||||
flask-sqlalchemy
|
||||
isbnlib
|
||||
python-dotenv
|
||||
sqlalchemy
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -7,22 +7,22 @@ license = "MIT"
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
alembic = "^1.10.4"
|
||||
alembic = "^1.9.4"
|
||||
click = "^8.1.3"
|
||||
flask = "^2.3.2"
|
||||
flask = "^2.2.2"
|
||||
flask-admin = "^1.6.1"
|
||||
flask-sqlalchemy = "^3.0.3"
|
||||
isbnlib = "^3.10.14"
|
||||
python = "^3.10"
|
||||
python-dotenv = "^1.0.0"
|
||||
sqlalchemy = "^2.0.12"
|
||||
sqlalchemy = "^2.0.8"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
werkzeug = "^2.3.3"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
scanner = "worblehat.tools.scanner:main"
|
||||
dev = "worblehat.wsgi-dev:main"
|
||||
dev = "worblehat.wsgi_dev:main"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
|
Loading…
Reference in New Issue
Block a user