diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 06181234f490..bd0b543a1d0f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7381,6 +7381,12 @@ githubId = 2037002; name = "Konstantinos"; }; + kototama = { + email = "kototama@posteo.jp"; + github = "kototama"; + githubId = 128620; + name = "Kototama"; + }; kouyk = { email = "skykinetic@stevenkou.xyz"; github = "kouyk"; diff --git a/nixos/modules/services/databases/postgresql.xml b/nixos/modules/services/databases/postgresql.xml index 0ca9f3faed21..e48c578e6ce6 100644 --- a/nixos/modules/services/databases/postgresql.xml +++ b/nixos/modules/services/databases/postgresql.xml @@ -72,16 +72,20 @@ Type "help" for help. { config, pkgs, ... }: { = [ - (pkgs.writeScriptBin "upgrade-pg-cluster" '' + (let + # XXX specify the postgresql package you'd like to upgrade to. + # Do not forget to list the extensions you need. + newPostgres = pkgs.postgresql_13.withPackages (pp: [ + # pp.plv8 + ]); + in pkgs.writeScriptBin "upgrade-pg-cluster" '' set -eux # XXX it's perhaps advisable to stop all services that depend on postgresql systemctl stop postgresql - # XXX replace `<new version>` with the psqlSchema here - export NEWDATA="/var/lib/postgresql/<new version>" + export NEWDATA="/var/lib/postgresql/${newPostgres.psqlSchema}" - # XXX specify the postgresql package you'd like to upgrade to - export NEWBIN="${pkgs.postgresql_13}/bin" + export NEWBIN="${newPostgres}/bin" export OLDDATA="${config.}" export OLDBIN="${config.}/bin" @@ -127,12 +131,25 @@ Type "help" for help. - After the upgrade it's advisable to analyze the new cluster (as su -l postgres in the - , in this example /var/lib/postgresql/13): + After the upgrade it's advisable to analyze the new cluster. + + + + + For PostgreSQL ≥ 14, use the vacuumdb command printed by the upgrades script. + + + + + For PostgreSQL < 14, run (as su -l postgres in the , in this example /var/lib/postgresql/13): $ ./analyze_new_cluster.sh - The next step removes the old state-directory! + + + + + The next step removes the old state-directory! $ ./delete_old_cluster.sh diff --git a/pkgs/applications/emulators/retroarch/cores.nix b/pkgs/applications/emulators/retroarch/cores.nix index 65b117629306..a738432a8ec3 100644 --- a/pkgs/applications/emulators/retroarch/cores.nix +++ b/pkgs/applications/emulators/retroarch/cores.nix @@ -6,6 +6,7 @@ , cmake , curl , fetchFromGitHub +, fetchpatch , ffmpeg , fluidsynth , gettext @@ -38,7 +39,6 @@ , xxd , xz , zlib -, fetchpatch }: let @@ -47,297 +47,283 @@ let getCoreSrc = core: fetchFromGitHub (builtins.getAttr core hashesFile); - mkLibRetroCore = + mkLibretroCore = { core - , description - # Check https://github.com/libretro/libretro-core-info for license information - , license - , stdenvOverride ? stdenv , src ? (getCoreSrc core) - , broken ? false , version ? "unstable-2022-10-18" - , platforms ? retroarch.meta.platforms - # The resulting core file is based on core name - # Setting `normalizeCore` to `true` will convert `-` to `_` on the core filename - , normalizeCore ? true , ... }@args: - stdenvOverride.mkDerivation ( - let - inherit (stdenvOverride) hostPlatform; - d2u = if normalizeCore then (lib.replaceChars [ "-" ] [ "_" ]) else (x: x); - in - (rec { - pname = "libretro-${core}"; - inherit version src; - - buildInputs = [ zlib ] ++ args.extraBuildInputs or [ ]; - nativeBuildInputs = [ makeWrapper ] ++ args.extraNativeBuildInputs or [ ]; - - makefile = "Makefile.libretro"; - makeFlags = [ - "platform=${{ - linux = "unix"; - darwin = "osx"; - windows = "win"; - }.${hostPlatform.parsed.kernel.name} or hostPlatform.parsed.kernel.name}" - "ARCH=${{ - armv7l = "arm"; - armv6l = "arm"; - i686 = "x86"; - }.${hostPlatform.parsed.cpu.name} or hostPlatform.parsed.cpu.name}" - ] ++ (args.makeFlags or [ ]); - - coreDir = "${placeholder "out"}/lib/retroarch/cores"; - - installPhase = '' - runHook preInstall - - mkdir -p $out/bin - mkdir -p $coreDir - mv ${d2u args.core}_libretro${hostPlatform.extensions.sharedLibrary} $coreDir - makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch-${core} \ - --add-flags "-L $coreDir/${d2u core}_libretro${hostPlatform.extensions.sharedLibrary} $@" - - runHook postInstall - ''; - - enableParallelBuilding = true; - - passthru = { - inherit core; - libretroCore = "/lib/retroarch/cores"; - }; - - meta = with lib; { - inherit broken description license platforms; - homepage = "https://www.libretro.com/"; - maintainers = with maintainers; teams.libretro.members ++ [ hrdinka ]; - }; - }) // builtins.removeAttrs args [ "core" "src" "description" "license" "makeFlags" ] - ); + import ./mkLibretroCore.nix ({ + inherit lib stdenv core src version makeWrapper retroarch zlib; + } // args); in { - inherit mkLibRetroCore; + inherit mkLibretroCore; - atari800 = mkLibRetroCore { + atari800 = mkLibretroCore { core = "atari800"; - description = "Port of Atari800 to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; makeFlags = [ "GIT_VERSION=" ]; + meta = { + description = "Port of Atari800 to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-gba = mkLibRetroCore { + beetle-gba = mkLibretroCore { core = "mednafen-gba"; src = getCoreSrc "beetle-gba"; - description = "Port of Mednafen's GameBoy Advance core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's GameBoy Advance core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-lynx = mkLibRetroCore { + beetle-lynx = mkLibretroCore { core = "mednafen-lynx"; src = getCoreSrc "beetle-lynx"; - description = "Port of Mednafen's Lynx core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's Lynx core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-ngp = mkLibRetroCore { + beetle-ngp = mkLibretroCore { core = "mednafen-ngp"; src = getCoreSrc "beetle-ngp"; - description = "Port of Mednafen's NeoGeo Pocket core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's NeoGeo Pocket core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-pce-fast = mkLibRetroCore { + beetle-pce-fast = mkLibretroCore { core = "mednafen-pce-fast"; src = getCoreSrc "beetle-pce-fast"; - description = "Port of Mednafen's PC Engine core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's PC Engine core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-pcfx = mkLibRetroCore { + beetle-pcfx = mkLibretroCore { core = "mednafen-pcfx"; src = getCoreSrc "beetle-pcfx"; - description = "Port of Mednafen's PCFX core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's PCFX core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-psx = mkLibRetroCore { + beetle-psx = mkLibretroCore { core = "mednafen-psx"; src = getCoreSrc "beetle-psx"; - description = "Port of Mednafen's PSX Engine core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; makeFlags = [ "HAVE_HW=0" "HAVE_LIGHTREC=1" ]; + meta = { + description = "Port of Mednafen's PSX Engine core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-psx-hw = mkLibRetroCore { + beetle-psx-hw = mkLibretroCore { core = "mednafen-psx-hw"; src = getCoreSrc "beetle-psx"; - description = "Port of Mednafen's PSX Engine (with HW accel) core to libretro"; - license = lib.licenses.gpl2Only; extraBuildInputs = [ libGL libGLU ]; makefile = "Makefile"; makeFlags = [ "HAVE_VULKAN=1" "HAVE_OPENGL=1" "HAVE_HW=1" "HAVE_LIGHTREC=1" ]; + meta = { + description = "Port of Mednafen's PSX Engine (with HW accel) core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-saturn = mkLibRetroCore { + beetle-saturn = mkLibretroCore { core = "mednafen-saturn"; src = getCoreSrc "beetle-saturn"; - description = "Port of Mednafen's Saturn core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; - platforms = [ "x86_64-linux" "aarch64-linux" ]; + meta = { + description = "Port of Mednafen's Saturn core to libretro"; + license = lib.licenses.gpl2Only; + platforms = [ "aarch64-linux" "x86_64-linux" ]; + }; }; - beetle-snes = mkLibRetroCore { + beetle-snes = mkLibretroCore { core = "mednafen-snes"; src = getCoreSrc "beetle-snes"; - description = "Port of Mednafen's SNES core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's SNES core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-supafaust = mkLibRetroCore { + beetle-supafaust = mkLibretroCore { core = "mednafen-supafaust"; src = getCoreSrc "beetle-supafaust"; - description = "Port of Mednafen's experimental snes_faust core to libretro"; - license = lib.licenses.gpl2Plus; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's experimental snes_faust core to libretro"; + license = lib.licenses.gpl2Plus; + }; }; - beetle-supergrafx = mkLibRetroCore { + beetle-supergrafx = mkLibretroCore { core = "mednafen-supergrafx"; src = getCoreSrc "beetle-supergrafx"; - description = "Port of Mednafen's SuperGrafx core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's SuperGrafx core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-vb = mkLibRetroCore { + beetle-vb = mkLibretroCore { core = "mednafen-vb"; src = getCoreSrc "beetle-vb"; - description = "Port of Mednafen's VirtualBoy core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's VirtualBoy core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - beetle-wswan = mkLibRetroCore { + beetle-wswan = mkLibretroCore { core = "mednafen-wswan"; src = getCoreSrc "beetle-wswan"; - description = "Port of Mednafen's WonderSwan core to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Mednafen's WonderSwan core to libretro"; + license = lib.licenses.gpl2Only; + }; }; - blastem = mkLibRetroCore { + blastem = mkLibretroCore { core = "blastem"; - description = "Port of BlastEm to libretro"; - license = lib.licenses.gpl3Only; - platforms = lib.platforms.x86; - }; - - bluemsx = mkLibRetroCore { - core = "bluemsx"; - description = "Port of BlueMSX to libretro"; - license = lib.licenses.gpl2Only; - }; - - bsnes = mkLibRetroCore { - core = "bsnes"; - description = "Port of bsnes to libretro"; - license = lib.licenses.gpl3Only; - makefile = "Makefile"; - }; - - bsnes-hd = - let - # linux = bsd - # https://github.com/DerKoun/bsnes-hd/blob/f0b6cf34e9780d53516977ed2de64137a8bcc3c5/bsnes/GNUmakefile#L37 - platform = if stdenv.isDarwin then "macos" else "linux"; - in - mkLibRetroCore { - core = "bsnes-hd-beta"; - src = getCoreSrc "bsnes-hd"; - description = "Port of bsnes-hd to libretro"; + meta = { + description = "Port of BlastEm to libretro"; license = lib.licenses.gpl3Only; - makefile = "GNUmakefile"; - makeFlags = [ + platforms = lib.platforms.x86; + }; + }; + + bluemsx = mkLibretroCore { + core = "bluemsx"; + meta = { + description = "Port of BlueMSX to libretro"; + license = lib.licenses.gpl2Only; + }; + }; + + bsnes = mkLibretroCore { + core = "bsnes"; + makefile = "Makefile"; + meta = { + description = "Port of bsnes to libretro"; + license = lib.licenses.gpl3Only; + }; + }; + + bsnes-hd = mkLibretroCore { + core = "bsnes-hd-beta"; + src = getCoreSrc "bsnes-hd"; + makefile = "GNUmakefile"; + makeFlags = + let + # linux = bsd + # https://github.com/DerKoun/bsnes-hd/blob/f0b6cf34e9780d53516977ed2de64137a8bcc3c5/bsnes/GNUmakefile#L37 + platform = if stdenv.isDarwin then "macos" else "linux"; + in + [ "-C" "bsnes" "target=libretro" "platform=${platform}" ]; - extraBuildInputs = [ xorg.libX11 xorg.libXext ]; - postBuild = "cd bsnes/out"; + extraBuildInputs = [ xorg.libX11 xorg.libXext ]; + postBuild = "cd bsnes/out"; + meta = { + description = "Port of bsnes-hd to libretro"; + license = lib.licenses.gpl3Only; }; + }; - bsnes-mercury = mkLibRetroCore { + bsnes-mercury = mkLibretroCore { core = "bsnes-mercury-accuracy"; src = getCoreSrc "bsnes-mercury"; - description = "Fork of bsnes with HLE DSP emulation restored"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; makeFlags = [ "PROFILE=accuracy" ]; + meta = { + description = "Fork of bsnes with HLE DSP emulation restored (accuracy profile)"; + license = lib.licenses.gpl3Only; + }; }; - bsnes-mercury-balanced = mkLibRetroCore { + bsnes-mercury-balanced = mkLibretroCore { core = "bsnes-mercury-balanced"; src = getCoreSrc "bsnes-mercury"; - description = "Fork of bsnes with HLE DSP emulation restored"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; makeFlags = [ "PROFILE=balanced" ]; + meta = { + description = "Fork of bsnes with HLE DSP emulation restored (balanced profile)"; + license = lib.licenses.gpl3Only; + }; }; - bsnes-mercury-performance = mkLibRetroCore { + bsnes-mercury-performance = mkLibretroCore { core = "bsnes-mercury-performance"; src = getCoreSrc "bsnes-mercury"; - description = "Fork of bsnes with HLE DSP emulation restored"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; makeFlags = [ "PROFILE=performance" ]; + meta = { + description = "Fork of bsnes with HLE DSP emulation restored (performance profile)"; + license = lib.licenses.gpl3Only; + }; }; - citra = mkLibRetroCore { + citra = mkLibretroCore { core = "citra"; - description = "Port of Citra to libretro"; - license = lib.licenses.gpl2Plus; extraBuildInputs = [ libGLU libGL boost ffmpeg nasm ]; makefile = "Makefile"; makeFlags = [ "HAVE_FFMPEG_STATIC=0" ]; + meta = { + description = "Port of Citra to libretro"; + license = lib.licenses.gpl2Plus; + }; }; - desmume = mkLibRetroCore { + desmume = mkLibretroCore { core = "desmume"; - description = "libretro wrapper for desmume NDS emulator"; - license = lib.licenses.gpl2Plus; - extraBuildInputs = [ libpcap libGLU libGL xorg.libX11 ]; preBuild = "cd desmume/src/frontend/libretro"; + extraBuildInputs = [ libpcap libGLU libGL xorg.libX11 ]; makeFlags = lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix" ++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0"; + meta = { + description = "Port of DeSmuME to libretro"; + license = lib.licenses.gpl2Plus; + }; }; - desmume2015 = mkLibRetroCore { + desmume2015 = mkLibretroCore { core = "desmume2015"; - description = "libretro wrapper for desmume NDS emulator from 2015"; - license = lib.licenses.gpl2Plus; extraBuildInputs = [ libpcap libGLU libGL xorg.libX11 ]; makeFlags = lib.optional stdenv.hostPlatform.isAarch32 "platform=armv-unix" ++ lib.optional (!stdenv.hostPlatform.isx86) "DESMUME_JIT=0"; preBuild = "cd desmume"; + meta = { + description = "Port of DeSmuME ~2015 to libretro"; + license = lib.licenses.gpl2Plus; + }; }; - dolphin = mkLibRetroCore { + dolphin = mkLibretroCore { core = "dolphin"; - description = "Port of Dolphin to libretro"; - license = lib.licenses.gpl2Plus; extraNativeBuildInputs = [ cmake curl pkg-config ]; extraBuildInputs = [ libGLU @@ -359,284 +345,354 @@ in "-DUSE_DISCORD_PRESENCE=OFF" ]; dontUseCmakeBuildDir = true; + meta = { + description = "Port of Dolphin to libretro"; + license = lib.licenses.gpl2Plus; + }; }; - dosbox = mkLibRetroCore { + dosbox = mkLibretroCore { core = "dosbox"; - description = "Port of DOSBox to libretro"; - license = lib.licenses.gpl2Only; CXXFLAGS = "-std=gnu++11"; + meta = { + description = "Port of DOSBox to libretro"; + license = lib.licenses.gpl2Only; + }; }; - eightyone = mkLibRetroCore { + eightyone = mkLibretroCore { core = "81"; src = getCoreSrc "eightyone"; - description = "Port of EightyOne to libretro"; - license = lib.licenses.gpl3Only; + meta = { + description = "Port of EightyOne to libretro"; + license = lib.licenses.gpl3Only; + }; }; - fbalpha2012 = mkLibRetroCore { + fbalpha2012 = mkLibretroCore { core = "fbalpha2012"; - description = "Port of Final Burn Alpha ~2012 to libretro"; - license = "Non-commercial"; makefile = "makefile.libretro"; preBuild = "cd svn-current/trunk"; + meta = { + description = "Port of Final Burn Alpha ~2012 to libretro"; + license = "Non-commercial"; + }; }; - fbneo = mkLibRetroCore { + fbneo = mkLibretroCore { core = "fbneo"; - description = "Port of FBNeo to libretro"; - license = "Non-commercial"; makefile = "Makefile"; preBuild = "cd src/burner/libretro"; + meta = { + description = "Port of FBNeo to libretro"; + license = "Non-commercial"; + }; }; - fceumm = mkLibRetroCore { + fceumm = mkLibretroCore { core = "fceumm"; - description = "FCEUmm libretro port"; - license = lib.licenses.gpl2Only; + meta = { + description = "FCEUmm libretro port"; + license = lib.licenses.gpl2Only; + }; }; - flycast = mkLibRetroCore { + flycast = mkLibretroCore { core = "flycast"; - description = "Flycast libretro port"; - license = lib.licenses.gpl2Only; extraBuildInputs = [ libGL libGLU ]; makefile = "Makefile"; makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "platform=arm64" ]; patches = [ ./fix-flycast-makefile.patch ]; - platforms = [ "aarch64-linux" "x86_64-linux" ]; + meta = { + description = "Flycast libretro port"; + license = lib.licenses.gpl2Only; + platforms = [ "aarch64-linux" "x86_64-linux" ]; + }; }; - fmsx = mkLibRetroCore { + fmsx = mkLibretroCore { core = "fmsx"; - description = "FMSX libretro port"; - license = "Non-commercial"; makefile = "Makefile"; + meta = { + description = "FMSX libretro port"; + license = "Non-commercial"; + }; }; - freeintv = mkLibRetroCore { + freeintv = mkLibretroCore { core = "freeintv"; - description = "FreeIntv libretro port"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; + meta = { + description = "FreeIntv libretro port"; + license = lib.licenses.gpl3Only; + }; }; - gambatte = mkLibRetroCore { + gambatte = mkLibretroCore { core = "gambatte"; - description = "Gambatte libretro port"; - license = lib.licenses.gpl2Only; + meta = { + description = "Gambatte libretro port"; + license = lib.licenses.gpl2Only; + }; }; - genesis-plus-gx = mkLibRetroCore { + genesis-plus-gx = mkLibretroCore { core = "genesis-plus-gx"; - description = "Enhanced Genesis Plus libretro port"; - license = "Non-commercial"; + meta = { + description = "Enhanced Genesis Plus libretro port"; + license = "Non-commercial"; + }; }; - gpsp = mkLibRetroCore { + gpsp = mkLibretroCore { core = "gpsp"; - description = "Port of gpSP to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of gpSP to libretro"; + license = lib.licenses.gpl2Only; + }; }; - gw = mkLibRetroCore { + gw = mkLibretroCore { core = "gw"; - description = "Port of Game and Watch to libretro"; - license = lib.licenses.zlib; makefile = "Makefile"; + meta = { + description = "Port of Game and Watch to libretro"; + license = lib.licenses.zlib; + }; }; - handy = mkLibRetroCore { + handy = mkLibretroCore { core = "handy"; - description = "Port of Handy to libretro"; - license = lib.licenses.zlib; makefile = "Makefile"; + meta = { + description = "Port of Handy to libretro"; + license = lib.licenses.zlib; + }; }; - hatari = mkLibRetroCore { + hatari = mkLibretroCore { core = "hatari"; - description = "Port of Hatari to libretro"; - license = lib.licenses.gpl2Only; extraNativeBuildInputs = [ which ]; dontConfigure = true; - # zlib is already included in mkLibRetroCore as buildInputs + # zlib is already included in mkLibretroCore as buildInputs makeFlags = [ "EXTERNAL_ZLIB=1" ]; + meta = { + description = "Port of Hatari to libretro"; + license = lib.licenses.gpl2Only; + }; }; - mame = mkLibRetroCore { + mame = mkLibretroCore { core = "mame"; - description = "Port of MAME to libretro"; - license = with lib.licenses; [ bsd3 gpl2Plus ]; extraBuildInputs = [ alsa-lib libGLU libGL portaudio python3 xorg.libX11 ]; + meta = { + description = "Port of MAME to libretro"; + license = with lib.licenses; [ bsd3 gpl2Plus ]; + }; }; - mame2000 = mkLibRetroCore { + mame2000 = mkLibretroCore { core = "mame2000"; - description = "Port of MAME ~2000 to libretro, compatible with MAME 0.37b5 sets"; - license = "MAME"; makefile = "Makefile"; makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "IS_X86=0"; + meta = { + description = "Port of MAME ~2000 to libretro, compatible with MAME 0.37b5 sets"; + license = "MAME"; + }; }; - mame2003 = mkLibRetroCore { + mame2003 = mkLibretroCore { core = "mame2003"; - description = "Port of MAME ~2003 to libretro, compatible with MAME 0.78 sets"; - license = "MAME"; makefile = "Makefile"; + meta = { + description = "Port of MAME ~2003 to libretro, compatible with MAME 0.78 sets"; + license = "MAME"; + }; }; - mame2003-plus = mkLibRetroCore { + mame2003-plus = mkLibretroCore { core = "mame2003-plus"; - description = "Port of MAME ~2003+ to libretro, compatible with MAME 0.78 sets"; - license = "MAME"; makefile = "Makefile"; + meta = { + description = "Port of MAME ~2003+ to libretro, compatible with MAME 0.78 sets"; + license = "MAME"; + }; }; - mame2010 = mkLibRetroCore { + mame2010 = mkLibretroCore { core = "mame2010"; - description = "Port of MAME ~2010 to libretro, compatible with MAME 0.139 sets"; - license = "MAME"; makefile = "Makefile"; makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "PTR64=1" "ARM_ENABLED=1" "X86_SH2DRC=0" "FORCE_DRC_C_BACKEND=1" ]; + meta = { + description = "Port of MAME ~2010 to libretro, compatible with MAME 0.139 sets"; + license = "MAME"; + }; }; - mame2015 = mkLibRetroCore { + mame2015 = mkLibretroCore { core = "mame2015"; - description = "Port of MAME ~2015 to libretro, compatible with MAME 0.160 sets"; - license = "MAME"; makeFlags = [ "PYTHON=python3" ]; extraNativeBuildInputs = [ python3 ]; extraBuildInputs = [ alsa-lib ]; makefile = "Makefile"; enableParallelBuilding = false; + meta = { + description = "Port of MAME ~2015 to libretro, compatible with MAME 0.160 sets"; + license = "MAME"; + }; }; - mame2016 = mkLibRetroCore { + mame2016 = mkLibretroCore { core = "mame2016"; - description = "Port of MAME ~2016 to libretro, compatible with MAME 0.174 sets"; - license = with lib.licenses; [ bsd3 gpl2Plus ]; extraNativeBuildInputs = [ python3 ]; extraBuildInputs = [ alsa-lib ]; makeFlags = [ "PYTHON_EXECUTABLE=python3" ]; enableParallelBuilding = false; + meta = { + description = "Port of MAME ~2016 to libretro, compatible with MAME 0.174 sets"; + license = with lib.licenses; [ bsd3 gpl2Plus ]; + }; }; - melonds = mkLibRetroCore { + melonds = mkLibretroCore { core = "melonds"; - description = "Port of MelonDS to libretro"; - license = lib.licenses.gpl3Only; extraBuildInputs = [ libGL libGLU ]; makefile = "Makefile"; + meta = { + description = "Port of MelonDS to libretro"; + license = lib.licenses.gpl3Only; + }; }; - mesen = mkLibRetroCore { + mesen = mkLibretroCore { core = "mesen"; - description = "Port of Mesen to libretro"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; preBuild = "cd Libretro"; + meta = { + description = "Port of Mesen to libretro"; + license = lib.licenses.gpl3Only; + }; }; - mesen-s = mkLibRetroCore { + mesen-s = mkLibretroCore { core = "mesen-s"; - description = "Port of Mesen-S to libretro"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; preBuild = "cd Libretro"; normalizeCore = false; + meta = { + description = "Port of Mesen-S to libretro"; + license = lib.licenses.gpl3Only; + }; }; - meteor = mkLibRetroCore { + meteor = mkLibretroCore { core = "meteor"; - description = "Port of Meteor to libretro"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; preBuild = "cd libretro"; + meta = { + description = "Port of Meteor to libretro"; + license = lib.licenses.gpl3Only; + }; }; - mgba = mkLibRetroCore { + mgba = mkLibretroCore { core = "mgba"; - description = "Port of mGBA to libretro"; - license = lib.licenses.mpl20; + meta = { + description = "Port of mGBA to libretro"; + license = lib.licenses.mpl20; + }; }; - mupen64plus = mkLibRetroCore { + mupen64plus = mkLibretroCore { core = "mupen64plus-next"; src = getCoreSrc "mupen64plus"; - description = "Libretro port of Mupen64 Plus, GL only"; - license = lib.licenses.gpl3Only; extraBuildInputs = [ libGLU libGL libpng nasm xorg.libX11 ]; makefile = "Makefile"; + meta = { + description = "Libretro port of Mupen64 Plus, GL only"; + license = lib.licenses.gpl3Only; + }; }; - neocd = mkLibRetroCore { + neocd = mkLibretroCore { core = "neocd"; - description = "NeoCD libretro port"; - license = lib.licenses.lgpl3Only; makefile = "Makefile"; + meta = { + description = "NeoCD libretro port"; + license = lib.licenses.lgpl3Only; + }; }; - nestopia = mkLibRetroCore { + nestopia = mkLibretroCore { core = "nestopia"; - description = "Nestopia libretro port"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; preBuild = "cd libretro"; + meta = { + description = "Nestopia libretro port"; + license = lib.licenses.gpl2Only; + }; }; - nxengine = mkLibRetroCore { + nxengine = mkLibretroCore { core = "nxengine"; - description = "NXEngine libretro port"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; + meta = { + description = "NXEngine libretro port"; + license = lib.licenses.gpl3Only; + }; }; - np2kai = mkLibRetroCore rec { + np2kai = mkLibretroCore rec { core = "np2kai"; src = getCoreSrc core; - description = "Neko Project II kai libretro port"; - license = lib.licenses.mit; makeFlags = [ # See https://github.com/AZO234/NP2kai/tags "NP2KAI_VERSION=rev.22" "NP2KAI_HASH=${src.rev}" ]; preBuild = "cd sdl"; + meta = { + description = "Neko Project II kai libretro port"; + license = lib.licenses.mit; + }; }; - o2em = mkLibRetroCore { + o2em = mkLibretroCore { core = "o2em"; - description = "Port of O2EM to libretro"; - license = lib.licenses.artistic1; makefile = "Makefile"; + meta = { + description = "Port of O2EM to libretro"; + license = lib.licenses.artistic1; + }; }; - opera = mkLibRetroCore { + opera = mkLibretroCore { core = "opera"; - description = "Opera is a port of 4DO/libfreedo to libretro"; - license = "Non-commercial"; makefile = "Makefile"; makeFlags = [ "CC_PREFIX=${stdenv.cc.targetPrefix}" ]; + meta = { + description = "Opera is a port of 4DO/libfreedo to libretro"; + license = "Non-commercial"; + }; }; - parallel-n64 = mkLibRetroCore { + parallel-n64 = mkLibretroCore { core = "parallel-n64"; - description = "Parallel Mupen64plus rewrite for libretro."; - license = lib.licenses.gpl3Only; extraBuildInputs = [ libGLU libGL libpng ]; makefile = "Makefile"; postPatch = lib.optionalString stdenv.hostPlatform.isAarch64 '' sed -i -e '1 i\CPUFLAGS += -DARM_FIX -DNO_ASM -DARM_ASM -DDONT_WANT_ARM_OPTIMIZATIONS -DARM64' Makefile \ && sed -i -e 's,CPUFLAGS :=,,g' Makefile ''; + meta = { + description = "Parallel Mupen64plus rewrite for libretro."; + license = lib.licenses.gpl3Only; + }; }; - pcsx2 = mkLibRetroCore { + pcsx2 = mkLibretroCore { core = "pcsx2"; - description = "Port of PCSX2 to libretro"; - license = lib.licenses.gpl3Plus; extraNativeBuildInputs = [ cmake gettext @@ -661,39 +717,47 @@ in substituteInPlace CMakeLists.txt --replace "ccache" "" ''; postBuild = "cd /build/source/build/pcsx2"; - platforms = lib.platforms.x86; + meta = { + description = "Port of PCSX2 to libretro"; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.x86; + }; }; - pcsx-rearmed = mkLibRetroCore { + pcsx-rearmed = mkLibretroCore { core = "pcsx_rearmed"; - description = "Port of PCSX ReARMed with GNU lightning to libretro"; - license = lib.licenses.gpl2Only; dontConfigure = true; + meta = { + description = "Port of PCSX ReARMed with GNU lightning to libretro"; + license = lib.licenses.gpl2Only; + }; }; - picodrive = mkLibRetroCore { + picodrive = mkLibretroCore { core = "picodrive"; - description = "Fast MegaDrive/MegaCD/32X emulator"; - license = "MAME"; dontConfigure = true; makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "platform=aarch64" ]; + meta = { + description = "Fast MegaDrive/MegaCD/32X emulator"; + license = "MAME"; + }; }; - play = mkLibRetroCore { + play = mkLibretroCore { core = "play"; - description = "Port of Play! to libretro"; - license = lib.licenses.bsd2; extraBuildInputs = [ boost bzip2 curl openssl icu libGL libGLU xorg.libX11 ]; extraNativeBuildInputs = [ cmake ]; makefile = "Makefile"; cmakeFlags = [ "-DBUILD_PLAY=OFF" "-DBUILD_LIBRETRO_CORE=ON" ]; postBuild = "cd Source/ui_libretro"; + meta = { + description = "Port of Play! to libretro"; + license = lib.licenses.bsd2; + }; }; - ppsspp = mkLibRetroCore { + ppsspp = mkLibretroCore { core = "ppsspp"; - description = "ppsspp libretro port"; - license = lib.licenses.gpl2Plus; extraNativeBuildInputs = [ cmake pkg-config python3 ]; extraBuildInputs = [ libGLU libGL libzip ffmpeg snappy xorg.libX11 ]; makefile = "Makefile"; @@ -705,149 +769,186 @@ in "-DOpenGL_GL_PREFERENCE=GLVND" ]; postBuild = "cd lib"; - }; - - prboom = mkLibRetroCore { - core = "prboom"; - description = "Prboom libretro port"; - license = lib.licenses.gpl2Only; - makefile = "Makefile"; - }; - - prosystem = mkLibRetroCore { - core = "prosystem"; - description = "Port of ProSystem to libretro"; - license = lib.licenses.gpl2Only; - makefile = "Makefile"; - }; - - puae = mkLibRetroCore { - core = "puae"; - description = "Amiga emulator based on WinUAE"; - license = lib.licenses.gpl2Only; - makefile = "Makefile"; - patches = fetchpatch { - url = "https://github.com/libretro/libretro-uae/commit/90ba4c9bb940e566781c3590553270ad69cf212e.patch"; - sha256 = "sha256-9xkRravvyFZc0xsIj0OSm2ux5BqYogfQ1TDnH9l6jKw="; + meta = { + description = "ppsspp libretro port"; + license = lib.licenses.gpl2Plus; }; }; - quicknes = mkLibRetroCore { - core = "quicknes"; - description = "QuickNES libretro port"; - license = lib.licenses.lgpl21Plus; + prboom = mkLibretroCore { + core = "prboom"; makefile = "Makefile"; + meta = { + description = "Prboom libretro port"; + license = lib.licenses.gpl2Only; + }; }; - sameboy = mkLibRetroCore { + prosystem = mkLibretroCore { + core = "prosystem"; + makefile = "Makefile"; + meta = { + description = "Port of ProSystem to libretro"; + license = lib.licenses.gpl2Only; + }; + }; + + puae = mkLibretroCore { + core = "puae"; + makefile = "Makefile"; + # https://github.com/libretro/libretro-uae/pull/529 + patches = fetchpatch { + url = "https://github.com/libretro/libretro-uae/commit/90ba4c9bb940e566781c3590553270ad69cf212e.patch"; + sha256 = "sha256-9xkRravvyFZc0xsIj0OSm2ux5BqYogfQ1TDnH9l6jKw="; + }; + meta = { + description = "Amiga emulator based on WinUAE"; + license = lib.licenses.gpl2Only; + }; + }; + + quicknes = mkLibretroCore { + core = "quicknes"; + makefile = "Makefile"; + meta = { + description = "QuickNES libretro port"; + license = lib.licenses.lgpl21Plus; + }; + }; + + sameboy = mkLibretroCore { core = "sameboy"; - description = "SameBoy libretro port"; - license = lib.licenses.mit; extraNativeBuildInputs = [ which hexdump ]; preBuild = "cd libretro"; makefile = "Makefile"; + meta = { + description = "SameBoy libretro port"; + license = lib.licenses.mit; + }; }; - scummvm = mkLibRetroCore { + scummvm = mkLibretroCore { core = "scummvm"; - description = "Libretro port of ScummVM"; - license = lib.licenses.gpl2Only; extraBuildInputs = [ fluidsynth libjpeg libvorbis libGLU libGL ]; makefile = "Makefile"; preConfigure = "cd backends/platform/libretro/build"; + meta = { + description = "Libretro port of ScummVM"; + license = lib.licenses.gpl2Only; + }; }; - smsplus-gx = mkLibRetroCore { + smsplus-gx = mkLibretroCore { core = "smsplus"; src = getCoreSrc "smsplus-gx"; - description = "SMS Plus GX libretro port"; - license = lib.licenses.gpl2Plus; + meta = { + description = "SMS Plus GX libretro port"; + license = lib.licenses.gpl2Plus; + }; }; - snes9x = mkLibRetroCore { + snes9x = mkLibretroCore { core = "snes9x"; - description = "Port of SNES9x git to libretro"; - license = "Non-commercial"; makefile = "Makefile"; preBuild = "cd libretro"; + meta = { + description = "Port of SNES9x git to libretro"; + license = "Non-commercial"; + }; }; - snes9x2002 = mkLibRetroCore { + snes9x2002 = mkLibretroCore { core = "snes9x2002"; - description = "Optimized port/rewrite of SNES9x 1.39 to Libretro"; - license = "Non-commercial"; makefile = "Makefile"; + meta = { + description = "Optimized port/rewrite of SNES9x 1.39 to Libretro"; + license = "Non-commercial"; + }; }; - snes9x2005 = mkLibRetroCore { + snes9x2005 = mkLibretroCore { core = "snes9x2005"; - description = "Optimized port/rewrite of SNES9x 1.43 to Libretro"; - license = "Non-commercial"; makefile = "Makefile"; + meta = { + description = "Optimized port/rewrite of SNES9x 1.43 to Libretro"; + license = "Non-commercial"; + }; }; - snes9x2005-plus = mkLibRetroCore { + snes9x2005-plus = mkLibretroCore { core = "snes9x2005-plus"; src = getCoreSrc "snes9x2005"; - description = "Optimized port/rewrite of SNES9x 1.43 to Libretro, with Blargg's APU"; - license = "Non-commercial"; makefile = "Makefile"; makeFlags = [ "USE_BLARGG_APU=1" ]; + meta = { + description = "Optimized port/rewrite of SNES9x 1.43 to Libretro, with Blargg's APU"; + license = "Non-commercial"; + }; }; - snes9x2010 = mkLibRetroCore { + snes9x2010 = mkLibretroCore { core = "snes9x2010"; - description = "Optimized port/rewrite of SNES9x 1.52+ to Libretro"; - license = "Non-commercial"; + meta = { + description = "Optimized port/rewrite of SNES9x 1.52+ to Libretro"; + license = "Non-commercial"; + }; }; - stella = mkLibRetroCore { + stella = mkLibretroCore { core = "stella"; - description = "Port of Stella to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; preBuild = "cd src/os/libretro"; dontConfigure = true; + meta = { + description = "Port of Stella to libretro"; + license = lib.licenses.gpl2Only; + }; }; - stella2014 = mkLibRetroCore { + stella2014 = mkLibretroCore { core = "stella2014"; - description = "Port of Stella to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of Stella ~2014 to libretro"; + license = lib.licenses.gpl2Only; + }; }; - swanstation = mkLibRetroCore { + swanstation = mkLibretroCore { core = "swanstation"; - description = "Port of SwanStation (a fork of DuckStation) to libretro"; - license = lib.licenses.gpl3Only; extraNativeBuildInputs = [ cmake ]; makefile = "Makefile"; cmakeFlags = [ "-DBUILD_LIBRETRO_CORE=ON" ]; + meta = { + description = "Port of SwanStation (a fork of DuckStation) to libretro"; + license = lib.licenses.gpl3Only; + }; }; - tgbdual = mkLibRetroCore { + tgbdual = mkLibretroCore { core = "tgbdual"; - description = "Port of TGBDual to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; + meta = { + description = "Port of TGBDual to libretro"; + license = lib.licenses.gpl2Only; + }; }; - thepowdertoy = mkLibRetroCore { + thepowdertoy = mkLibretroCore { core = "thepowdertoy"; - description = "Port of The Powder Toy to libretro"; - license = lib.licenses.gpl3Only; extraNativeBuildInputs = [ cmake ]; makefile = "Makefile"; postBuild = "cd src"; + meta = { + description = "Port of The Powder Toy to libretro"; + license = lib.licenses.gpl3Only; + }; }; - tic80 = mkLibRetroCore { + tic80 = mkLibretroCore { core = "tic80"; - description = "Port of TIC-80 to libretro"; - license = lib.licenses.mit; extraNativeBuildInputs = [ cmake pkg-config ]; makefile = "Makefile"; cmakeFlags = [ @@ -860,44 +961,58 @@ in ]; preConfigure = "cd core"; postBuild = "cd lib"; + meta = { + description = "Port of TIC-80 to libretro"; + license = lib.licenses.mit; + }; }; - vba-m = mkLibRetroCore { + vba-m = mkLibretroCore { core = "vbam"; src = getCoreSrc "vba-m"; - description = "vanilla VBA-M libretro port"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; preBuild = "cd src/libretro"; + meta = { + description = "vanilla VBA-M libretro port"; + license = lib.licenses.gpl2Only; + }; }; - vba-next = mkLibRetroCore { + vba-next = mkLibretroCore { core = "vba-next"; - description = "VBA-M libretro port with modifications for speed"; - license = lib.licenses.gpl2Only; + meta = { + description = "VBA-M libretro port with modifications for speed"; + license = lib.licenses.gpl2Only; + }; }; - vecx = mkLibRetroCore { + vecx = mkLibretroCore { core = "vecx"; - description = "Port of Vecx to libretro"; - license = lib.licenses.gpl3Only; extraBuildInputs = [ libGL libGLU ]; + meta = { + description = "Port of Vecx to libretro"; + license = lib.licenses.gpl3Only; + }; }; - virtualjaguar = mkLibRetroCore { + virtualjaguar = mkLibretroCore { core = "virtualjaguar"; - description = "Port of VirtualJaguar to libretro"; - license = lib.licenses.gpl3Only; makefile = "Makefile"; + meta = { + description = "Port of VirtualJaguar to libretro"; + license = lib.licenses.gpl3Only; + }; }; - yabause = mkLibRetroCore { + yabause = mkLibretroCore { core = "yabause"; - description = "Port of Yabause to libretro"; - license = lib.licenses.gpl2Only; makefile = "Makefile"; # Disable SSE for non-x86. DYNAREC doesn't build on aarch64. makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "HAVE_SSE=0"; preBuild = "cd yabause/src/libretro"; + meta = { + description = "Port of Yabause to libretro"; + license = lib.licenses.gpl2Only; + }; }; } diff --git a/pkgs/applications/emulators/retroarch/default.nix b/pkgs/applications/emulators/retroarch/default.nix index a8a20682afd4..d0a281afc373 100644 --- a/pkgs/applications/emulators/retroarch/default.nix +++ b/pkgs/applications/emulators/retroarch/default.nix @@ -6,18 +6,17 @@ , withVulkan ? stdenv.isLinux , withWayland ? stdenv.isLinux , alsa-lib -, AppKit , dbus , fetchFromGitHub , ffmpeg_4 -, Foundation +, flac , freetype , gamemode , libdrm , libGL , libGLU -, libobjc , libpulseaudio +, libretro-core-info , libv4l , libX11 , libXdmcp @@ -26,71 +25,61 @@ , libxml2 , libXxf86vm , makeWrapper +, mbedtls , mesa , nvidia_cg_toolkit , pkg-config , python3 , SDL2 +, substituteAll , udev , vulkan-loader , wayland +, zlib }: let - version = "1.12.0"; - libretroCoreInfo = fetchFromGitHub { - owner = "libretro"; - repo = "libretro-core-info"; - sha256 = "sha256-9Sfp/JkMJIe34YGNRxf93fONOBuQxR2pduoJU+xtuF0="; - # Upstream didn't tag a new libretro-core-info in 1.12.0 release - rev = "v1.11.1"; - }; runtimeLibs = lib.optional withVulkan vulkan-loader ++ lib.optional withGamemode (lib.getLib gamemode); in stdenv.mkDerivation rec { pname = "retroarch-bare"; - inherit version; + version = "1.12.0"; src = fetchFromGitHub { owner = "libretro"; repo = "RetroArch"; - sha256 = "sha256-doLWNA8aTAllxx3zABtvZaegBQEPIi8276zbytPSdBU="; + hash = "sha256-doLWNA8aTAllxx3zABtvZaegBQEPIi8276zbytPSdBU="; rev = "v${version}"; }; patches = [ - ./use-fixed-paths.patch + (substituteAll { + src = ./use-fixed-path-for-libretro_core_info.patch; + libretro_info_path = libretro-core-info; + }) ]; - postPatch = '' - substituteInPlace "frontend/drivers/platform_unix.c" \ - --subst-var-by libretro_directory "$out/lib" \ - --subst-var-by libretro_info_path "$out/share/libretro/info" \ - --subst-var-by out "$out" - substituteInPlace "frontend/drivers/platform_darwin.m" \ - --subst-var-by libretro_directory "$out/lib" \ - --subst-var-by libretro_info_path "$out/share/libretro/info" - ''; - nativeBuildInputs = [ pkg-config ] ++ lib.optional withWayland wayland ++ lib.optional (runtimeLibs != [ ]) makeWrapper; buildInputs = [ ffmpeg_4 + flac freetype libGL libGLU libxml2 + mbedtls python3 SDL2 + zlib ] ++ lib.optional enableNvidiaCgToolkit nvidia_cg_toolkit ++ lib.optional withVulkan vulkan-loader ++ lib.optional withWayland wayland ++ - lib.optionals stdenv.isDarwin [ libobjc AppKit Foundation ] ++ lib.optionals stdenv.isLinux [ alsa-lib dbus @@ -110,6 +99,9 @@ stdenv.mkDerivation rec { configureFlags = [ "--disable-update_cores" + "--disable-builtinmbedtls" + "--disable-builtinzlib" + "--disable-builtinflac" ] ++ lib.optionals stdenv.isLinux [ "--enable-dbus" @@ -117,39 +109,13 @@ stdenv.mkDerivation rec { "--enable-kms" ]; - postInstall = '' - # TODO: ideally each core should have its own core information - mkdir -p $out/share/libretro/info - cp -r ${libretroCoreInfo}/* $out/share/libretro/info - '' + - lib.optionalString (runtimeLibs != [ ]) '' + postInstall = lib.optionalString (runtimeLibs != [ ]) '' wrapProgram $out/bin/retroarch \ --prefix LD_LIBRARY_PATH ':' ${lib.makeLibraryPath runtimeLibs} - '' + - lib.optionalString stdenv.isDarwin '' - # https://github.com/libretro/RetroArch/blob/master/retroarch-apple-packaging.sh - app=$out/Applications/RetroArch.app - mkdir -p $app/Contents/MacOS - cp -r pkg/apple/OSX/* $app/Contents - cp $out/bin/retroarch $app/Contents/MacOS - # FIXME: using Info_Metal.plist results in input not working - # mv $app/Contents/Info_Metal.plist $app/Contents/Info.plist - - substituteInPlace $app/Contents/Info.plist \ - --replace '${"\${EXECUTABLE_NAME}"}' 'RetroArch' \ - --replace '$(PRODUCT_BUNDLE_IDENTIFIER)' 'com.libretro.RetroArch' \ - --replace '${"\${PRODUCT_NAME}"}' 'RetroArch' \ - --replace '${"\${MACOSX_DEPLOYMENT_TARGET}"}' '10.13' - - cp media/retroarch.icns $app/Contents/Resources/ ''; preFixup = "rm $out/bin/retroarch-cg2glsl"; - # Workaround for the following error affecting newer versions of Clang: - # ./config.def.h:xxx:x: error: 'TARGET_OS_TV' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] - NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isClang [ "-Wno-undef-prefix" ]; - passthru.tests = nixosTests.retroarch; meta = with lib; { @@ -159,9 +125,11 @@ stdenv.mkDerivation rec { platforms = platforms.unix; changelog = "https://github.com/libretro/RetroArch/blob/v${version}/CHANGES.md"; maintainers = with maintainers; teams.libretro.members ++ [ matthewbauer kolbycrouch ]; - # FIXME: error while building in macOS: - # "Undefined symbols for architecture " - # See also retroarch/wrapper.nix that is also broken in macOS + mainProgram = "retroarch"; + # If you want to (re)-add support for macOS, see: + # https://docs.libretro.com/development/retroarch/compilation/osx/ + # and + # https://github.com/libretro/RetroArch/blob/71eb74d256cb4dc5b8b43991aec74980547c5069/.gitlab-ci.yml#L330 broken = stdenv.isDarwin; }; } diff --git a/pkgs/applications/emulators/retroarch/libretro-core-info.nix b/pkgs/applications/emulators/retroarch/libretro-core-info.nix new file mode 100644 index 000000000000..1dd8b0e4b748 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/libretro-core-info.nix @@ -0,0 +1,28 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation rec { + pname = "libretro-core-info"; + version = "1.12.0"; + + src = fetchFromGitHub { + owner = "libretro"; + repo = "libretro-core-info"; + hash = "sha256-ByATDM0V40UJxigqVLyTWkHY5tiCC2dvZebksl8GsUI="; + rev = "v${version}"; + }; + + makeFlags = [ "PREFIX=$(out)" ]; + + dontBuild = true; + + meta = with lib; { + description = "Libretro's core info files"; + homepage = "https://libretro.com"; + license = licenses.mit; + maintainers = with maintainers; teams.libretro.members ++ [ ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/emulators/retroarch/mkLibretroCore.nix b/pkgs/applications/emulators/retroarch/mkLibretroCore.nix new file mode 100644 index 000000000000..6ab652127009 --- /dev/null +++ b/pkgs/applications/emulators/retroarch/mkLibretroCore.nix @@ -0,0 +1,80 @@ +{ lib +, stdenv +, core +, makeWrapper +, retroarch +, zlib +, makefile ? "Makefile.libretro" +, extraBuildInputs ? [ ] +, extraNativeBuildInputs ? [ ] + # Location of resulting RetroArch core on $out +, libretroCore ? "/lib/retroarch/cores" + # The core filename is derivated from the core name + # Setting `normalizeCore` to `true` will convert `-` to `_` on the core filename +, normalizeCore ? true +, ... +}@args: + +let + d2u = if normalizeCore then (lib.replaceChars [ "-" ] [ "_" ]) else (x: x); + coreDir = placeholder "out" + libretroCore; + coreFilename = "${d2u core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary}"; + mainProgram = "retroarch-${core}"; + extraArgs = builtins.removeAttrs args [ + "lib" + "stdenv" + "core" + "makeWrapper" + "retroarch" + "zlib" + "makefile" + "extraBuildInputs" + "extraNativeBuildInputs" + "libretroCore" + "normalizeCore" + "makeFlags" + "meta" + ]; +in +stdenv.mkDerivation ({ + pname = "libretro-${core}"; + + buildInputs = [ zlib ] ++ extraBuildInputs; + nativeBuildInputs = [ makeWrapper ] ++ extraNativeBuildInputs; + + inherit makefile; + + makeFlags = [ + "platform=${{ + linux = "unix"; + darwin = "osx"; + windows = "win"; + }.${stdenv.hostPlatform.parsed.kernel.name} or stdenv.hostPlatform.parsed.kernel.name}" + "ARCH=${{ + armv7l = "arm"; + armv6l = "arm"; + i686 = "x86"; + }.${stdenv.hostPlatform.parsed.cpu.name} or stdenv.hostPlatform.parsed.cpu.name}" + ] ++ (args.makeFlags or [ ]); + + installPhase = '' + runHook preInstall + + install -Dt ${coreDir} ${coreFilename} + makeWrapper ${retroarch}/bin/retroarch $out/bin/${mainProgram} \ + --add-flags "-L ${coreDir}/${coreFilename} $@" + + runHook postInstall + ''; + + enableParallelBuilding = true; + + passthru = { inherit core libretroCore; }; + + meta = with lib; { + inherit mainProgram; + inherit (retroarch.meta) platforms; + homepage = "https://www.libretro.com/"; + maintainers = with maintainers; teams.libretro.members ++ [ hrdinka ]; + } // (args.meta or { }); +} // extraArgs) diff --git a/pkgs/applications/emulators/retroarch/use-fixed-path-for-libretro_core_info.patch b/pkgs/applications/emulators/retroarch/use-fixed-path-for-libretro_core_info.patch new file mode 100644 index 000000000000..256397fd49ea --- /dev/null +++ b/pkgs/applications/emulators/retroarch/use-fixed-path-for-libretro_core_info.patch @@ -0,0 +1,41 @@ +From 6145cb9ed935621f1974655fe1ab44cf2f0fbcce Mon Sep 17 00:00:00 2001 +From: Thiago Kenji Okada +Date: Sat, 29 Oct 2022 12:27:55 +0100 +Subject: [PATCH] Use fixed path for libretro_core_info + +--- + configuration.c | 2 +- + frontend/drivers/platform_unix.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configuration.c b/configuration.c +index af3fc8f43c..c6d56308b3 100644 +--- a/configuration.c ++++ b/configuration.c +@@ -1468,7 +1468,7 @@ static struct config_path_setting *populate_settings_path( + SETTING_PATH("core_options_path", + settings->paths.path_core_options, false, NULL, true); + SETTING_PATH("libretro_info_path", +- settings->paths.path_libretro_info, false, NULL, true); ++ settings->paths.path_libretro_info, false, NULL, false); + SETTING_PATH("content_database_path", + settings->paths.path_content_database, false, NULL, true); + SETTING_PATH("cheat_database_path", +diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c +index fe5f7341c9..c2a91f8c99 100644 +--- a/frontend/drivers/platform_unix.c ++++ b/frontend/drivers/platform_unix.c +@@ -1799,8 +1799,8 @@ static void frontend_unix_get_env(int *argc, + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, + "core_info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #else +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, +- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", ++ "share/libretro/info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #endif + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], base_path, + "autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG])); +-- +2.38.0 + diff --git a/pkgs/applications/emulators/retroarch/use-fixed-paths.patch b/pkgs/applications/emulators/retroarch/use-fixed-paths.patch deleted file mode 100644 index a4837e63af7f..000000000000 --- a/pkgs/applications/emulators/retroarch/use-fixed-paths.patch +++ /dev/null @@ -1,154 +0,0 @@ -From 8a1cffebb23f9d2a28228cd8cbf4fd80836157e8 Mon Sep 17 00:00:00 2001 -From: Thiago Kenji Okada -Date: Tue, 18 Oct 2022 17:41:33 +0100 -Subject: [PATCH] Use fixed paths - ---- - configuration.c | 2 +- - frontend/drivers/platform_darwin.m | 4 +-- - frontend/drivers/platform_unix.c | 56 +++++++++++++++--------------- - 3 files changed, 31 insertions(+), 31 deletions(-) - -diff --git a/configuration.c b/configuration.c -index ac4779b2d7..d980892dda 100644 ---- a/configuration.c -+++ b/configuration.c -@@ -1468,7 +1468,7 @@ static struct config_path_setting *populate_settings_path( - SETTING_PATH("core_options_path", - settings->paths.path_core_options, false, NULL, true); - SETTING_PATH("libretro_info_path", -- settings->paths.path_libretro_info, false, NULL, true); -+ settings->paths.path_libretro_info, false, NULL, false); - SETTING_PATH("content_database_path", - settings->paths.path_content_database, false, NULL, true); - SETTING_PATH("cheat_database_path", -diff --git a/frontend/drivers/platform_darwin.m b/frontend/drivers/platform_darwin.m -index c771ec0f55..d5e21a1f4d 100644 ---- a/frontend/drivers/platform_darwin.m -+++ b/frontend/drivers/platform_darwin.m -@@ -400,9 +400,9 @@ static void frontend_darwin_get_env(int *argc, char *argv[], - home_dir_buf, "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); - #else - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], -- bundle_path_buf, "modules", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); -+ "@libretro_directory@", "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); - #endif -- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], home_dir_buf, "info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); -+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], home_dir_buf, "overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY])); - #ifdef HAVE_VIDEO_LAYOUT - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT], home_dir_buf, "layouts", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT])); -diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c -index 29e9a0d633..dba8abe941 100644 ---- a/frontend/drivers/platform_unix.c -+++ b/frontend/drivers/platform_unix.c -@@ -1792,8 +1792,8 @@ static void frontend_unix_get_env(int *argc, - strlcpy(g_defaults.dirs[DEFAULT_DIR_CORE], libretro_directory, - sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); - else -- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], base_path, -- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); -+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], "@libretro_directory@", -+ "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); - #if defined(DINGUX) - /* On platforms that require manual core installation/ - * removal, placing core info files in the same directory -@@ -1802,27 +1802,27 @@ static void frontend_unix_get_env(int *argc, - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, - "core_info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); - #else -- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, -- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); -+ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", -+ "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); - #endif - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], base_path, - "autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG])); - -- if (path_is_directory("/usr/local/share/retroarch/assets")) -+ if (path_is_directory("@out@/local/share/retroarch/assets")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], -- "/usr/local/share/retroarch", -+ "@out@/local/share/retroarch", - "assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); -- else if (path_is_directory("/usr/share/retroarch/assets")) -+ else if (path_is_directory("@out@/share/retroarch/assets")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], -- "/usr/share/retroarch", -+ "@out@/share/retroarch", - "assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); -- else if (path_is_directory("/usr/local/share/games/retroarch/assets")) -+ else if (path_is_directory("@out@/local/share/games/retroarch/assets")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], -- "/usr/local/share/games/retroarch", -+ "@out@/local/share/games/retroarch", - "assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); -- else if (path_is_directory("/usr/share/games/retroarch/assets")) -+ else if (path_is_directory("@out@/share/games/retroarch/assets")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], -- "/usr/share/games/retroarch", -+ "@out@/share/games/retroarch", - "assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); - else - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], base_path, -@@ -1834,41 +1834,41 @@ static void frontend_unix_get_env(int *argc, - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], base_path, - "filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER])); - #else -- if (path_is_directory("/usr/local/share/retroarch/filters/audio")) -+ if (path_is_directory("@out@/local/share/retroarch/filters/audio")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], -- "/usr/local/share/retroarch", -+ "@out@/local/share/retroarch", - "filters/audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER])); -- else if (path_is_directory("/usr/share/retroarch/filters/audio")) -+ else if (path_is_directory("@out@/share/retroarch/filters/audio")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], -- "/usr/share/retroarch", -+ "@out@/share/retroarch", - "filters/audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER])); -- else if (path_is_directory("/usr/local/share/games/retroarch/filters/audio")) -+ else if (path_is_directory("@out@/local/share/games/retroarch/filters/audio")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], -- "/usr/local/share/games/retroarch", -+ "@out@/local/share/games/retroarch", - "filters/audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER])); -- else if (path_is_directory("/usr/share/games/retroarch/filters/audio")) -+ else if (path_is_directory("@out@/share/games/retroarch/filters/audio")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], -- "/usr/share/games/retroarch", -+ "@out@/share/games/retroarch", - "filters/audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER])); - else - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER], base_path, - "filters/audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER])); - -- if (path_is_directory("/usr/local/share/retroarch/filters/video")) -+ if (path_is_directory("@out@/local/share/retroarch/filters/video")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], -- "/usr/local/share/retroarch", -+ "@out@/local/share/retroarch", - "filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER])); -- else if (path_is_directory("/usr/share/retroarch/filters/video")) -+ else if (path_is_directory("@out@/share/retroarch/filters/video")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], -- "/usr/share/retroarch", -+ "@out@/share/retroarch", - "filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER])); -- else if (path_is_directory("/usr/local/share/games/retroarch/filters/video")) -+ else if (path_is_directory("@out@/local/share/games/retroarch/filters/video")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], -- "/usr/local/share/games/retroarch", -+ "@out@/local/share/games/retroarch", - "filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER])); -- else if (path_is_directory("/usr/share/games/retroarch/filters/video")) -+ else if (path_is_directory("@out@/share/games/retroarch/filters/video")) - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], -- "/usr/share/games/retroarch", -+ "@out@/share/games/retroarch", - "filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER])); - else - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER], base_path, --- -2.37.3 - diff --git a/pkgs/applications/emulators/retroarch/wrapper.nix b/pkgs/applications/emulators/retroarch/wrapper.nix index 535cd40db6c3..4136d263eac4 100644 --- a/pkgs/applications/emulators/retroarch/wrapper.nix +++ b/pkgs/applications/emulators/retroarch/wrapper.nix @@ -1,41 +1,48 @@ -{ stdenv, lib, makeWrapper, retroarch, cores ? [ ] }: +{ lib +, stdenv +, makeWrapper +, retroarch +, symlinkJoin +, writeTextDir +, cores ? [ ] +}: -stdenv.mkDerivation { - pname = "retroarch"; - version = lib.getVersion retroarch; +let + # All cores should be located in the same path after symlinkJoin, + # but let's be safe here + coresPath = lib.lists.unique (map (c: c.libretroCore) cores); + wrapperArgs = lib.strings.escapeShellArgs + (lib.lists.flatten + (map (p: [ "--add-flags" "-L ${placeholder "out" + p}" ]) coresPath)); +in +symlinkJoin { + name = "retroarch-with-cores-${lib.getVersion retroarch}"; + + paths = [ retroarch ] ++ cores; nativeBuildInputs = [ makeWrapper ]; - buildCommand = '' - mkdir -p $out/lib - for coreDir in $cores; do - ln -s $coreDir/* $out/lib/. - done + passthru = { + inherit cores; + unwrapped = retroarch; + }; - ln -s -t $out ${retroarch}/share + postBuild = '' + # remove core specific binaries + find $out/bin -name 'retroarch-*' -type l -delete - if [ -d ${retroarch}/Applications ]; then - ln -s -t $out ${retroarch}/Applications - fi - - makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch \ - --suffix-each LD_LIBRARY_PATH ':' "$cores" \ - --add-flags "-L $out/lib/" \ + # wrap binary to load cores from the proper location(s) + wrapProgram $out/bin/retroarch ${wrapperArgs} ''; - cores = map (x: x + x.libretroCore) cores; - preferLocalBuild = true; - meta = with retroarch.meta; { inherit changelog description homepage license maintainers platforms; longDescription = '' RetroArch is the reference frontend for the libretro API. - - The following cores are included: - ${lib.concatStringsSep "\n" (map (x: " - ${x.name}") cores)} + '' + + lib.optionalString (cores != [ ]) '' + The following cores are included: ${lib.concatStringsSep ", " (map (c: c.core) cores)} ''; - # FIXME: exit with error on macOS: - # No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting - broken = stdenv.isDarwin; + mainProgram = "retroarch"; }; } diff --git a/pkgs/applications/emulators/uxn/default.nix b/pkgs/applications/emulators/uxn/default.nix index 0b797e2e160b..935207321c5a 100644 --- a/pkgs/applications/emulators/uxn/default.nix +++ b/pkgs/applications/emulators/uxn/default.nix @@ -4,15 +4,15 @@ , SDL2 }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "uxn"; - version = "0.pre+unstable=2021-08-30"; + version = "unstable-2022-10-22"; src = fetchFromSourcehut { owner = "~rabbits"; - repo = pname; - rev = "a2e40d9d10c11ef48f4f93d0dc86f5085b4263ce"; - hash = "sha256-/hxDYi814nQydm2iQk4NID4vpJ3BcBcM6NdL0iuZk5M="; + repo = "uxn"; + rev = "1b2049e238df96f32335edf1c6db35bd09f8b42d"; + hash = "sha256-lwms+qUelfpTC+i2m5b3dW7ww9298YMPFdPVsFrwcDQ="; }; buildInputs = [ @@ -21,14 +21,14 @@ stdenv.mkDerivation rec { dontConfigure = true; - # It is easier to emulate build.sh script + postPatch = '' + sed -i -e 's|UXNEMU_LDFLAGS="$(brew.*$|UXNEMU_LDFLAGS="$(sdl2-config --cflags --libs)"|' build.sh + ''; + buildPhase = '' runHook preBuild - cc -std=c89 -Wall -Wno-unknown-pragmas src/uxnasm.c -o uxnasm - cc -std=c89 -Wall -Wno-unknown-pragmas src/uxn.c src/uxncli.c -o uxncli - cc -std=c89 -Wall -Wno-unknown-pragmas src/uxn.c src/devices/ppu.c \ - src/devices/apu.c src/uxnemu.c $(sdl2-config --cflags --libs) -o uxnemu + ./build.sh --no-run runHook postBuild ''; @@ -36,10 +36,10 @@ stdenv.mkDerivation rec { installPhase = '' runHook preInstall - install -d $out/bin/ $out/share/${pname}/ + install -d $out/bin/ $out/share/uxn/ - cp uxnasm uxncli uxnemu $out/bin/ - cp -r projects $out/share/${pname}/ + cp bin/uxnasm bin/uxncli bin/uxnemu $out/bin/ + cp -r projects $out/share/uxn/ runHook postInstall ''; @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { homepage = "https://wiki.xxiivv.com/site/uxn.html"; description = "An assembler and emulator for the Uxn stack machine"; license = with licenses; [ mit ]; - maintainers = with maintainers; [ AndersonTorres ]; + maintainers = with maintainers; [ AndersonTorres kototama ]; platforms = with platforms; unix; }; } diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix index 688d6140afb4..e1705efc8ddb 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix @@ -87,7 +87,7 @@ let fteLibPath = makeLibraryPath [ stdenv.cc.cc gmp ]; # Upstream source - version = "11.5.5"; + version = "11.5.6"; lang = "en-US"; @@ -99,7 +99,7 @@ let "https://tor.eff.org/dist/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz" "https://tor.calyxinstitute.org/dist/torbrowser/${version}/tor-browser-linux64-${version}_${lang}.tar.xz" ]; - sha256 = "sha256-AOt0PFot6Qh9voqvi5bagW0HLk2kP8b6A2c8Jdv5vkQ="; + sha256 = "sha256-DTMY6n7GXokOz6WSrvFUkC64Siuo1Zy80A4UDolmIME="; }; i686-linux = fetchurl { @@ -109,7 +109,7 @@ let "https://tor.eff.org/dist/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz" "https://tor.calyxinstitute.org/dist/torbrowser/${version}/tor-browser-linux32-${version}_${lang}.tar.xz" ]; - sha256 = "sha256-MQrJgdAsNvG+WCx4eeb2UHZp/0LoOIhZZQUKESNIGZY="; + sha256 = "sha256-2/fGt+m/EDoeaSune32zmktHVHt8zH2wCr8+stewKCs="; }; }; in diff --git a/pkgs/applications/networking/cluster/istioctl/default.nix b/pkgs/applications/networking/cluster/istioctl/default.nix index d98a09439fe7..b4ae402fa0c9 100644 --- a/pkgs/applications/networking/cluster/istioctl/default.nix +++ b/pkgs/applications/networking/cluster/istioctl/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "istioctl"; - version = "1.15.2"; + version = "1.15.3"; src = fetchFromGitHub { owner = "istio"; repo = "istio"; rev = version; - sha256 = "sha256-ZbOh0BMvYnJQD0WjZcKKiG4ECn1Lbr9760Hn2ecdPH8="; + sha256 = "sha256-mgf3xQIsd4j3a5pqZz2UHhsHizACjVC4St1GfsDJsfY="; }; - vendorSha256 = "sha256-RgxGPPNBYXe1/gFNKeM+huPCD6EGBPea5EtciSA9o58="; + vendorSha256 = "sha256-P40VPtPxbfL0xpAMLJrqPhyyB7xFTsXMfBSCGL3S4Gg="; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/applications/networking/instant-messengers/gurk-rs/default.nix b/pkgs/applications/networking/instant-messengers/gurk-rs/default.nix index 924a918ebceb..e518590a9167 100644 --- a/pkgs/applications/networking/instant-messengers/gurk-rs/default.nix +++ b/pkgs/applications/networking/instant-messengers/gurk-rs/default.nix @@ -7,16 +7,20 @@ rustPlatform.buildRustPackage rec { pname = "gurk-rs"; - version = "0.2.4"; + version = "0.2.5"; src = fetchFromGitHub { owner = "boxdot"; repo = pname; rev = "v${version}"; - sha256 = "sha256-WZUoUvu7GaiBOaRAOGRCXrLe6u3DRbI6CDTAf5jryGc="; + sha256 = "sha256-CEsnZ0V85eOH+bjtico5yo9kS6eMT7Dx3H6wiDUjQm4="; }; - cargoHash = "sha256-81ZW61JX40W0D/cmYogR3RJH2dvEKW1K7sIsl2io/7E="; + postPatch = '' + rm .cargo/config.toml + ''; + + cargoHash = "sha256-z+2G/hD1zYOoJrYFB0eEP6y9MoV2OfdkJVt6je94EkU="; buildInputs = [ protobuf ]; PROTOC = "${protobuf}/bin/protoc"; diff --git a/pkgs/applications/office/zotero/default.nix b/pkgs/applications/office/zotero/default.nix index 72e84487b28a..a56c8447e27d 100644 --- a/pkgs/applications/office/zotero/default.nix +++ b/pkgs/applications/office/zotero/default.nix @@ -41,12 +41,12 @@ stdenv.mkDerivation rec { pname = "zotero"; - version = "6.0.12"; + version = "6.0.15"; src = fetchurl { url = "https://download.zotero.org/client/release/${version}/Zotero-${version}_linux-x86_64.tar.bz2"; - sha256 = "sha256-RIPFn0fLk2CbOoiZ4a5ungnbvfRWFQQUypCYVvVIQms="; + sha256 = "sha256-h/hyaRjunVkVoHmVpru481goN73Ano1TDRDDg5AVoTI="; }; nativeBuildInputs = [ wrapGAppsHook ]; diff --git a/pkgs/applications/science/logic/cbmc/default.nix b/pkgs/applications/science/logic/cbmc/default.nix index 5f3fb6c51542..e5c16695624b 100644 --- a/pkgs/applications/science/logic/cbmc/default.nix +++ b/pkgs/applications/science/logic/cbmc/default.nix @@ -13,13 +13,13 @@ stdenv.mkDerivation rec { pname = "cbmc"; - version = "5.69.0"; + version = "5.69.1"; src = fetchFromGitHub { owner = "diffblue"; repo = pname; rev = "${pname}-${version}"; - sha256 = "sha256-X0Kc7I+5it0sbyRT6QXm7OOA9efnY3KwnMnyldgsNaA="; + sha256 = "sha256-1HwR+MM2AUrx07knBDJg+xCm0/cyGzYGQ2LvJUxXEyE="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/science/robotics/mujoco/default.nix b/pkgs/applications/science/robotics/mujoco/default.nix new file mode 100644 index 000000000000..4af3d6899fa9 --- /dev/null +++ b/pkgs/applications/science/robotics/mujoco/default.nix @@ -0,0 +1,122 @@ +{ cmake +, fetchFromGitHub +, fetchFromGitLab +, git +, lib +, libGL +, stdenv +, xorg +}: + +let + # See https://github.com/deepmind/mujoco/blob/573d331b69845c5d651b70f5d1b0f3a0d2a3a233/cmake/MujocoDependencies.cmake#L21-L59 + abseil-cpp = fetchFromGitHub { + owner = "abseil"; + repo = "abseil-cpp"; + rev = "8c0b94e793a66495e0b1f34a5eb26bd7dc672db0"; + hash = "sha256-Od1FZOOWEXVQsnZBwGjDIExi6LdYtomyL0STR44SsG8="; + }; + benchmark = fetchFromGitHub { + owner = "google"; + repo = "benchmark"; + rev = "d845b7b3a27d54ad96280a29d61fa8988d4fddcf"; + hash = "sha256-XTnTM1k6xMGXUws/fKdJUbpCPcc4U0IelL6BPEEnpEQ="; + }; + ccd = fetchFromGitHub { + owner = "danfis"; + repo = "libccd"; + rev = "7931e764a19ef6b21b443376c699bbc9c6d4fba8"; + hash = "sha256-TIZkmqQXa0+bSWpqffIgaBela0/INNsX9LPM026x1Wk="; + }; + eigen3 = fetchFromGitLab { + owner = "libeigen"; + repo = "eigen"; + rev = "3bb6a48d8c171cf20b5f8e48bfb4e424fbd4f79e"; + hash = "sha256-k71DoEsx8JpC9AlQ0cCRI0fWMIWFBFL/Yscx+2iBtNM="; + }; + googletest = fetchFromGitHub { + owner = "google"; + repo = "googletest"; + rev = "58d77fa8070e8cec2dc1ed015d66b454c8d78850"; + hash = "sha256-W+OxRTVtemt2esw4P7IyGWXOonUN5ZuscjvzqkYvZbM="; + }; + lodepng = fetchFromGitHub { + owner = "lvandeve"; + repo = "lodepng"; + rev = "b4ed2cd7ecf61d29076169b49199371456d4f90b"; + hash = "sha256-5cCkdj/izP4e99BKfs/Mnwu9aatYXjlyxzzYiMD/y1M="; + }; + qhull = fetchFromGitHub { + owner = "qhull"; + repo = "qhull"; + rev = "3df027b91202cf179f3fba3c46eebe65bbac3790"; + hash = "sha256-aHO5n9Y35C7/zb3surfMyjyMjo109DoZnkozhiAKpYQ="; + }; + tinyobjloader = fetchFromGitHub { + owner = "tinyobjloader"; + repo = "tinyobjloader"; + rev = "1421a10d6ed9742f5b2c1766d22faa6cfbc56248"; + hash = "sha256-9z2Ne/WPCiXkQpT8Cun/pSGUwgClYH+kQ6Dx1JvW6w0="; + }; + tinyxml2 = fetchFromGitHub { + owner = "leethomason"; + repo = "tinyxml2"; + rev = "1dee28e51f9175a31955b9791c74c430fe13dc82"; + hash = "sha256-AQQOctXi7sWIH/VOeSUClX6hlm1raEQUOp+VoPjLM14="; + }; + + # See https://github.com/deepmind/mujoco/blob/573d331b69845c5d651b70f5d1b0f3a0d2a3a233/simulate/cmake/SimulateDependencies.cmake#L32-L35 + glfw = fetchFromGitHub { + owner = "glfw"; + repo = "glfw"; + rev = "7482de6071d21db77a7236155da44c172a7f6c9e"; + hash = "sha256-4+H0IXjAwbL5mAWfsIVhW0BSJhcWjkQx4j2TrzZ3aIo="; + }; +in +stdenv.mkDerivation rec { + pname = "mujoco"; + version = "2.3.0"; + + src = fetchFromGitHub { + owner = "deepmind"; + repo = pname; + rev = version; + hash = "sha256-FxMaXl7yfUAyY6LE1sxaw226dBtp1DOCWNnROp0WX2I="; + }; + + patches = [ ./dependencies.patch ]; + + nativeBuildInputs = [ cmake git ]; + + buildInputs = [ + libGL + xorg.libX11 + xorg.libXcursor + xorg.libXext + xorg.libXi + xorg.libXinerama + xorg.libXrandr + ]; + + # Move things into place so that cmake doesn't try downloading dependencies. + preConfigure = '' + mkdir -p build/_deps + ln -s ${abseil-cpp} build/_deps/abseil-cpp-src + ln -s ${benchmark} build/_deps/benchmark-src + ln -s ${ccd} build/_deps/ccd-src + ln -s ${eigen3} build/_deps/eigen3-src + ln -s ${glfw} build/_deps/glfw-src + ln -s ${googletest} build/_deps/googletest-src + ln -s ${lodepng} build/_deps/lodepng-src + ln -s ${qhull} build/_deps/qhull-src + ln -s ${tinyobjloader} build/_deps/tinyobjloader-src + ln -s ${tinyxml2} build/_deps/tinyxml2-src + ''; + + meta = with lib; { + description = "Multi-Joint dynamics with Contact. A general purpose physics simulator."; + homepage = "https://mujoco.org/"; + license = licenses.asl20; + maintainers = with maintainers; [ samuela ]; + }; +} diff --git a/pkgs/applications/science/robotics/mujoco/dependencies.patch b/pkgs/applications/science/robotics/mujoco/dependencies.patch new file mode 100644 index 000000000000..5ddbaaab5329 --- /dev/null +++ b/pkgs/applications/science/robotics/mujoco/dependencies.patch @@ -0,0 +1,114 @@ +diff --git a/cmake/MujocoDependencies.cmake b/cmake/MujocoDependencies.cmake +index 99e4a7a..cf9a901 100644 +--- a/cmake/MujocoDependencies.cmake ++++ b/cmake/MujocoDependencies.cmake +@@ -82,8 +82,6 @@ set(BUILD_SHARED_LIBS + if(NOT TARGET lodepng) + FetchContent_Declare( + lodepng +- GIT_REPOSITORY https://github.com/lvandeve/lodepng.git +- GIT_TAG ${MUJOCO_DEP_VERSION_lodepng} + ) + + FetchContent_GetProperties(lodepng) +@@ -111,10 +109,6 @@ findorfetch( + qhull + LIBRARY_NAME + qhull +- GIT_REPO +- https://github.com/qhull/qhull.git +- GIT_TAG +- ${MUJOCO_DEP_VERSION_qhull} + TARGETS + qhull + # TODO(fraromano) Remove when https://github.com/qhull/qhull/pull/112 is merged. +@@ -146,10 +140,6 @@ findorfetch( + tinyxml2 + LIBRARY_NAME + tinyxml2 +- GIT_REPO +- https://github.com/leethomason/tinyxml2.git +- GIT_TAG +- ${MUJOCO_DEP_VERSION_tinyxml2} + TARGETS + tinyxml2 + EXCLUDE_FROM_ALL +@@ -164,10 +154,6 @@ findorfetch( + tinyobjloader + LIBRARY_NAME + tinyobjloader +- GIT_REPO +- https://github.com/tinyobjloader/tinyobjloader.git +- GIT_TAG +- ${MUJOCO_DEP_VERSION_tinyobjloader} + TARGETS + tinyobjloader + EXCLUDE_FROM_ALL +@@ -182,10 +168,6 @@ findorfetch( + ccd + LIBRARY_NAME + ccd +- GIT_REPO +- https://github.com/danfis/libccd.git +- GIT_TAG +- ${MUJOCO_DEP_VERSION_ccd} + TARGETS + ccd + EXCLUDE_FROM_ALL +@@ -222,10 +204,6 @@ if(MUJOCO_BUILD_TESTS) + absl + LIBRARY_NAME + abseil-cpp +- GIT_REPO +- https://github.com/abseil/abseil-cpp.git +- GIT_TAG +- ${MUJOCO_DEP_VERSION_abseil} + TARGETS + absl::core_headers + EXCLUDE_FROM_ALL +@@ -249,10 +227,6 @@ if(MUJOCO_BUILD_TESTS) + GTest + LIBRARY_NAME + googletest +- GIT_REPO +- https://github.com/google/googletest.git +- GIT_TAG +- ${MUJOCO_DEP_VERSION_gtest} + TARGETS + gtest + gmock +@@ -283,10 +257,6 @@ if(MUJOCO_BUILD_TESTS) + benchmark + LIBRARY_NAME + benchmark +- GIT_REPO +- https://github.com/google/benchmark.git +- GIT_TAG +- ${MUJOCO_DEP_VERSION_benchmark} + TARGETS + benchmark::benchmark + benchmark::benchmark_main +@@ -303,8 +273,6 @@ if(MUJOCO_TEST_PYTHON_UTIL) + + FetchContent_Declare( + Eigen3 +- GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git +- GIT_TAG ${MUJOCO_DEP_VERSION_Eigen3} + ) + + FetchContent_GetProperties(Eigen3) +diff --git a/simulate/cmake/SimulateDependencies.cmake b/simulate/cmake/SimulateDependencies.cmake +index 6616d6f..5d5a889 100644 +--- a/simulate/cmake/SimulateDependencies.cmake ++++ b/simulate/cmake/SimulateDependencies.cmake +@@ -81,10 +81,6 @@ findorfetch( + glfw + LIBRARY_NAME + glfw +- GIT_REPO +- https://github.com/glfw/glfw.git +- GIT_TAG +- ${MUJOCO_DEP_VERSION_glfw} + TARGETS + glfw + EXCLUDE_FROM_ALL diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix index f3d3bf38b634..41c14d6e439a 100644 --- a/pkgs/applications/video/vlc/default.nix +++ b/pkgs/applications/video/vlc/default.nix @@ -64,7 +64,6 @@ , systemd , taglib , unzip -, xlibsWrapper , xorg , zlib , chromecastSupport ? true, libmicrodns, protobuf @@ -150,10 +149,10 @@ stdenv.mkDerivation rec { srt systemd taglib - xlibsWrapper zlib ] ++ (with xorg; [ + libSM libXpm libXv libXvMC diff --git a/pkgs/applications/virtualization/ecs-agent/default.nix b/pkgs/applications/virtualization/ecs-agent/default.nix index 0f4f84d0fb60..9ad13b8768d6 100644 --- a/pkgs/applications/virtualization/ecs-agent/default.nix +++ b/pkgs/applications/virtualization/ecs-agent/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "amazon-ecs-agent"; - version = "1.65.0"; + version = "1.65.1"; goPackagePath = "github.com/aws/${pname}"; subPackages = [ "agent" ]; @@ -11,7 +11,7 @@ buildGoPackage rec { rev = "v${version}"; owner = "aws"; repo = pname; - sha256 = "sha256-vnq76WifMax2GAUSoeYtjmAQc2T8cyer18+PaG87n7A="; + sha256 = "sha256-IsbY2ZQQq8eOhdT/ws1Yu7YlnQOyjhDaIr1knOHB4Yc="; }; meta = with lib; { diff --git a/pkgs/development/libraries/s2n-tls/default.nix b/pkgs/development/libraries/s2n-tls/default.nix index 97eef4c697eb..f266261775c5 100644 --- a/pkgs/development/libraries/s2n-tls/default.nix +++ b/pkgs/development/libraries/s2n-tls/default.nix @@ -1,23 +1,25 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , cmake , openssl +, nix }: stdenv.mkDerivation rec { pname = "s2n-tls"; - version = "1.3.25"; + version = "1.3.26"; src = fetchFromGitHub { owner = "aws"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Ugchtv8c+nRFJk4ord7Q8Rqn0bsqJtLb+DV7u/MrCa0="; + sha256 = "sha256-eVqiY/AomnKbN83hSB66EIuGD82Ilx+ybQtBMyX57WY="; }; nativeBuildInputs = [ cmake ]; - outputs = [ "out" "dev"]; + outputs = [ "out" "dev" ]; buildInputs = [ openssl ]; # s2n-config has find_dependency(LibCrypto). @@ -39,6 +41,10 @@ stdenv.mkDerivation rec { done ''; + passthru.tests = { + inherit nix; + }; + meta = with lib; { description = "C99 implementation of the TLS/SSL protocols"; homepage = "https://github.com/aws/s2n-tls"; diff --git a/pkgs/development/libraries/sundials/default.nix b/pkgs/development/libraries/sundials/default.nix index 867d109d71b2..6e7b13daaba2 100644 --- a/pkgs/development/libraries/sundials/default.nix +++ b/pkgs/development/libraries/sundials/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "sundials"; - version = "6.3.0"; + version = "6.4.0"; outputs = [ "out" "examples" ]; src = fetchurl { url = "https://github.com/LLNL/sundials/releases/download/v${version}/sundials-${version}.tar.gz"; - hash = "sha256-iaIr6oIP8lCqcjn2NKsH+jTv4dLc/eKcyNOvEUVboqc="; + hash = "sha256-Cv+AOhLG0pjQW1aDkZfdCYWGMYZAF+JV7Ynii0m2UvE="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/aiofiles/default.nix b/pkgs/development/python-modules/aiofiles/default.nix index 592f8facaebb..ef59dd6fa530 100644 --- a/pkgs/development/python-modules/aiofiles/default.nix +++ b/pkgs/development/python-modules/aiofiles/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "aiofiles"; - version = "0.8.0"; + version = "22.1.0"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "Tinche"; repo = pname; rev = "v${version}"; - sha256 = "sha256-V7F+xalFGMgTgT30Gmd9FVV3cPndI/i9cB5vEuW/KVc="; + sha256 = "sha256-2itjGYusJT6sbCAgvKsI9IXeAOP7VQV0bpifFBZmnAo="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/aiomysensors/default.nix b/pkgs/development/python-modules/aiomysensors/default.nix index dfa02c979433..b2888a92d256 100644 --- a/pkgs/development/python-modules/aiomysensors/default.nix +++ b/pkgs/development/python-modules/aiomysensors/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "aiomysensors"; - version = "0.3.0"; + version = "0.3.1"; format = "pyproject"; disabled = pythonOlder "3.9"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "MartinHjelmare"; repo = pname; rev = "v${version}"; - hash = "sha256-EGVoHEJrpGtp8OrhQhRZVaN1GhL4QCo/azp6pzgYYcs="; + hash = "sha256-uzVtgJ4R2MK6lqruvmoqgkzVCLhjyaEV92X6U6+lwG4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/datasette-template-sql/default.nix b/pkgs/development/python-modules/datasette-template-sql/default.nix index 84c88aea9338..a4ba47add5cf 100644 --- a/pkgs/development/python-modules/datasette-template-sql/default.nix +++ b/pkgs/development/python-modules/datasette-template-sql/default.nix @@ -1,33 +1,40 @@ -{ buildPythonPackage -, fetchFromGitHub -, lib +{ lib +, buildPythonPackage , datasette -, pytestCheckHook +, fetchFromGitHub , pytest-asyncio -, sqlite-utils +, pythonOlder }: buildPythonPackage rec { pname = "datasette-template-sql"; version = "1.0.2"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "simonw"; repo = pname; rev = version; - sha256 = "1ag5f62y445jscxnklcfd84pjinkknmrpk1kmm2j121p7484hrsn"; + hash = "sha256-VmdIEDk3iCBFrTPMm6ud00Z5CWqO0Wk707IQ4oVx5ak="; }; - propagatedBuildInputs = [ datasette ]; + propagatedBuildInputs = [ + datasette + ]; - checkInputs = [ pytestCheckHook pytest-asyncio sqlite-utils ]; + # Tests require a running datasette instance + doCheck = false; - pythonImportsCheck = [ "datasette_template_sql" ]; + pythonImportsCheck = [ + "datasette_template_sql" + ]; meta = with lib; { description = "Datasette plugin for executing SQL queries from templates"; homepage = "https://datasette.io/plugins/datasette-template-sql"; license = licenses.asl20; - maintainers = [ maintainers.MostAwesomeDude ]; + maintainers = with maintainers; [ MostAwesomeDude ]; }; } diff --git a/pkgs/development/python-modules/datasette/default.nix b/pkgs/development/python-modules/datasette/default.nix index 18c6943d1e67..85eb37772af9 100644 --- a/pkgs/development/python-modules/datasette/default.nix +++ b/pkgs/development/python-modules/datasette/default.nix @@ -16,7 +16,6 @@ , pyyaml , uvicorn , httpx -# Check Inputs , pytestCheckHook , pytest-asyncio , pytest-timeout @@ -30,7 +29,8 @@ buildPythonPackage rec { pname = "datasette"; - version = "0.61.1"; + version = "0.63"; + format = "setuptools"; disabled = pythonOlder "3.7"; @@ -38,18 +38,13 @@ buildPythonPackage rec { owner = "simonw"; repo = pname; rev = version; - sha256 = "sha256-HVzMyF4ujYK12UQ25il/XROPo+iBldsMxOTx+duoc5o="; + sha256 = "sha256-kzehFvGSmGo2TAtiNZCjRVv/kaiE+shniNnD0gO58b4="; }; postPatch = '' substituteInPlace setup.py \ --replace '"pytest-runner"' "" \ - --replace "click>=7.1.1,<8.1.0" "click>=7.1.1,<8.2.0" \ - --replace "click-default-group~=1.2.2" "click-default-group" \ - --replace "hupper~=1.9" "hupper" \ - --replace "Jinja2>=2.10.3,<3.1.0" "Jinja2" \ - --replace "pint~=0.9" "pint" \ - --replace "uvicorn~=0.11" "uvicorn" + --replace "click-default-group-wheel>=1.2.2" "click-default-group" ''; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/launchpadlib/default.nix b/pkgs/development/python-modules/launchpadlib/default.nix index 8ad74504e84b..10f7405a268a 100644 --- a/pkgs/development/python-modules/launchpadlib/default.nix +++ b/pkgs/development/python-modules/launchpadlib/default.nix @@ -15,11 +15,12 @@ buildPythonPackage rec { pname = "launchpadlib"; - version = "1.10.17"; + version = "1.10.18"; + format = "pyproject"; src = fetchPypi { inherit pname version; - sha256 = "sha256-QoyxsxkJmt/anZ3dfQk3Zn4dRgkOxcgA6aIkFf8asYg="; + sha256 = "sha256-uFRv4XrKUUfSRq0gd4xKVUTrR6+RsYUVJDePpo8tcmQ="; }; propagatedBuildInputs = [ @@ -33,7 +34,9 @@ buildPythonPackage rec { wadllib ]; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ + pytestCheckHook + ]; preCheck = '' export HOME=$TMPDIR @@ -41,6 +44,12 @@ buildPythonPackage rec { doCheck = isPy3k; + pythonImportsCheck = [ + "launchpadlib" + "launchpadlib.apps" + "launchpadlib.credentials" + ]; + meta = with lib; { description = "Script Launchpad through its web services interfaces. Officially supported"; homepage = "https://help.launchpad.net/API/launchpadlib"; diff --git a/pkgs/development/python-modules/openapi-core/default.nix b/pkgs/development/python-modules/openapi-core/default.nix index 32989e7f9ce5..bb5d02724bbe 100644 --- a/pkgs/development/python-modules/openapi-core/default.nix +++ b/pkgs/development/python-modules/openapi-core/default.nix @@ -1,32 +1,34 @@ { lib -, attrs , buildPythonPackage -, dictpath , django , djangorestframework , falcon , fetchFromGitHub , flask +, httpx , isodate -, lazy-object-proxy +, jsonschema-spec , mock , more-itertools , openapi-schema-validator , openapi-spec-validator , parse +, pathable +, poetry-core , pytestCheckHook , pythonOlder , responses -, six +, requests +, starlette +, typing-extensions , webob , werkzeug -, python }: buildPythonPackage rec { pname = "openapi-core"; - version = "0.14.2"; - format = "setuptools"; + version = "0.16.1"; + format = "pyproject"; disabled = pythonOlder "3.7"; @@ -34,51 +36,67 @@ buildPythonPackage rec { owner = "p1c2u"; repo = "openapi-core"; rev = version; - hash = "sha256-+VyNPSq7S1Oz4eGf+jaeRTx0lZ8pUA+G+KZ/5PyK+to="; + hash = "sha256-J3n34HR5lfMM0ik5HAZ2JCr75fX5FTqBWrZ7E3/6XSE="; }; postPatch = '' - sed -i "/^addopts/d" setup.cfg + sed -i "/--cov/d" pyproject.toml ''; + nativeBuildInputs = [ + poetry-core + ]; + propagatedBuildInputs = [ - attrs - dictpath isodate - lazy-object-proxy + more-itertools + pathable more-itertools openapi-schema-validator + jsonschema-spec openapi-spec-validator + typing-extensions parse - six werkzeug ]; + passthru.optional-dependencies = { + django = [ + django + ]; + falcon = [ + falcon + ]; + flask = [ + flask + ]; + requests = [ + requests + ]; + starlette = [ + httpx + starlette + ]; + }; + checkInputs = [ - django - djangorestframework - falcon - flask mock pytestCheckHook responses webob - ]; + ] ++ passthru.optional-dependencies.flask + ++ passthru.optional-dependencies.falcon + ++ passthru.optional-dependencies.django + ++ passthru.optional-dependencies.starlette + ++ passthru.optional-dependencies.requests; disabledTestPaths = [ # AttributeError: 'str' object has no attribute '__name__' - "tests/integration/validation" - # requires secrets and additional configuration - "tests/integration/contrib/test_django.py" + #"tests/integration/validation" + # Requires secrets and additional configuration + "tests/integration/contrib/django/" # Unable to detect SECRET_KEY and ROOT_URLCONF - "tests/integration/contrib/test_django.py" - ]; - - disabledTests = [ - # TypeError: Unexpected keyword arguments passed to pytest.raises: message - "test_string_format_invalid_value" - # Needs a fix for new PyYAML - "test_django_rest_framework_apiview" + "tests/integration/contrib/django/" ]; pythonImportsCheck = [ diff --git a/pkgs/development/python-modules/pylast/default.nix b/pkgs/development/python-modules/pylast/default.nix index 1a101310d405..91124c01ec61 100644 --- a/pkgs/development/python-modules/pylast/default.nix +++ b/pkgs/development/python-modules/pylast/default.nix @@ -1,28 +1,34 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , flaky +, hatch-vcs +, hatchling , httpx , importlib-metadata , pytestCheckHook , pythonOlder -, setuptools-scm }: buildPythonPackage rec { pname = "pylast"; - version = "5.0.0"; - format = "setuptools"; + version = "5.1.0"; + format = "pyproject"; disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - hash = "sha256-UBi2bCtGMtcavYEDtz5m5N0UxmCaj3un5aomxzbfLfg="; + src = fetchFromGitHub { + owner = "pylast"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-LRZYLo9h7Z8WXemLgKR5qzAmtL4x/AQQJpta3e0WHcc="; }; + SETUPTOOLS_SCM_PRETEND_VERSION = version; + nativeBuildInputs = [ - setuptools-scm + hatch-vcs + hatchling ]; propagatedBuildInputs = [ @@ -44,6 +50,6 @@ buildPythonPackage rec { description = "Python interface to last.fm (and compatibles)"; homepage = "https://github.com/pylast/pylast"; license = licenses.asl20; - maintainers = with maintainers; [ rvolosatovs ]; + maintainers = with maintainers; [ fab rvolosatovs ]; }; } diff --git a/pkgs/development/python-modules/pyswitchbee/default.nix b/pkgs/development/python-modules/pyswitchbee/default.nix new file mode 100644 index 000000000000..68788b5796a7 --- /dev/null +++ b/pkgs/development/python-modules/pyswitchbee/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, aiohttp +, fetchFromGitHub +, setuptools +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyswitchbee"; + version = "1.6.0"; + format = "pyproject"; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "jafar-atili"; + repo = "pySwitchbee"; + rev = "refs/tags/${version}"; + hash = "sha256-ZAe47Oxw5n6OM/PRKz7OR8yzi/c9jnXeOYNjCbs0j1E="; + }; + + postPatch = '' + # https://github.com/jafar-atili/pySwitchbee/pull/2 + substituteInPlace pyproject.toml \ + --replace '"asyncio",' "" + ''; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + aiohttp + ]; + + # Module doesn't have tests + doCheck = false; + + pythonImportsCheck = [ + "switchbee" + ]; + + meta = with lib; { + description = "Library to control SwitchBee smart home device"; + homepage = "https://github.com/jafar-atili/pySwitchbee/"; + # https://github.com/jafar-atili/pySwitchbee/issues/1 + license = with licenses; [ unfree ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/development/python-modules/ultraheat-api/default.nix b/pkgs/development/python-modules/ultraheat-api/default.nix index 2bec7261719f..25e5ab025289 100644 --- a/pkgs/development/python-modules/ultraheat-api/default.nix +++ b/pkgs/development/python-modules/ultraheat-api/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "ultraheat-api"; - version = "0.5.0"; + version = "0.5.1"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -15,7 +15,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "ultraheat_api"; inherit version; - hash = "sha256-fXTv4rWMkAOBYwKeb0MCC9mwEfeYT/YFYW0OpwXN4OQ="; + hash = "sha256-7yZATv0cgjRnvD9u34iZtsdsfEkdbAoVWJ19+HHlrzI="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/tools/ruff/default.nix b/pkgs/development/tools/ruff/default.nix index f7be92c2c612..c01efd38a4de 100644 --- a/pkgs/development/tools/ruff/default.nix +++ b/pkgs/development/tools/ruff/default.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage rec { pname = "ruff"; - version = "0.0.88"; + version = "0.0.89"; src = fetchFromGitHub { owner = "charliermarsh"; repo = pname; rev = "v${version}"; - sha256 = "sha256-0G+a0sSWApTacX+cVEFDOvL9CUsT+q0rlnkvn0FrnTg="; + sha256 = "sha256-S+lnIzwdh3xv5Hoprl1gElD91zSa63TnAavIeT8XmKQ="; }; - cargoSha256 = "sha256-dNiWxw+enwV1tlct75MSF/MmAPr1+HUNEO2Fxhqmgig="; + cargoSha256 = "sha256-v7hR7t0mVwiF/CAd221ZQSncM7c05bltUB7w3+5xxjM="; buildInputs = lib.optionals stdenv.isDarwin [ CoreServices diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index 6fe00648b6d9..19d9c09d7936 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2944,7 +2944,8 @@ "switch_as_x" = ps: with ps; [ ]; "switchbee" = ps: with ps; [ - ]; # missing inputs: pyswitchbee + pyswitchbee + ]; "switchbot" = ps: with ps; [ pyswitchbot aiohttp-cors @@ -4174,6 +4175,7 @@ "surepetcare" "switch" "switch_as_x" + "switchbee" "switchbot" "switcher_kis" "syncthing" diff --git a/pkgs/tools/admin/kics/default.nix b/pkgs/tools/admin/kics/default.nix index 4dc91567c988..ef3239355f09 100644 --- a/pkgs/tools/admin/kics/default.nix +++ b/pkgs/tools/admin/kics/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "kics"; - version = "1.6.2"; + version = "1.6.3"; src = fetchFromGitHub { owner = "Checkmarx"; repo = "kics"; rev = "v${version}"; - sha256 = "sha256-7sblU0UKPminofTKY9Ugc1SFZ/VjdRvzpaaIRkQwSi4="; + sha256 = "sha256-42lqHhaUqL6PNtxIy2Q43BK+73r9b4WZjEHvKzlfr7Q="; }; - vendorSha256 = "sha256-ao+mFDiHAtD4DQsVHTwd+n9LBxCAXcrEqJNqz3wI1vM="; + vendorSha256 = "sha256-0t6JtDWKWAjXifZdi+z4104mVzhzqxx8wdbgEPN7FhI="; subPackages = [ "cmd/console" ]; diff --git a/pkgs/tools/backup/percona-xtrabackup/2_4.nix b/pkgs/tools/backup/percona-xtrabackup/2_4.nix index 5c9ce70e5b95..0d2f951c5f89 100644 --- a/pkgs/tools/backup/percona-xtrabackup/2_4.nix +++ b/pkgs/tools/backup/percona-xtrabackup/2_4.nix @@ -1,6 +1,6 @@ { callPackage, ... } @ args: callPackage ./generic.nix (args // { - version = "2.4.20"; - sha256 = "0awdpkcgvx2aq7pwxy8jyzkin6cyrrh3d576x9ldm851kis9n5ii"; + version = "2.4.26"; + sha256 = "sha256-/erBv/Asi/MfoSvAcQ647VAgOfiViPunFWmvy/W9J18="; }) diff --git a/pkgs/tools/backup/percona-xtrabackup/8_0.nix b/pkgs/tools/backup/percona-xtrabackup/8_0.nix index 648074eb5b96..d5e1389d618e 100644 --- a/pkgs/tools/backup/percona-xtrabackup/8_0.nix +++ b/pkgs/tools/backup/percona-xtrabackup/8_0.nix @@ -1,8 +1,11 @@ { callPackage, ... } @ args: callPackage ./generic.nix (args // { - version = "8.0.13"; - sha256 = "0cj0fnjimv22ykfl0yk6w29wcjvqp8y8j2g1c6gcml65qazrswyr"; + version = "8.0.29-22"; + sha256 = "sha256-dGpfU+IesAyr2s1AEjfYggOEkMGQ9JdEesu5PtJHNXA="; + + # includes https://github.com/Percona-Lab/libkmip.git + fetchSubmodules = true; extraPatches = [ ./abi-check.patch diff --git a/pkgs/tools/backup/percona-xtrabackup/abi-check.patch b/pkgs/tools/backup/percona-xtrabackup/abi-check.patch index de45d9c3ea21..53442ef5bc00 100644 --- a/pkgs/tools/backup/percona-xtrabackup/abi-check.patch +++ b/pkgs/tools/backup/percona-xtrabackup/abi-check.patch @@ -7,11 +7,11 @@ https://github.com/NixOS/nixpkgs/issues/44530 --- a/cmake/do_abi_check.cmake +++ b/cmake/do_abi_check.cmake @@ -68,1 +68,1 @@ FOREACH(file ${ABI_HEADERS}) -- -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include -+ -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include/nostdinc -I${SOURCE_DIR}/include +- -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${ABI_SOURCE_DIR}/include ++ -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${ABI_SOURCE_DIR}/include/nostdinc -I${ABI_SOURCE_DIR}/include @@ -74,1 +74,1 @@ FOREACH(file ${ABI_HEADERS}) -- COMMAND sed -e "/^# /d" -+ COMMAND sed -e "/^# /d" -e "/^#include <-nostdinc>$/d" +- COMMAND ${WSL_EXECUTABLE} sed -e "/^# /d" ++ COMMAND ${WSL_EXECUTABLE} sed -e "/^# /d" -e "/^#include <-nostdinc>$/d" --- /dev/null +++ b/include/nostdinc/stdint.h @@ -0,0 +1,1 @@ diff --git a/pkgs/tools/backup/percona-xtrabackup/generic.nix b/pkgs/tools/backup/percona-xtrabackup/generic.nix index 2ea2088645e4..3bcf09ca43f9 100644 --- a/pkgs/tools/backup/percona-xtrabackup/generic.nix +++ b/pkgs/tools/backup/percona-xtrabackup/generic.nix @@ -2,7 +2,7 @@ , curl, cyrus_sasl, libaio, libedit, libev, libevent, libgcrypt, libgpg-error, lz4 , ncurses, numactl, openssl, protobuf, valgrind, xxd, zlib , perlPackages -, version, sha256, extraPatches ? [], extraPostInstall ? "", ... +, version, sha256, fetchSubmodules ? false, extraPatches ? [], extraPostInstall ? "", ... }: stdenv.mkDerivation rec { @@ -13,23 +13,18 @@ stdenv.mkDerivation rec { owner = "percona"; repo = "percona-xtrabackup"; rev = "${pname}-${version}"; - inherit sha256; + inherit sha256 fetchSubmodules; }; nativeBuildInputs = [ bison boost cmake makeWrapper pkg-config ]; buildInputs = [ - (curl.override { inherit openssl; }) cyrus_sasl libaio libedit libev libevent libgcrypt libgpg-error lz4 + (curl.override { inherit openssl; }) cyrus_sasl libaio libedit libevent libev libgcrypt libgpg-error lz4 ncurses numactl openssl protobuf valgrind xxd zlib ] ++ (with perlPackages; [ perl DBI DBDmysql ]); patches = extraPatches; - # Workaround build failure on -fno-common toolchains: - # ld: xbstream.c.o:(.bss+0x0): multiple definition of - # `datasink_buffer'; ds_buffer.c.o:(.data.rel.local+0x0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; - cmakeFlags = [ "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock" "-DBUILD_CONFIG=xtrabackup_release" diff --git a/pkgs/tools/networking/miniupnpc/default.nix b/pkgs/tools/networking/miniupnpc/default.nix index 65adb3c5eb89..019e99c82337 100644 --- a/pkgs/tools/networking/miniupnpc/default.nix +++ b/pkgs/tools/networking/miniupnpc/default.nix @@ -6,8 +6,7 @@ let pname = "miniupnpc"; inherit version; src = fetchurl { - name = "${pname}-${version}.tar.gz"; - url = "http://miniupnp.free.fr/files/download.php?file=${pname}-${version}.tar.gz"; + url = "https://miniupnp.tuxfamily.org/files/${pname}-${version}.tar.gz"; inherit sha256; }; @@ -24,7 +23,7 @@ let ''; meta = with lib; { - homepage = "http://miniupnp.free.fr/"; + homepage = "https://miniupnp.tuxfamily.org/"; description = "A client that implements the UPnP Internet Gateway Device (IGD) specification"; platforms = with platforms; linux ++ freebsd ++ darwin; license = licenses.bsd3; @@ -32,8 +31,8 @@ let }; in { miniupnpc_2 = generic { - version = "2.1.20190625"; - sha256 = "1yqp0d8x5ldjfma5x2vhpg1aaafdg0470ismccixww3rzpbza8w7"; + version = "2.2.4"; + sha256 = "0jrc84lkc7xb53rb8dbswxrxj21ndj1iiclmk3r9wkp6xm55w6j8"; }; miniupnpc_1 = generic { version = "1.9.20160209"; diff --git a/pkgs/tools/networking/miniupnpd/default.nix b/pkgs/tools/networking/miniupnpd/default.nix index da950cdd2b8e..b3a10fee2c4e 100644 --- a/pkgs/tools/networking/miniupnpd/default.nix +++ b/pkgs/tools/networking/miniupnpd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, iptables, libuuid, pkg-config +{ stdenv, lib, fetchurl, iptables, libuuid, openssl, pkg-config , which, iproute2, gnused, coreutils, gawk, makeWrapper , nixosTests }: @@ -8,20 +8,20 @@ let in stdenv.mkDerivation rec { pname = "miniupnpd"; - version = "2.1.20190502"; + version = "2.3.1"; src = fetchurl { - url = "http://miniupnp.free.fr/files/download.php?file=miniupnpd-${version}.tar.gz"; - sha256 = "1m8d0g9b0bjwsnqccw1yapp6n0jghmgzwixwjflwmvi2fi6hdp4b"; - name = "miniupnpd-${version}.tar.gz"; + url = "https://miniupnp.tuxfamily.org/files/miniupnpd-${version}.tar.gz"; + sha256 = "0crv975qqppnj27jba96yysq2911y49vjd74sp9vnjb54z0d9pyi"; }; - buildInputs = [ iptables libuuid ]; + buildInputs = [ iptables libuuid openssl ]; nativeBuildInputs= [ pkg-config makeWrapper ]; - makefile = "Makefile.linux"; - buildFlags = [ "miniupnpd" "genuuid" ]; + # ./configure is not a standard configure file, errors with: + # Option not recognized : --prefix= + dontAddPrefix = true; installFlags = [ "PREFIX=$(out)" "INSTALLPREFIX=$(out)" ]; @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { }; meta = with lib; { - homepage = "http://miniupnp.free.fr/"; + homepage = "https://miniupnp.tuxfamily.org/"; description = "A daemon that implements the UPnP Internet Gateway Device (IGD) specification"; platforms = platforms.linux; license = licenses.bsd3; diff --git a/pkgs/tools/security/gallia/default.nix b/pkgs/tools/security/gallia/default.nix index 14657c6ecc7d..785f6aae9fff 100644 --- a/pkgs/tools/security/gallia/default.nix +++ b/pkgs/tools/security/gallia/default.nix @@ -41,6 +41,7 @@ python3.pkgs.buildPythonApplication rec { postPatch = '' substituteInPlace pyproject.toml \ + --replace 'aiofiles = "^0.8.0"' 'aiofiles = ">=0.8.0"' \ --replace 'zstandard = "^0.17.0"' 'zstandard = "*"' ''; diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-1.x.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-1.x.nix new file mode 100644 index 000000000000..6f5dddf7b5df --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-1.x.nix @@ -0,0 +1,37 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgf"; + version = "1.18"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgf"; + rev = "refs/tags/version-${lib.replaceChars ["."] ["-"] finalAttrs.version}"; + hash = "sha256-WZ/191iEDd5VK1bnV9JZx2BZfACUeAUhAqrlyx+ZvA4="; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd context doc generic latex plain $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/pgf-tikz/pgf"; + description = "A Portable Graphic Format for TeX - version ${finalAttrs.version}"; + branch = lib.versions.major version; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-2.x.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-2.x.nix new file mode 100644 index 000000000000..e823d0a4c4d9 --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-2.x.nix @@ -0,0 +1,37 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgf"; + version = "2.10"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgf"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-AA+XFhEkJifODJb6SppnxhR4lMlMNaH+k10UF6QisJ8="; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd context doc generic latex plain $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/pgf-tikz/pgf"; + description = "A Portable Graphic Format for TeX - version ${version}"; + branch = lib.versions.major version; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix new file mode 100644 index 000000000000..c40e54a41332 --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix @@ -0,0 +1,37 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgf"; + version = "3.1.9a"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgf"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-7FBaDEaCpiiLMcHWGv5AnUNc5AFqtm5o/R9bJePIomk="; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd doc source tex/{context,generic,latex,plain} $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/pgf-tikz/pgf"; + description = "A Portable Graphic Format for TeX - version ${finalAttrs.version}"; + branch = lib.versions.major version; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-pie.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-pie.nix new file mode 100644 index 000000000000..4c8bf800e462 --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-pie.nix @@ -0,0 +1,33 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgf-pie"; + version = "0.7"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgf-pie"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-tAUv35AMgJW5JI2KIXxxXFihqdB7qbMmNpAYhpDbAxs="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd doc tex/latex $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/pgf-tikz/pgf-pie"; + description = "Some LaTeX macros for pie charts using the PGF/TikZ package"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlcd.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlcd.nix new file mode 100644 index 000000000000..293fa6b52e37 --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlcd.nix @@ -0,0 +1,33 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgf-umlcd"; + version = "0.3"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgf-umlcd"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-92bfBcQfnalYoVxlVRjbRXhWt+CbS8PtiMmFIqbgo7A="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd doc tex/latex $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/pgf-tikz/pgf-umlcd"; + description = "Some LaTeX macros for UML Class Diagrams"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlsd.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlsd.nix new file mode 100644 index 000000000000..fe08d6823396 --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-umlsd.nix @@ -0,0 +1,33 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgf-umlcd"; + version = "unstable-2020-05-28"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgf-umlsd"; + rev = "8766cc18596dbfa66202ceca01c62cab1c3ed6a2"; + hash = "sha256-gSBO7uDPMer9XyHfs0rr+2lricN5Nb4cOlShCsk0cPc="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd doc tex/latex $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/pgf-tikz/pgf-umlsd"; + description = "Some LaTeX macros for UML Sequence Diagrams"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix new file mode 100644 index 000000000000..1e4c5c2d2fa5 --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix @@ -0,0 +1,33 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgfplots"; + version = "1.18.1"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgfplots"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-cTfOMasBptm0lydKeNHPnjdEyFjEb88awYPn8S2m73c="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd doc tex/{context,generic,latex,plain} $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "http://pgfplots.sourceforge.net"; + description = "TeX package to draw plots directly in TeX in two and three dimensions"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgf/1.x.nix b/pkgs/tools/typesetting/tex/pgf/1.x.nix deleted file mode 100644 index 618f936d8bf8..000000000000 --- a/pkgs/tools/typesetting/tex/pgf/1.x.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, stdenv, fetchurl }: - -stdenv.mkDerivation rec { - pname = "pgf"; - version = "1.18"; - - src = fetchurl { - url = "mirror://sourceforge/pgf/pgf-${version}.tar.gz"; - sha256 = "0s6b8rx9yfxcjjg18vx1mphnwbd28fl5lnq0dasjz40pp3ypwdjv"; - }; - - dontBuild = true; - - installPhase = " - mkdir -p $out/share/texmf-nix - cp -prd * $out/share/texmf-nix - "; - - meta = with lib; { - branch = "1"; - platforms = platforms.unix; - license = licenses.gpl2; - }; -} diff --git a/pkgs/tools/typesetting/tex/pgf/2.x.nix b/pkgs/tools/typesetting/tex/pgf/2.x.nix deleted file mode 100644 index b8a3f2f63660..000000000000 --- a/pkgs/tools/typesetting/tex/pgf/2.x.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, stdenv, fetchurl }: - -stdenv.mkDerivation rec { - pname = "pgf"; - version = "2.00"; - - src = fetchurl { - url = "mirror://sourceforge/pgf/pgf-${version}.tar.gz"; - sha256 = "0j57niag4jb2k0iyrvjsannxljc3vkx0iag7zd35ilhiy4dh6264"; - }; - - dontBuild = true; - - installPhase = " - mkdir -p $out/share/texmf-nix - cp -prd * $out/share/texmf-nix - "; - - meta = with lib; { - branch = "2"; - platforms = platforms.unix; - license = licenses.gpl2; - }; -} diff --git a/pkgs/tools/typesetting/tex/pgf/3.x.nix b/pkgs/tools/typesetting/tex/pgf/3.x.nix deleted file mode 100644 index 9af41ff1f43f..000000000000 --- a/pkgs/tools/typesetting/tex/pgf/3.x.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, stdenv, fetchurl, unzip }: - -stdenv.mkDerivation rec { - pname = "pgf"; - version = "3.0.0"; - - src = fetchurl { - url = "mirror://sourceforge/project/pgf/pgf/version%20${version}/pgf_${version}.tds.zip"; - sha256 = "0kj769hyp4z2zmdv3f8xv443wcfqn5nkkbzxzqgfxjizlz81aav7"; - }; - - nativeBuildInputs = [ unzip ]; - - # Multiple files problem - unpackPhase = '' - mkdir pgf - cd pgf - unzip $src - ''; - - dontBuild = true; - - installPhase = " - mkdir -p $out/share/texmf-nix - cp -prd * $out/share/texmf-nix - "; - - meta = with lib; { - branch = "3"; - platforms = platforms.unix; - license = licenses.gpl2; - }; -} diff --git a/pkgs/tools/typesetting/tex/pgfplots/default.nix b/pkgs/tools/typesetting/tex/pgfplots/default.nix deleted file mode 100644 index 0a2667f284e9..000000000000 --- a/pkgs/tools/typesetting/tex/pgfplots/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{lib, stdenv, fetchurl, unzip}: - -stdenv.mkDerivation rec { - pname = "pgfplots"; - version = "1.5.1"; - - src = fetchurl { - url = "mirror://sourceforge/pgfplots/pgfplots_${version}.tds.zip"; - sha256 = "1xajrmq35i0qlsfwydy5zzg6f1jg88hqqh5b3xsmglzrarnllbdi"; - }; - - nativeBuildInputs = [ unzip ]; - - unpackPhase = "unzip $src"; - - dontBuild = true; - - installPhase = " - mkdir -p $out/share/texmf-nix - cp -prd * $out/share/texmf-nix - "; - - meta = with lib; { - description = "TeX package to draw plots directly in TeX in two and three dimensions"; - homepage = "http://pgfplots.sourceforge.net"; - platforms = platforms.unix; - license = licenses.gpl3Plus; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 450fc91c2766..a660d435115c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1724,10 +1724,7 @@ with pkgs; ### APPLICATIONS/EMULATORS/RETROARCH - retroarchBare = callPackage ../applications/emulators/retroarch { - inherit (darwin) libobjc; - inherit (darwin.apple_sdk.frameworks) AppKit Foundation; - }; + retroarchBare = callPackage ../applications/emulators/retroarch { }; retroarchFull = retroarch.override { cores = builtins.filter @@ -1747,6 +1744,8 @@ with pkgs; retroarch = retroarchBare; }); + libretro-core-info = callPackage ../applications/emulators/retroarch/libretro-core-info.nix { }; + kodi-retroarch-advanced-launchers = callPackage ../applications/emulators/retroarch/kodi-advanced-launchers.nix { }; @@ -4043,15 +4042,21 @@ with pkgs; # Keep the old PGF since some documents don't render properly with # the new one. - pgf1 = callPackage ../tools/typesetting/tex/pgf/1.x.nix { }; + pgf1 = callPackage ../tools/typesetting/tex/pgf-tikz/pgf-1.x.nix { }; - pgf2 = callPackage ../tools/typesetting/tex/pgf/2.x.nix { }; + pgf2 = callPackage ../tools/typesetting/tex/pgf-tikz/pgf-2.x.nix { }; - pgf3 = callPackage ../tools/typesetting/tex/pgf/3.x.nix { }; + pgf3 = callPackage ../tools/typesetting/tex/pgf-tikz/pgf-3.x.nix { }; pgf = pgf2; - pgfplots = callPackage ../tools/typesetting/tex/pgfplots { }; + pgf-pie = callPackage ../tools/typesetting/tex/pgf-tikz/pgf-pie.nix { }; + + pgf-umlcd = callPackage ../tools/typesetting/tex/pgf-tikz/pgf-umlcd.nix { }; + + pgf-umlsd = callPackage ../tools/typesetting/tex/pgf-tikz/pgf-umlsd.nix { }; + + pgfplots = callPackage ../tools/typesetting/tex/pgf-tikz/pgfplots.nix { }; pplatex = callPackage ../tools/typesetting/tex/pplatex { }; @@ -10161,13 +10166,11 @@ with pkgs; percona-xtrabackup = percona-xtrabackup_8_0; percona-xtrabackup_2_4 = callPackage ../tools/backup/percona-xtrabackup/2_4.nix { - stdenv = gcc10StdenvCompat; boost = boost159; openssl = openssl_1_1; }; percona-xtrabackup_8_0 = callPackage ../tools/backup/percona-xtrabackup/8_0.nix { - stdenv = gcc10StdenvCompat; - boost = boost170; + boost = boost177; openssl = openssl_1_1; }; @@ -21238,6 +21241,8 @@ with pkgs; mueval = callPackage ../development/tools/haskell/mueval { }; + mujoco = callPackage ../applications/science/robotics/mujoco { }; + muparser = callPackage ../development/libraries/muparser { inherit (darwin.stubs) setfile; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7d7eea28ddbb..0aab15f39ed1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8616,6 +8616,8 @@ self: super: with self; { inherit (pkgs) bash subversion apr aprutil expat neon openssl; }; + pyswitchbee = callPackage ../development/python-modules/pyswitchbee { }; + pyswitchbot = callPackage ../development/python-modules/pyswitchbot { }; pysychonaut = callPackage ../development/python-modules/pysychonaut { };