punes: migrate to by-name (#425429)

Changed files
+25 -16
pkgs
by-name
pu
punes
punes-qt6
top-level
+18 -12
pkgs/applications/emulators/punes/default.nix pkgs/by-name/pu/punes/package.nix
···
libX11,
libXrandr,
sndio,
-
qtbase,
-
qtsvg,
-
qttools,
-
wrapQtAppsHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "punes";
version = "0.111";
···
src = fetchFromGitHub {
owner = "punesemu";
repo = "puNES";
-
rev = "v${finalAttrs.version}";
hash = "sha256-TIXjYkInWV3yVnvXrdHcmeWYeps5TcvkG2Xjg4roIds=";
};
···
nativeBuildInputs = [
cmake
pkg-config
qttools
wrapQtAppsHook
-
];
buildInputs = [
ffmpeg
libGLU
qtbase
qtsvg
-
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libX11
···
"-DENABLE_RELEASE=ON"
"-DENABLE_FFMPEG=ON"
"-DENABLE_OPENGL=ON"
-
"-DENABLE_QT6_LIBS=${if lib.versionAtLeast qtbase.version "6.0" then "ON" else "OFF"}"
];
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
-
meta = with lib; {
description = "Qt-based Nintendo Entertainment System emulator and NSF/NSFe Music Player";
mainProgram = "punes";
homepage = "https://github.com/punesemu/puNES";
changelog = "https://github.com/punesemu/puNES/blob/v${finalAttrs.version}/ChangeLog";
-
license = licenses.gpl2Plus;
-
maintainers = with maintainers; [ OPNA2608 ];
-
platforms = with platforms; linux ++ freebsd ++ openbsd ++ windows;
};
})
···
libX11,
libXrandr,
sndio,
+
libsForQt5,
+
qt6Packages,
+
withQt6 ? false,
}:
+
let
+
qtPackages = if withQt6 then qt6Packages else libsForQt5;
+
in
stdenv.mkDerivation (finalAttrs: {
pname = "punes";
version = "0.111";
···
src = fetchFromGitHub {
owner = "punesemu";
repo = "puNES";
+
tag = "v${finalAttrs.version}";
hash = "sha256-TIXjYkInWV3yVnvXrdHcmeWYeps5TcvkG2Xjg4roIds=";
};
···
nativeBuildInputs = [
cmake
pkg-config
+
]
+
++ (with qtPackages; [
qttools
wrapQtAppsHook
+
]);
buildInputs = [
ffmpeg
libGLU
+
]
+
++ (with qtPackages; [
qtbase
qtsvg
+
])
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
libX11
···
"-DENABLE_RELEASE=ON"
"-DENABLE_FFMPEG=ON"
"-DENABLE_OPENGL=ON"
+
(lib.strings.cmakeBool "ENABLE_QT6_LIBS" withQt6)
];
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
+
meta = {
description = "Qt-based Nintendo Entertainment System emulator and NSF/NSFe Music Player";
mainProgram = "punes";
homepage = "https://github.com/punesemu/puNES";
changelog = "https://github.com/punesemu/puNES/blob/v${finalAttrs.version}/ChangeLog";
+
license = lib.licenses.gpl2Plus;
+
maintainers = with lib.maintainers; [ OPNA2608 ];
+
platforms = with lib.platforms; linux ++ freebsd ++ openbsd ++ windows;
};
})
+7
pkgs/by-name/pu/punes-qt6/package.nix
···
···
+
{
+
punes,
+
}:
+
+
punes.override {
+
withQt6 = true;
+
}
-4
pkgs/top-level/all-packages.nix
···
in
ppsspp.override argset;
-
punes = libsForQt5.callPackage ../applications/emulators/punes { };
-
-
punes-qt6 = qt6Packages.callPackage ../applications/emulators/punes { };
-
py65 = with python3.pkgs; toPythonApplication py65;
rmg-wayland = callPackage ../by-name/rm/rmg/package.nix {
···
in
ppsspp.override argset;
py65 = with python3.pkgs; toPythonApplication py65;
rmg-wayland = callPackage ../by-name/rm/rmg/package.nix {