summaryrefslogtreecommitdiff
path: root/overlays/postfix-mta-sts-resolver/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/postfix-mta-sts-resolver/default.nix')
-rw-r--r--overlays/postfix-mta-sts-resolver/default.nix39
1 files changed, 22 insertions, 17 deletions
diff --git a/overlays/postfix-mta-sts-resolver/default.nix b/overlays/postfix-mta-sts-resolver/default.nix
index c210cf79..919992ff 100644
--- a/overlays/postfix-mta-sts-resolver/default.nix
+++ b/overlays/postfix-mta-sts-resolver/default.nix
@@ -1,21 +1,26 @@
1{ prev, sources, ... }: 1{ prev, final, flake, flakeInputs, sources, ... }:
2{ 2{
3 postfix-mta-sts-resolver = 3 postfix-mta-sts-resolver =
4 with prev.poetry2nix; 4 let
5 mkPoetryApplication { 5 workspace = flakeInputs.uv2nix.lib.workspace.loadWorkspace { workspaceRoot = prev.runCommand "sources" {} ''
6 python = prev.python311; 6 mkdir $out
7 inherit (sources.postfix-mta-sts-resolver) pname version; 7 cp -r --no-preserve=all \
8 overrides = overrides.withDefaults (self: super: { 8 ${sources.postfix-mta-sts-resolver.src}/. \
9 pyyaml = super.pyyaml.override { preferWheel = true; }; 9 ${prev.lib.sources.sourceByRegex ./. ["^pyproject\.toml$" "^uv\.lock$"]}/. \
10 }); 10 $out
11 projectDir = cleanPythonSources { 11 '';
12 src = prev.runCommand "sources" {} ''
13 mkdir $out
14 cp -r --no-preserve=all ${sources.postfix-mta-sts-resolver.src}/. $out
15
16 cp ${./pyproject.toml} $out/pyproject.toml
17 cp ${./poetry.lock} $out/poetry.lock
18 '';
19 }; 12 };
20 }; 13 pythonSet = flake.lib.pythonSet {
14 pkgs = final;
15 python = final.python312;
16 overlay = workspace.mkPyprojectOverlay {
17 sourcePreference = "wheel";
18 };
19 };
20 virtualEnv = pythonSet.mkVirtualEnv "postfix-mta-sts-resolver-env" workspace.deps.default;
21 in virtualEnv.overrideAttrs (oldAttrs: {
22 meta = (oldAttrs.meta or {}) // {
23 mainProgram = "mta-sts-daemon";
24 };
25 });
21} 26}