about summary refs log tree commit diff
path: root/users/Profpatsch/writers
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-06-16T18·02+0200
committerclbot <clbot@tvl.fyi>2022-06-19T04·15+0000
commit4f0750cf904e63b4a390704734047d2b56d75a62 (patch)
tree6ba0cb7f7980067fe6047c5212d7a00c91a76ea7 /users/Profpatsch/writers
parent544d72189c5c1dc7a24d5dec68e9d377a62e5dc0 (diff)
feat(users/Profpatsch/sync-abfall-ics-aichach-friedberg): init r/4243
A small script that fetches calendar files for our local trash
provider. First step towards integrating ics files into my calendar
setup.

Change-Id: I0e8915a00c19349104cb6256e9dc87c17620fcae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5883
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Autosubmit: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/writers')
-rw-r--r--users/Profpatsch/writers/default.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/users/Profpatsch/writers/default.nix b/users/Profpatsch/writers/default.nix
index 02f39da02dbe..812a3f010d9f 100644
--- a/users/Profpatsch/writers/default.nix
+++ b/users/Profpatsch/writers/default.nix
@@ -15,12 +15,18 @@ let
       string;
   Libraries = defun [ (attrs any) (list drv) ];
 
+  pythonPackages = pkgs.python310Packages;
+  python = pythonPackages.python;
+
   python3 =
     { name
     , libraries ? (_: [ ])
     , flakeIgnore ? [ ]
-    }: pkgs.writers.writePython3 name {
-      libraries = Libraries libraries pkgs.python3Packages;
+    }:
+    let
+    in
+    pkgs.writers.makePythonWriter python pythonPackages name {
+      libraries = Libraries libraries pythonPackages;
       flakeIgnore =
         let
           ignoreTheseErrors = [
@@ -37,6 +43,10 @@ let
             # … between functions
             "E302"
             "E305"
+            # … if there’s too many of them
+            "E303"
+            # or lines that are too long
+            "E501"
           ];
         in
         list FlakeError (ignoreTheseErrors ++ flakeIgnore);
@@ -80,10 +90,10 @@ let
         ]
       ];
     in
-    pkgs.python3Packages.buildPythonPackage {
+    pythonPackages.buildPythonPackage {
       inherit name;
       src = srcTree;
-      propagatedBuildInputs = libraries pkgs.python3Packages;
+      propagatedBuildInputs = libraries pythonPackages;
       doCheck = false;
     };