This commit is contained in:
Jeffrey C. Ollie 2024-11-07 20:50:15 -06:00
parent 9913cd0e11
commit d232e3f452
Signed by: jeff
GPG key ID: 6F86035A6D97044E
4 changed files with 1202 additions and 1121 deletions

View file

@ -1,30 +1,15 @@
{ {
"nodes": { "nodes": {
"bash": {
"locked": {
"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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1726560853,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -38,11 +23,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1689068808, "lastModified": 1726560853,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -74,11 +59,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1688870561, "lastModified": 1729742964,
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=", "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-github-actions", "repo": "nix-github-actions",
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301", "rev": "e04df33f62cdcf93d73e9a04142464753a16db67",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -89,16 +74,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1694753796, "lastModified": 1730785428,
"narHash": "sha256-QPE7dqcicQH/nq9aywVXJWWtci4FvxHaM+BSIEbGBvA=", "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "360a7d31c30abefdc490d203f80e3221b7a24af2", "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixos-23.05", "ref": "nixos-unstable",
"type": "indirect" "type": "indirect"
} }
}, },
@ -108,14 +93,16 @@
"nix-github-actions": "nix-github-actions", "nix-github-actions": "nix-github-actions",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ],
"systems": "systems_3",
"treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1694165861, "lastModified": 1731025526,
"narHash": "sha256-FMiPKVcNxb9QWATnQrC68nIL2t8Fm4zBH0XyLz9uqko=", "narHash": "sha256-z0jMgVMXEkn6lmFNu2oSrcOKGwymvthyPWPjxXOi1eA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "poetry2nix", "repo": "poetry2nix",
"rev": "c3d3c4a0396b1bcccd72c82551a319229997f6e4", "rev": "be0cb8b526f05d636a19c466148c458ad18a5660",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -126,7 +113,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"bash": "bash",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"make-shell": "make-shell", "make-shell": "make-shell",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
@ -162,6 +148,41 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1730120726,
"narHash": "sha256-LqHYIxMrl/1p3/kvm2ir925tZ8DkI0KA10djk8wecSk=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "9ef337e492a5555d8e17a51c911ff1f02635be15",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -3,7 +3,7 @@
inputs = { inputs = {
nixpkgs = { nixpkgs = {
url = "nixpkgs/nixos-23.05"; url = "nixpkgs/nixos-unstable";
}; };
poetry2nix = { poetry2nix = {
url = "github:nix-community/poetry2nix"; url = "github:nix-community/poetry2nix";
@ -12,39 +12,35 @@
flake-utils = { flake-utils = {
url = "github:numtide/flake-utils"; url = "github:numtide/flake-utils";
}; };
bash = {
url = "git+https://git.ocjtech.us/jeff/nixos-bash-prompt-builder.git";
};
make-shell = { make-shell = {
url = "github:ursi/nix-make-shell"; url = "github:ursi/nix-make-shell";
}; };
}; };
outputs = { self, nixpkgs, poetry2nix, flake-utils, bash, make-shell, ... }@inputs: outputs = {
self,
nixpkgs,
poetry2nix,
flake-utils,
...
} @ inputs:
flake-utils.lib.eachDefaultSystem flake-utils.lib.eachDefaultSystem
(system: (
let system: let
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication overrides;
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
}; };
python = pkgs.python311.withPackages (ps: with ps; [ inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication overrides;
python = pkgs.python312.withPackages (ps:
with ps; [
poetry-core poetry-core
]); ]);
in in {
{ devShells.default = let
devShells.default =
let
make-shell = import inputs.make-shell { make-shell = import inputs.make-shell {
inherit system; inherit system;
pkgs = pkgs; pkgs = pkgs;
}; };
project = "greendeck"; 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 in
make-shell { make-shell {
packages = [ packages = [
@ -57,7 +53,7 @@
HIDAPI_HOME = pkgs.hidapi; HIDAPI_HOME = pkgs.hidapi;
MAGICK_HOME = pkgs.imagemagickBig; MAGICK_HOME = pkgs.imagemagickBig;
POETRY_VIRTUALENVS_IN_PROJECT = "true"; POETRY_VIRTUALENVS_IN_PROJECT = "true";
PS1 = prompt; name = project;
}; };
setup = '' setup = ''
export PATH=''$(pwd)/.venv/bin:$PATH export PATH=''$(pwd)/.venv/bin:$PATH
@ -77,10 +73,12 @@
'os.getenv("HIDAPI_LIBRARY")' \ 'os.getenv("HIDAPI_LIBRARY")' \
'"${pkgs.hidapi}/lib/libhidapi-libusb.so.0"' '"${pkgs.hidapi}/lib/libhidapi-libusb.so.0"'
''; '';
overrides = overrides.withDefaults overrides =
overrides.withDefaults
( (
self: super: { self: super: {
wand = super.wand.overridePythonAttrs wand =
super.wand.overridePythonAttrs
( (
old: { old: {
postPatch = '' postPatch = ''

2022
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -5,19 +5,19 @@ description = ""
authors = ["Jeffrey C. Ollie <jeff@ocjtech.us>"] authors = ["Jeffrey C. Ollie <jeff@ocjtech.us>"]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.10" python = "^3.12"
pydantic = "<2" pydantic = "<2"
hyperlink = "^21.0.0" hyperlink = "^21.0.0"
websockets = "^11.0.3" websockets = "^13.1"
Pillow = "^10.0.0" Pillow = "^11.0.0"
Wand = "^0.6.11" Wand = "^0.6.13"
aiohttp = "^3.8.5" aiohttp = "^3.10.10"
pydantic-yaml = "<2" pydantic-yaml = "<2"
xdg = "^6.0.0" xdg = "^6.0.0"
aiopath = "^0.6.11" aiopath = "^0.7.7"
arrow = "^1.2.3" arrow = "^1.3.0"
click = "^8.1.7" click = "^8.1.7"
asyncdbus = "^0.6.1" asyncdbus = "^0.7.0"
[tool.poetry.scripts] [tool.poetry.scripts]
greendeck = "greendeck.main:main" greendeck = "greendeck.main:main"