btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / fs / fsuae-launcher / package.nix
blobaf08047ed81dc41fe23cf293eb11678a33b5d9d8
1 { lib
2 , fetchurl
3 , fsuae
4 , gettext
5 , python3Packages
6 , stdenv
7 , libsForQt5
8 }:
10 stdenv.mkDerivation (finalAttrs: {
11   pname = "fs-uae-launcher";
12   version = "3.1.70";
14   src = fetchurl {
15     url = "https://fs-uae.net/files/FS-UAE-Launcher/Stable/${finalAttrs.version}/fs-uae-launcher-${finalAttrs.version}.tar.xz";
16     hash = "sha256-yvJ8sa44V13SEUJ6C9SgS+N2ZFH5+20TTL2ICY9A36c=";
17   };
19   nativeBuildInputs = [
20     gettext
21     python3Packages.python
22     libsForQt5.wrapQtAppsHook
23   ];
25   buildInputs = with python3Packages; [
26     pyqt5
27     requests
28     setuptools
29   ];
31   strictDeps = true;
33   makeFlags = [ "prefix=$(out)" ];
35   dontWrapQtApps = true;
37   postPatch = ''
38     substituteInPlace setup.py \
39       --replace-fail "distutils.core" "setuptools"
40   '';
42   preFixup = ''
43     wrapQtApp "$out/bin/fs-uae-launcher" \
44       --set PYTHONPATH "$PYTHONPATH"
46     # fs-uae-launcher search side by side for executables and shared files
47     # see $src/fsgs/plugins/pluginexecutablefinder.py#find_executable
48     ln -s ${fsuae}/bin/fs-uae $out/bin
49     ln -s ${fsuae}/bin/fs-uae-device-helper $out/bin
50     ln -s ${fsuae}/share/fs-uae $out/share/fs-uae
51   '';
53   meta = {
54     homepage = "https://fs-uae.net";
55     description = "Graphical front-end for the FS-UAE emulator";
56     license = lib.licenses.gpl2Plus;
57     mainProgram = "fs-uae-launcher";
58     maintainers = with lib.maintainers; [ sander AndersonTorres ];
59     platforms = with lib.systems.inspect;
60       patternLogicalAnd patterns.isx86 patterns.isLinux;
61   };