diff options
Diffstat (limited to 'overlays')
-rw-r--r-- | overlays/postfix-mta-sts-resolver/default.nix | 1 | ||||
-rw-r--r-- | overlays/preserve-dscp/default.nix | 3 | ||||
-rw-r--r-- | overlays/radicale.nix | 13 | ||||
-rwxr-xr-x | overlays/worktime/worktime/__main__.py | 8 |
4 files changed, 20 insertions, 5 deletions
diff --git a/overlays/postfix-mta-sts-resolver/default.nix b/overlays/postfix-mta-sts-resolver/default.nix index 49fbb7c9..d930cefb 100644 --- a/overlays/postfix-mta-sts-resolver/default.nix +++ b/overlays/postfix-mta-sts-resolver/default.nix | |||
@@ -3,6 +3,7 @@ | |||
3 | postfix-mta-sts-resolver = | 3 | postfix-mta-sts-resolver = |
4 | with prev.poetry2nix; | 4 | with prev.poetry2nix; |
5 | mkPoetryApplication { | 5 | mkPoetryApplication { |
6 | python = prev.python311; | ||
6 | inherit (sources.postfix-mta-sts-resolver) pname version; | 7 | inherit (sources.postfix-mta-sts-resolver) pname version; |
7 | projectDir = cleanPythonSources { | 8 | projectDir = cleanPythonSources { |
8 | src = prev.runCommand "sources" {} '' | 9 | src = prev.runCommand "sources" {} '' |
diff --git a/overlays/preserve-dscp/default.nix b/overlays/preserve-dscp/default.nix index 73721083..a1064591 100644 --- a/overlays/preserve-dscp/default.nix +++ b/overlays/preserve-dscp/default.nix | |||
@@ -10,7 +10,8 @@ | |||
10 | buildFlags = [ "preserve-dscp" ]; | 10 | buildFlags = [ "preserve-dscp" ]; |
11 | 11 | ||
12 | CPATH = prev.lib.makeSearchPathOutput "dev" "include" (buildInputs ++ nativeBuildInputs); | 12 | CPATH = prev.lib.makeSearchPathOutput "dev" "include" (buildInputs ++ nativeBuildInputs); |
13 | BPF_CFLAGS = "-Wno-unused-command-line-argument -fno-stack-protector"; | 13 | BPF_CFLAGS = "-Wno-unused-command-line-argument"; |
14 | hardeningDisable = [ "stackprotector" "zerocallusedregs" ]; | ||
14 | 15 | ||
15 | outputs = [ "out" "lib" ]; | 16 | outputs = [ "out" "lib" ]; |
16 | 17 | ||
diff --git a/overlays/radicale.nix b/overlays/radicale.nix new file mode 100644 index 00000000..a4179295 --- /dev/null +++ b/overlays/radicale.nix | |||
@@ -0,0 +1,13 @@ | |||
1 | { prev, ... }: | ||
2 | let | ||
3 | nixpkgs = prev.fetchFromGitHub { | ||
4 | owner = "NixOS"; | ||
5 | repo = "nixpkgs"; | ||
6 | rev = "5fa4d405272ea98dab145f0c9f7ea1dbb9c87c31"; | ||
7 | hash = "sha256-Qwwbt4vbqwllUJElZomSybbZkbmhsuIac3gqrl+GVUs="; | ||
8 | }; | ||
9 | pkgs = (import (nixpkgs + "/pkgs/top-level")) { localSystem = prev.stdenv.buildPlatform.system; }; | ||
10 | in rec { | ||
11 | radicale3 = radicale; | ||
12 | inherit (pkgs) radicale; | ||
13 | } | ||
diff --git a/overlays/worktime/worktime/__main__.py b/overlays/worktime/worktime/__main__.py index 821d2cdd..21316182 100755 --- a/overlays/worktime/worktime/__main__.py +++ b/overlays/worktime/worktime/__main__.py | |||
@@ -42,7 +42,7 @@ class TogglAPISection(Enum): | |||
42 | REPORTS = '/reports/api/v2' | 42 | REPORTS = '/reports/api/v2' |
43 | 43 | ||
44 | class TogglAPIError(Exception): | 44 | class TogglAPIError(Exception): |
45 | def __init__(self, http_error, response): | 45 | def __init__(self, response, *, http_error=None): |
46 | self.http_error = http_error | 46 | self.http_error = http_error |
47 | self.response = response | 47 | self.response = response |
48 | 48 | ||
@@ -179,15 +179,15 @@ class TogglAPI(object): | |||
179 | url = self._make_url(api = TogglAPISection.TOGGL, section = ['me', 'time_entries', 'current']) | 179 | url = self._make_url(api = TogglAPISection.TOGGL, section = ['me', 'time_entries', 'current']) |
180 | r = self._query(url = url, method='GET') | 180 | r = self._query(url = url, method='GET') |
181 | 181 | ||
182 | if not r: | 182 | if not r or (not r.json() and r.json() is not None): |
183 | raise TogglAPIError(None, r) | 183 | raise TogglAPIError(r) |
184 | 184 | ||
185 | if not r.json() or not r.json()['billable']: | 185 | if not r.json() or not r.json()['billable']: |
186 | return None | 186 | return None |
187 | 187 | ||
188 | if self._client_ids is not None: | 188 | if self._client_ids is not None: |
189 | if 'pid' in r.json() and r.json()['pid']: | 189 | if 'pid' in r.json() and r.json()['pid']: |
190 | url = self._make_url(api = TogglAPISection.TOGGL, section = ['workspaces', self._workspace_id, 'projects', str(r.json()['pid'])]) | 190 | url = self._make_url(api = TogglAPISection.TOGGL, section = ['projects', str(r.json()['pid'])]) |
191 | pr = self._query(url = url, method = 'GET') | 191 | pr = self._query(url = url, method = 'GET') |
192 | if not pr or not pr.json(): | 192 | if not pr or not pr.json(): |
193 | raise TogglAPIError(pr) | 193 | raise TogglAPIError(pr) |