modernize

This commit is contained in:
Peder Bergebakken Sundt 2024-11-15 00:21:53 +01:00
parent 1164d492a3
commit e1605aab29
6 changed files with 27 additions and 18 deletions

2
.gitignore vendored
View File

@ -1,5 +1,7 @@
result result
result-* result-*
.direnv
.devenv
dist dist

View File

@ -20,11 +20,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1693145325, "lastModified": 1731611831,
"narHash": "sha256-Gat9xskErH1zOcLjYMhSDBo0JTBZKfGS0xJlIRnj6Rc=", "narHash": "sha256-R51rOqkWMfubBkZ9BY4Y1VaRoeqEBshlfQ8mMH5RjqI=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cddebdb60de376c1bdb7a4e6ee3d98355453fe56", "rev": "cea28c811faadb50bee00d433bbf2fea845a43e4",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -9,9 +9,7 @@
in { in {
packages = { packages = {
default = self.packages.${system}.dibbler; default = self.packages.${system}.dibbler;
dibbler = pkgs.callPackage ./nix/dibbler.nix { dibbler = pkgs.python311Packages.callPackage ./nix/dibbler.nix { };
python3Packages = pkgs.python311Packages;
};
}; };
apps = { apps = {

View File

@ -1,17 +1,24 @@
{ lib { lib
, python3Packages
, fetchFromGitHub , fetchFromGitHub
, buildPythonApplication
, setuptools
, brother-ql
, matplotlib
, psycopg2
, python-barcode
, sqlalchemy
}: }:
python3Packages.buildPythonApplication {
buildPythonApplication {
pname = "dibbler"; pname = "dibbler";
version = "unstable-2021-09-07"; version = "0-unstable-2021-09-07";
pyproject = true;
src = lib.cleanSource ../.; src = lib.cleanSource ../.;
format = "pyproject"; built-system = [ setuptools ];
dependencies = [
nativeBuildInputs = with python3Packages; [ setuptools ]; brother-ql#-next
propagatedBuildInputs = with python3Packages; [
brother-ql
matplotlib matplotlib
psycopg2 psycopg2
python-barcode python-barcode

View File

@ -23,7 +23,10 @@ in {
group = "dibbler"; group = "dibbler";
extraGroups = [ "lp" ]; extraGroups = [ "lp" ];
isNormalUser = true; isNormalUser = true;
shell = ((pkgs.writeShellScriptBin "login-shell" "${screen} -x dibbler") // {shellPath = "/bin/login-shell";}); shell = (
(pkgs.writeShellScriptBin "login-shell" "${screen} -x dibbler")
// {shellPath = "/bin/login-shell";}
);
}; };
}; };

View File

@ -14,7 +14,7 @@ classifiers = [
] ]
dependencies = [ dependencies = [
"SQLAlchemy >= 2.0, <2.1", "SQLAlchemy >= 2.0, <2.1",
"brother-ql", "brother_ql_next",
"matplotlib", "matplotlib",
"psycopg2 >= 2.8, <2.10", "psycopg2 >= 2.8, <2.10",
"python-barcode", "python-barcode",
@ -32,4 +32,3 @@ line-length = 100
[tool.ruff] [tool.ruff]
line-length = 100 line-length = 100