update
This commit is contained in:
parent
a5d5c91303
commit
df62d68e15
4 changed files with 870 additions and 776 deletions
145
flake.lock
145
flake.lock
|
@ -1,12 +1,30 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"bash": {
|
||||
"locked": {
|
||||
"lastModified": 1678901627,
|
||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
||||
"lastModified": 1678247195,
|
||||
"narHash": "sha256-m/wSwlSket+hob3JED4XUvoWJLtW7yhtOiZrlRDMShs=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "e7a00dcc0e75bc3ef6856bdd94d7d809245f5636",
|
||||
"revCount": 1,
|
||||
"type": "git",
|
||||
"url": "https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692799911,
|
||||
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
||||
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -15,25 +33,134 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"make-shell": {
|
||||
"locked": {
|
||||
"lastModified": 1634940815,
|
||||
"narHash": "sha256-P69OmveboXzS+es1vQGS4bt+ckwbeIExqxfGLjGuJqA=",
|
||||
"owner": "ursi",
|
||||
"repo": "nix-make-shell",
|
||||
"rev": "8add91681170924e4d0591b22f294aee3f5516f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ursi",
|
||||
"repo": "nix-make-shell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-github-actions": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"poetry2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688870561,
|
||||
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-github-actions",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1679944645,
|
||||
"narHash": "sha256-e5Qyoe11UZjVfgRfwNoSU57ZeKuEmjYb77B9IVW7L/M=",
|
||||
"lastModified": 1693231525,
|
||||
"narHash": "sha256-Zmh8m0HHcgGBDth6jdJPmc4UAAP0L4jQmqIztywF1Iw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4bb072f0a8b267613c127684e099a70e1f6ff106",
|
||||
"rev": "c540061ac8d72d6e6d99345bd2d590c82b2f58c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixos-23.05",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"poetry2nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693051011,
|
||||
"narHash": "sha256-HNbuVCS/Fnl1YZOjBk9/MlIem+wM8fvIzTH0CVQrLSQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"rev": "5b3a5151cf212021ff8d424f215fb030e4ff2837",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "poetry2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"bash": "bash",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"make-shell": "make-shell",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"poetry2nix": "poetry2nix"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
107
flake.nix
107
flake.nix
|
@ -3,45 +3,69 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs = {
|
||||
url = "nixpkgs/nixos-unstable";
|
||||
url = "nixpkgs/nixos-23.05";
|
||||
};
|
||||
poetry2nix = {
|
||||
url = "github:nix-community/poetry2nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
flake-utils = {
|
||||
url = "github:numtide/flake-utils";
|
||||
};
|
||||
bash = {
|
||||
url = "git+https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git";
|
||||
};
|
||||
outputs = { self, nixpkgs, flake-utils, ... }@inputs:
|
||||
make-shell = {
|
||||
url = "github:ursi/nix-make-shell";
|
||||
};
|
||||
};
|
||||
outputs = { self, nixpkgs, poetry2nix, flake-utils, bash, make-shell, ... }@inputs:
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system:
|
||||
let
|
||||
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication overrides;
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
in
|
||||
{
|
||||
devShells.default =
|
||||
# let
|
||||
# python = pkgs.python310.withPackages (ps: with ps; [
|
||||
# poetry-core
|
||||
# ]);
|
||||
# in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
#python
|
||||
let
|
||||
make-shell = import inputs.make-shell {
|
||||
inherit system;
|
||||
pkgs = pkgs;
|
||||
};
|
||||
python = pkgs.python311.withPackages (ps: with ps; [
|
||||
poetry-core
|
||||
]);
|
||||
project = "greendeck";
|
||||
prompt = (
|
||||
bash.build_prompt
|
||||
bash.ansi_normal_blue
|
||||
"${project} - ${bash.username}@${bash.hostname_short}: ${bash.current_working_directory}"
|
||||
"${project}:${bash.current_working_directory}"
|
||||
);
|
||||
in
|
||||
make-shell {
|
||||
packages = [
|
||||
python
|
||||
pkgs.poetry
|
||||
pkgs.hidapi
|
||||
pkgs.libusb1
|
||||
];
|
||||
shellHook = ''
|
||||
export HIDAPI_HOME=${pkgs.hidapi}
|
||||
export MAGICK_HOME=${pkgs.imagemagickBig}
|
||||
export POETRY_VIRTUALENVS_IN_PROJECT=true
|
||||
export PS1='\[\033[1;34m\][greendeck:\w]\$\[\033[0m\] '
|
||||
env = {
|
||||
HIDAPI_HOME = pkgs.hidapi;
|
||||
MAGICK_HOME = pkgs.imagemagickBig;
|
||||
POETRY_VIRTUALENVS_IN_PROJECT = "true";
|
||||
PS1 = prompt;
|
||||
};
|
||||
setup = ''
|
||||
export PATH=''$(pwd)/.venv/bin:$PATH
|
||||
'';
|
||||
};
|
||||
packages = {
|
||||
greendeck = pkgs.poetry2nix.mkPoetryApplication {
|
||||
python = pkgs.python310;
|
||||
greendeck = mkPoetryApplication {
|
||||
python = pkgs.python311;
|
||||
projectDir = ./.;
|
||||
propagatedBuildInputs = [
|
||||
pkgs.hidapi
|
||||
|
@ -52,7 +76,7 @@
|
|||
'os.getenv("HIDAPI_LIBRARY")' \
|
||||
'"${pkgs.hidapi}/lib/libhidapi-libusb.so.0"'
|
||||
'';
|
||||
overrides = pkgs.poetry2nix.overrides.withDefaults
|
||||
overrides = overrides.withDefaults
|
||||
(
|
||||
self: super: {
|
||||
wand = super.wand.overridePythonAttrs
|
||||
|
@ -67,36 +91,41 @@
|
|||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ pkgs.imagemagickBig ];
|
||||
}
|
||||
);
|
||||
types-deprecated = super.types-deprecated.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.python3Packages.setuptools ];
|
||||
}
|
||||
);
|
||||
# types-deprecated = super.types-deprecated.overridePythonAttrs (
|
||||
# old: {
|
||||
# buildInputs = old.buildInputs ++ [ pkgs.python3Packages.setuptools ];
|
||||
# }
|
||||
# );
|
||||
pydantic-yaml = super.pydantic-yaml.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.python3Packages.setuptools ];
|
||||
buildInputs = old.buildInputs ++ [ pkgs.python311Packages.setuptools ];
|
||||
}
|
||||
);
|
||||
pydocstyle = super.pydocstyle.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [
|
||||
# pydocstyle = super.pydocstyle.overridePythonAttrs (
|
||||
# old: {
|
||||
# buildInputs = old.buildInputs ++ [
|
||||
# # pkgs.python3Packages.poetry-core
|
||||
# ];
|
||||
# }
|
||||
# );
|
||||
# pydocstringformatter = super.pydocstringformatter.overridePythonAttrs (
|
||||
# old: {
|
||||
# buildInputs = old.buildInputs ++ [
|
||||
# pkgs.python3Packages.poetry-core
|
||||
];
|
||||
}
|
||||
);
|
||||
pydocstringformatter = super.pydocstringformatter.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [
|
||||
pkgs.python3Packages.poetry-core
|
||||
pkgs.python3Packages.setuptools
|
||||
];
|
||||
}
|
||||
);
|
||||
# pkgs.python3Packages.setuptools
|
||||
# ];
|
||||
# }
|
||||
# );
|
||||
asyncdbus = super.asyncdbus.overridePythonAttrs (
|
||||
old: {
|
||||
buildInputs = old.buildInputs ++ [ pkgs.python3Packages.setuptools-scm ];
|
||||
buildInputs = old.buildInputs ++ [ pkgs.python311Packages.setuptools-scm ];
|
||||
}
|
||||
);
|
||||
# Pillow = super.Pillow.overridePythonAttrs (
|
||||
# old: {
|
||||
# buildInputs = old.buildInputs ++ [ pkgs.python311Packages.setuptools-scm ];
|
||||
# }
|
||||
# );
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
1359
poetry.lock
generated
1359
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -5,18 +5,18 @@ description = ""
|
|||
authors = ["Jeffrey C. Ollie <jeff@ocjtech.us>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
pydantic = "^1.10.2"
|
||||
python = "^3.11"
|
||||
pydantic = "<2"
|
||||
hyperlink = "^21.0.0"
|
||||
websockets = "^10.4"
|
||||
Pillow = "^9.3.0"
|
||||
Wand = "^0.6.7"
|
||||
aiohttp = "^3.8.3"
|
||||
pydantic-yaml = { extras = ["ruamel"], version = "^0.8.1" }
|
||||
xdg = "^5.1.1"
|
||||
websockets = "^11.0.3"
|
||||
Pillow = "^10.0.0"
|
||||
Wand = "^0.6.11"
|
||||
aiohttp = "^3.8.5"
|
||||
pydantic-yaml = "<2"
|
||||
xdg = "^6.0.0"
|
||||
aiopath = "^0.6.11"
|
||||
arrow = "^1.2.3"
|
||||
click = "^8.1.3"
|
||||
click = "^8.1.7"
|
||||
asyncdbus = "^0.6.1"
|
||||
outcome = "^1.2.0"
|
||||
|
||||
|
@ -25,16 +25,15 @@ greendeck = "greendeck.main:main"
|
|||
test = "greendeck.mpristest:main"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
pylint = "^2.15.8"
|
||||
pydocstringformatter = "^0.7.2"
|
||||
pydocstyle = { extras = ["toml"], version = "^6.1.1" }
|
||||
black = "^22.12.0"
|
||||
flake8 = "^6.0.0"
|
||||
flake8-pyproject = "^1.2.2"
|
||||
isort = "^5.11.1"
|
||||
pylint = "^2.17.5"
|
||||
pydocstyle = "^6.3.0"
|
||||
black = "^23.7.0"
|
||||
flake8 = "^6.1.0"
|
||||
flake8-pyproject = "^1.2.3"
|
||||
isort = "^5.12.0"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core==1.5.1"]
|
||||
requires = ["poetry-core==1.6.1"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.black]
|
||||
|
|
Loading…
Reference in a new issue