Skip to content

Commit

Permalink
fix haproxy deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetrucciani committed Jul 3, 2024
1 parent c11ef16 commit b81cd83
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions mods/haproxy.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
final: prev:
with prev;
rec {
inherit (stdenv) isLinux isDarwin isAarch64;
inherit (prev.stdenv) isLinux isDarwin isAarch64;

# haproxy overrides
haproxy-pin = { version, sha256 }: haproxy.overrideAttrs (attrs: rec {
inherit version;
src = fetchurl {
inherit sha256;
url = "https://www.haproxy.org/download/${lib.versions.majorMinor version}/src/${attrs.pname}-${version}.tar.gz";
};
});
haproxy-pin = { version, sha256 }:
let
oldDeps = if isLinux then [ final.systemd ] else [ ];
pre3 = (builtins.compareVersions version "3.0.0") == -1;
in
prev.haproxy.overrideAttrs (old: rec {
inherit version;
src = prev.fetchurl {
inherit sha256;
url = "https://www.haproxy.org/download/${prev.lib.versions.majorMinor version}/src/${old.pname}-${version}.tar.gz";
};
buildInputs = old.buildInputs ++ (if pre3 then oldDeps else [ ]);
});
haproxy-2-2-23 = haproxy-pin {
version = "2.2.23";
sha256 = "sha256-3lc7eGtm7izLmnmiN7DpHTwnokchR0+VadWHjo651Po=";
Expand Down

0 comments on commit b81cd83

Please sign in to comment.