Unverified Commit 4b6275c1 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

Merge pull request #294110 from Naxdy/work/add-retrospy

retrospy: init at 6.4.8
parents 56e2cd78 74dc90c5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -14121,6 +14121,16 @@
    githubId = 56316606;
    name = "Amneesh Singh";
  };
  naxdy = {
    name = "Naxdy";
    email = "naxdy@naxdy.org";
    matrix = "@naxdy:naxdy.org";
    github = "Naxdy";
    githubId = 4532582;
    keys = [{
      fingerprint = "BDEA AB07 909D B96F 4106 85F1 CC15 0758 46BC E91B";
    }];
  };
  nayala = {
    name = "Nia";
    matrix = "@fly:asra.gr";
+154 −0

File added.

Preview size limit exceeded, changes collapsed.

+86 −0
Original line number Diff line number Diff line
{ buildDotnetModule
, fetchFromGitHub
, dotnetCorePackages
, copyDesktopItems
, makeDesktopItem
, lib
, fontconfig
, libX11
, libXcursor
, libICE
, libSM
}:
let
  version = "6.4.8";

  executables = [
    "RetroSpy"
    "GBPemu"
    "GBPUpdater"
    "UsbUpdater"
  ];
in
buildDotnetModule {
  pname = "retrospy";
  inherit version;

  src = fetchFromGitHub {
    owner = "retrospy";
    repo = "RetroSpy";
    rev = "v${version}";
    hash = "sha256-0rdLdud78gnBX8CIdG81caJ1IRoIjGzb7coP4huEPDA=";
  };

  nativeBuildInputs = [
    copyDesktopItems
  ];

  runtimeDeps = [
    fontconfig
    libX11
    libICE
    libXcursor
    libSM
  ];

  projectFile = [
    "RetroSpyX/RetroSpyX.csproj"
    "GBPemuX/GBPemuX.csproj"
    "GBPUpdaterX2/GBPUpdaterX2.csproj"
    "UsbUpdaterX2/UsbUpdaterX2.csproj"
  ];

  dotnet-sdk = dotnetCorePackages.sdk_7_0;
  dotnet-runtime = dotnetCorePackages.aspnetcore_7_0;

  nugetDeps = ./deps.nix;

  inherit executables;

  postInstall = ''
    mkdir -p $out/share/retrospy
    ${builtins.concatStringsSep "\n" (map (e: "cp ./${e}.ico $out/share/retrospy/${e}.ico") executables)}
  '';

  passthru.updateScript = ./update.sh;

  desktopItems = map
    (e: (makeDesktopItem {
      name = e;
      exec = e;
      icon = "${placeholder "out"}/share/retrospy/${e}.ico";
      desktopName = "${e}";
      categories = [ "Utility" ];
      startupWMClass = e;
    }))
    executables;

  meta = {
    description = "Live controller viewer for Nintendo consoles as well as many other retro consoles and computers";
    homepage = "https://retro-spy.com/";
    license = lib.licenses.gpl3;
    maintainers = [ lib.maintainers.naxdy ];
    platforms = lib.platforms.linux;
  };
}
+17 −0
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
# shellcheck shell=bash
set -euo pipefail

new_version="$(curl -s "https://api.github.com/repos/retrospy/RetroSpy/releases?per_page=1" | jq -r '.[0].tag_name')"
new_version=${new_version#v}
old_version=$(nix-instantiate --eval -A retrospy.version | jq -e -r)

if [[ "$new_version" == "$old_version" ]]; then
    echo "Up to date"
    exit 0
fi

update-source-version retrospy "$new_version"

eval "$(nix-build . -A retrospy.fetch-deps --no-out-link)"