mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 17:53:37 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.5 KiB
Nix
44 lines
1.5 KiB
Nix
{lib, stdenv, fetchurl, fetchpatch, boost, dash, freetype, libpng, pkg-config, SDL, which, zlib, nasm }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "mupen64plus";
|
|
version = "2.5.9";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/mupen64plus/mupen64plus-core/releases/download/${version}/mupen64plus-bundle-src-${version}.tar.gz";
|
|
sha256 = "1a21n4gqdvag6krwcjm5bnyw5phrlxw6m0mk73jy53iq03f3s96m";
|
|
};
|
|
|
|
patches = [
|
|
# Pull upstream fix for -fno-common toolchains:
|
|
# https://github.com/mupen64plus/mupen64plus-core/pull/736
|
|
(fetchpatch {
|
|
name = "fno-common.patch";
|
|
url = "https://github.com/mupen64plus/mupen64plus-core/commit/39975200ad4926cfc79c96609b64696289065502.patch";
|
|
sha256 = "0kdshp9xdkharn3d1g1pvxhh761pa1v5w07iq0wf9l380r2m6gbv";
|
|
# a/something -> a/source/mupen64plus-core/something
|
|
stripLen = 1;
|
|
extraPrefix = "source/mupen64plus-core/";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ pkg-config nasm ];
|
|
buildInputs = [ boost dash freetype libpng SDL which zlib ];
|
|
|
|
buildPhase = ''
|
|
dash m64p_build.sh PREFIX="$out" COREDIR="$out/lib/" PLUGINDIR="$out/lib/mupen64plus" SHAREDIR="$out/share/mupen64plus"
|
|
'';
|
|
installPhase = ''
|
|
dash m64p_install.sh DESTDIR="$out" PREFIX=""
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Nintendo 64 Emulator";
|
|
license = licenses.gpl2Plus;
|
|
homepage = "http://www.mupen64plus.org/";
|
|
maintainers = [ maintainers.sander ];
|
|
platforms = [ "x86_64-linux" ];
|
|
mainProgram = "mupen64plus";
|
|
};
|
|
}
|