Maarten van den Berg 1 ヶ月 前
コミット
cf171e0ac0
共有6 個のファイルを変更した236 個の追加0 個の削除を含む
  1. 155 0
      flake.lock
  2. 29 0
      flake.nix
  3. 7 0
      piket_server/run.py
  4. 7 0
      poetry.lock
  5. 38 0
      pyproject.toml
  6. 0 0
      setup.old

+ 155 - 0
flake.lock

@@ -0,0 +1,155 @@
1
+{
2
+  "nodes": {
3
+    "flake-utils": {
4
+      "inputs": {
5
+        "systems": "systems"
6
+      },
7
+      "locked": {
8
+        "lastModified": 1710146030,
9
+        "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
10
+        "owner": "numtide",
11
+        "repo": "flake-utils",
12
+        "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
13
+        "type": "github"
14
+      },
15
+      "original": {
16
+        "owner": "numtide",
17
+        "repo": "flake-utils",
18
+        "type": "github"
19
+      }
20
+    },
21
+    "nix-github-actions": {
22
+      "inputs": {
23
+        "nixpkgs": [
24
+          "poetry2nix",
25
+          "nixpkgs"
26
+        ]
27
+      },
28
+      "locked": {
29
+        "lastModified": 1703863825,
30
+        "narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=",
31
+        "owner": "nix-community",
32
+        "repo": "nix-github-actions",
33
+        "rev": "5163432afc817cf8bd1f031418d1869e4c9d5547",
34
+        "type": "github"
35
+      },
36
+      "original": {
37
+        "owner": "nix-community",
38
+        "repo": "nix-github-actions",
39
+        "type": "github"
40
+      }
41
+    },
42
+    "nixpkgs": {
43
+      "locked": {
44
+        "lastModified": 1725194671,
45
+        "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
46
+        "owner": "NixOS",
47
+        "repo": "nixpkgs",
48
+        "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
49
+        "type": "github"
50
+      },
51
+      "original": {
52
+        "owner": "NixOS",
53
+        "ref": "nixpkgs-unstable",
54
+        "repo": "nixpkgs",
55
+        "type": "github"
56
+      }
57
+    },
58
+    "nixpkgs_2": {
59
+      "locked": {
60
+        "lastModified": 1719763542,
61
+        "narHash": "sha256-mXkOj9sJ0f69Nkc2dGGOWtof9d1YNY8Le/Hia3RN+8Q=",
62
+        "owner": "NixOS",
63
+        "repo": "nixpkgs",
64
+        "rev": "e6cdd8a11b26b4d60593733106042141756b54a3",
65
+        "type": "github"
66
+      },
67
+      "original": {
68
+        "owner": "NixOS",
69
+        "ref": "nixos-unstable-small",
70
+        "repo": "nixpkgs",
71
+        "type": "github"
72
+      }
73
+    },
74
+    "poetry2nix": {
75
+      "inputs": {
76
+        "flake-utils": "flake-utils",
77
+        "nix-github-actions": "nix-github-actions",
78
+        "nixpkgs": "nixpkgs_2",
79
+        "systems": "systems_2",
80
+        "treefmt-nix": "treefmt-nix"
81
+      },
82
+      "locked": {
83
+        "lastModified": 1725322757,
84
+        "narHash": "sha256-dgbmWv9ysSAZi27W4DnCdWDG+Q2yCCngVTKApDCN0ms=",
85
+        "owner": "nix-community",
86
+        "repo": "poetry2nix",
87
+        "rev": "184203e05a78f93f3c6329597db4cbec0471984b",
88
+        "type": "github"
89
+      },
90
+      "original": {
91
+        "owner": "nix-community",
92
+        "repo": "poetry2nix",
93
+        "type": "github"
94
+      }
95
+    },
96
+    "root": {
97
+      "inputs": {
98
+        "nixpkgs": "nixpkgs",
99
+        "poetry2nix": "poetry2nix"
100
+      }
101
+    },
102
+    "systems": {
103
+      "locked": {
104
+        "lastModified": 1681028828,
105
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
106
+        "owner": "nix-systems",
107
+        "repo": "default",
108
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
109
+        "type": "github"
110
+      },
111
+      "original": {
112
+        "owner": "nix-systems",
113
+        "repo": "default",
114
+        "type": "github"
115
+      }
116
+    },
117
+    "systems_2": {
118
+      "locked": {
119
+        "lastModified": 1681028828,
120
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
121
+        "owner": "nix-systems",
122
+        "repo": "default",
123
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
124
+        "type": "github"
125
+      },
126
+      "original": {
127
+        "id": "systems",
128
+        "type": "indirect"
129
+      }
130
+    },
131
+    "treefmt-nix": {
132
+      "inputs": {
133
+        "nixpkgs": [
134
+          "poetry2nix",
135
+          "nixpkgs"
136
+        ]
137
+      },
138
+      "locked": {
139
+        "lastModified": 1719749022,
140
+        "narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=",
141
+        "owner": "numtide",
142
+        "repo": "treefmt-nix",
143
+        "rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd",
144
+        "type": "github"
145
+      },
146
+      "original": {
147
+        "owner": "numtide",
148
+        "repo": "treefmt-nix",
149
+        "type": "github"
150
+      }
151
+    }
152
+  },
153
+  "root": "root",
154
+  "version": 7
155
+}

+ 29 - 0
flake.nix

@@ -0,0 +1,29 @@
1
+{
2
+  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
3
+  inputs.poetry2nix.url = "github:nix-community/poetry2nix";
4
+
5
+  outputs = { self, nixpkgs, poetry2nix }:
6
+    let
7
+      supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
8
+      forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
9
+      pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
10
+    in
11
+    {
12
+      packages = forAllSystems (system: let
13
+        inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryApplication;
14
+      in {
15
+        default = mkPoetryApplication { projectDir = self; };
16
+      });
17
+
18
+      devShells = forAllSystems (system: let
19
+        inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryEnv;
20
+      in {
21
+        default = pkgs.${system}.mkShellNoCC {
22
+          packages = with pkgs.${system}; [
23
+            (mkPoetryEnv { projectDir = self; })
24
+            poetry
25
+          ];
26
+        };
27
+      });
28
+    };
29
+}

+ 7 - 0
piket_server/run.py

@@ -0,0 +1,7 @@
1
+import piket_server
2
+
3
+def main():
4
+    piket_server.app.run()
5
+
6
+if __name__ == '__main__':
7
+    main()

+ 7 - 0
poetry.lock

@@ -0,0 +1,7 @@
1
+# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
2
+package = []
3
+
4
+[metadata]
5
+lock-version = "2.0"
6
+python-versions = "^3.10"
7
+content-hash = "53f2eabc9c26446fbcc00d348c47878e118afc2054778c3c803a0a8028af27d9"

+ 38 - 0
pyproject.toml

@@ -0,0 +1,38 @@
1
+[tool.poetry]
2
+name = "piket"
3
+version = "0.1.0"
4
+description = ""
5
+authors = ["Maarten van den Berg <maartenberg1+pypi@gmail.com>"]
6
+readme = "README.md"
7
+license = "MIT"
8
+packages = [
9
+  { include = "piket_server" },
10
+  { include = "piket_client" },
11
+]
12
+
13
+[tool.poetry.dependencies]
14
+python = "^3.10"
15
+
16
+black = "*"
17
+mypy = "*"
18
+pylint = "*"
19
+
20
+Flask = "*"
21
+SQLAlchemy = "*"
22
+Flask-SQLAlchemy = "*"
23
+alembic = "*"
24
+
25
+PySide2 = "*"
26
+qdarkstyle = ">=2.6.0"
27
+requests = "*"
28
+dbus-python = "*"
29
+raven = "*"
30
+
31
+[tool.poetry.scripts]
32
+piket-client = "piket_client.gui:main"
33
+piket-server = "piket_server.run:main"
34
+piket-seed = "piket_server.seed:main"
35
+
36
+[build-system]
37
+requires = ["poetry-core"]
38
+build-backend = "poetry.core.masonry.api"

setup.py → setup.old