Unverified Commit 2d856565 authored by Francesco Gazzetta's avatar Francesco Gazzetta Committed by GitHub
Browse files

yaup: unstable-2019-10-16 -> 0-unstable-2026-03-25 (#503432)

parents 2f19604b 583b8e44
Loading
Loading
Loading
Loading
+28 −13
Original line number Diff line number Diff line
@@ -2,34 +2,26 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch2,
  intltool,
  pkg-config,
  wrapGAppsHook3,
  gtk3,
  miniupnpc,
  makeDesktopItem,
  copyDesktopItems,
}:

stdenv.mkDerivation {
  pname = "yaup";
  version = "unstable-2019-10-16";
  version = "0-unstable-2026-03-25";

  src = fetchFromGitHub {
    owner = "Holarse-Linuxgaming";
    repo = "yaup";
    rev = "7ee3fdbd8c1ecf0a0e6469c47560e26082808250";
    hash = "sha256-RWnNjpgXRYncz9ID8zirENffy1UsfHD1H6Mmd8DKN4k=";
    rev = "7135987a17208dab1b980ba5de55114abe217b63";
    hash = "sha256-1P95cbGy8H+iXs/i7B4eTDzOPXJUJVBTOECsUZX9wG4=";
  };

  patches = [
    # Fix build with miniupnpc 2.2.8
    # https://github.com/Holarse-Linuxgaming/yaup/pull/6
    (fetchpatch2 {
      url = "https://github.com/Holarse-Linuxgaming/yaup/commit/c92134e305932785a60bd72131388f507b4d1853.patch?full_index=1";
      hash = "sha256-Exqkfp9VYIf9JpAc10cO8NuEAWvI5Houi7CLXV5zBDY=";
    })
  ];

  postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
    # Replace GNU ld's --export-dynamic with macOS linker equivalent
    substituteInPlace src/Makefile.in \
@@ -37,6 +29,7 @@ stdenv.mkDerivation {
  '';

  nativeBuildInputs = [
    copyDesktopItems
    intltool
    pkg-config
    wrapGAppsHook3
@@ -47,6 +40,28 @@ stdenv.mkDerivation {
    miniupnpc
  ];

  desktopItems = [
    (makeDesktopItem {
      name = "yaup";
      desktopName = "Yaup";
      genericName = "UPnP Portmapper";
      comment = "Yet Another UPnP Portmapper";
      icon = "yaup";
      exec = "yaup";
      categories = [
        "Network"
        "Utility"
      ];
      keywords = [
        "Port forwarding"
      ];
    })
  ];

  postInstall = ''
    install -Dm644 src/yaup-dark.png $out/share/icons/hicolor/512x512/apps/yaup.png
  '';

  meta = {
    homepage = "https://github.com/Holarse-Linuxgaming/yaup";
    description = "Yet Another UPnP Portmapper";