From 4f0750cf904e63b4a390704734047d2b56d75a62 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Thu, 16 Jun 2022 20:02:20 +0200 Subject: feat(users/Profpatsch/sync-abfall-ics-aichach-friedberg): init 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 Autosubmit: Profpatsch --- users/Profpatsch/writers/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'users/Profpatsch/writers/default.nix') diff --git a/users/Profpatsch/writers/default.nix b/users/Profpatsch/writers/default.nix index 02f39da02d..812a3f010d 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; }; -- cgit 1.4.1