Unverified Commit 05a4fdaf authored by xanderio's avatar xanderio Committed by GitHub
Browse files

wg-access-server: 0.12.1 -> 0.13.1 (#478828)

parents 1b9fe99d 3bf597c1
Loading
Loading
Loading
Loading
+14 −11
Original line number Diff line number Diff line
@@ -6,21 +6,22 @@
  makeWrapper,
  iptables,
  nixosTests,
  nodejs_22,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "wg-access-server";
  version = "0.12.1";
  version = "0.13.1";

  src = fetchFromGitHub {
    owner = "freifunkMUC";
    repo = "wg-access-server";
    rev = "v${version}";
    hash = "sha256-AhFqEmHrx9MCdjnB/YA3qU7KsaMyLO+vo53VWUrcL8I=";
    rev = "v${finalAttrs.version}";
    hash = "sha256-x4QNEn5SR6D1YIiv+mKnQlZ94jZ7BrdIxiLxBqhtBjg=";
  };

  proxyVendor = true; # darwin/linux hash mismatch
  vendorHash = "sha256-YwFq0KxUctU3ElZBo/b68pyp4lJnFGL9ClKIwUzdngM=";
  vendorHash = "sha256-pjQeF1+1gr/0pF76KNdK7GDX3pYBTqqY3xbJeMLsJIM=";

  env.CGO_ENABLED = 1;

@@ -34,12 +35,14 @@ buildGoModule rec {
  checkFlags = [ "-skip=TestDNSProxy_ServeDNS" ];

  ui = buildNpmPackage {
    inherit version src;
    inherit (finalAttrs) version src;
    pname = "wg-access-server-ui";

    npmDepsHash = "sha256-04AkSDSKsr20Jbx5BJy36f8kWNlzzplu/xnoDTkU8OQ=";
    nodejs = nodejs_22;

    sourceRoot = "${src.name}/website";
    npmDepsHash = "sha256-UntV5+9E2lyp8IQGKbbnBNdd0JLvM5NsfkLvCSOgyGo=";

    sourceRoot = "${finalAttrs.src.name}/website";

    installPhase = ''
      mv build $out
@@ -48,11 +51,11 @@ buildGoModule rec {

  postPatch = ''
    substituteInPlace internal/services/website_router.go \
        --replace-fail 'website/build' "${ui}"
        --replace-fail 'website/build' "${finalAttrs.ui}"
  '';

  preBuild = ''
    VERSION=v${version} go generate buildinfo/buildinfo.go
    VERSION=v${finalAttrs.version} go generate buildinfo/buildinfo.go
  '';

  postInstall = ''
@@ -72,4 +75,4 @@ buildGoModule rec {
    maintainers = with lib.maintainers; [ xanderio ];
    mainProgram = "wg-access-server";
  };
}
})