nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #84332 from LnL7/darwin-backports

darwin 20.03 backports

authored by

Daiderd Jordan and committed by
GitHub
ef0537b9 84926c94

+249 -51
+49
pkgs/applications/misc/goldendict/0001-dont-check-for-updates.patch
··· 1 + diff --git i/config.cc w/config.cc 2 + index 04b63f5..7a453d9 100644 3 + --- i/config.cc 4 + +++ w/config.cc 5 + @@ -182,7 +182,7 @@ Preferences::Preferences(): 6 + pronounceOnLoadPopup( false ), 7 + useInternalPlayer( InternalPlayerBackend::anyAvailable() ), 8 + internalPlayerBackend( InternalPlayerBackend::defaultBackend() ), 9 + - checkForNewReleases( true ), 10 + + checkForNewReleases( false ), 11 + disallowContentFromOtherSites( false ), 12 + enableWebPlugins( false ), 13 + hideGoldenDictHeader( false ), 14 + @@ -867,8 +867,8 @@ Class load() THROW_SPEC( exError ) 15 + c.preferences.proxyServer.systemProxyPassword = proxy.namedItem( "systemProxyPassword" ).toElement().text(); 16 + } 17 + 18 + - if ( !preferences.namedItem( "checkForNewReleases" ).isNull() ) 19 + - c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" ); 20 + + //if ( !preferences.namedItem( "checkForNewReleases" ).isNull() ) 21 + + // c.preferences.checkForNewReleases = ( preferences.namedItem( "checkForNewReleases" ).toElement().text() == "1" ); 22 + 23 + if ( !preferences.namedItem( "disallowContentFromOtherSites" ).isNull() ) 24 + c.preferences.disallowContentFromOtherSites = ( preferences.namedItem( "disallowContentFromOtherSites" ).toElement().text() == "1" ); 25 + @@ -1819,9 +1819,9 @@ void save( Class const & c ) THROW_SPEC( exError ) 26 + proxy.appendChild( opt ); 27 + } 28 + 29 + - opt = dd.createElement( "checkForNewReleases" ); 30 + - opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) ); 31 + - preferences.appendChild( opt ); 32 + + //opt = dd.createElement( "checkForNewReleases" ); 33 + + //opt.appendChild( dd.createTextNode( c.preferences.checkForNewReleases ? "1" : "0" ) ); 34 + + //preferences.appendChild( opt ); 35 + 36 + opt = dd.createElement( "disallowContentFromOtherSites" ); 37 + opt.appendChild( dd.createTextNode( c.preferences.disallowContentFromOtherSites ? "1" : "0" ) ); 38 + diff --git i/preferences.cc w/preferences.cc 39 + index 72c3147..7e48f00 100644 40 + --- i/preferences.cc 41 + +++ w/preferences.cc 42 + @@ -314,6 +314,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ): 43 + this, SLOT( customProxyToggled( bool ) ) ); 44 + 45 + ui.checkForNewReleases->setChecked( p.checkForNewReleases ); 46 + + ui.checkForNewReleases->setEnabled( false ); 47 + ui.disallowContentFromOtherSites->setChecked( p.disallowContentFromOtherSites ); 48 + ui.enableWebPlugins->setChecked( p.enableWebPlugins ); 49 + ui.hideGoldenDictHeader->setChecked( p.hideGoldenDictHeader );
+62
pkgs/applications/misc/goldendict/0001-dont-use-maclibs.patch
··· 1 + diff --git i/goldendict.pro w/goldendict.pro 2 + index 328dc20..5202a07 100644 3 + --- i/goldendict.pro 4 + +++ w/goldendict.pro 5 + @@ -210,21 +210,18 @@ mac { 6 + -llzo2 7 + !CONFIG( no_ffmpeg_player ) { 8 + LIBS += -lao \ 9 + - -lavutil-gd \ 10 + - -lavformat-gd \ 11 + - -lavcodec-gd 12 + + -lavutil \ 13 + + -lavformat \ 14 + + -lavcodec 15 + } 16 + - INCLUDEPATH = $${PWD}/maclibs/include 17 + - LIBS += -L$${PWD}/maclibs/lib -framework AppKit -framework Carbon 18 + + LIBS += -framework AppKit -framework Carbon 19 + OBJECTIVE_SOURCES += lionsupport.mm \ 20 + machotkeywrapper.mm \ 21 + macmouseover.mm \ 22 + speechclient_mac.mm 23 + ICON = icons/macicon.icns 24 + QMAKE_INFO_PLIST = myInfo.plist 25 + - QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/Frameworks & \ 26 + - cp -nR $${PWD}/maclibs/lib/ GoldenDict.app/Contents/Frameworks/ & \ 27 + - mkdir -p GoldenDict.app/Contents/MacOS/locale & \ 28 + + QMAKE_POST_LINK = mkdir -p GoldenDict.app/Contents/MacOS/locale & \ 29 + cp -R locale/*.qm GoldenDict.app/Contents/MacOS/locale/ & \ 30 + mkdir -p GoldenDict.app/Contents/MacOS/help & \ 31 + cp -R $${PWD}/help/*.qch GoldenDict.app/Contents/MacOS/help/ 32 + @@ -232,15 +229,6 @@ mac { 33 + CONFIG += zim_support 34 + !CONFIG( no_chinese_conversion_support ) { 35 + CONFIG += chinese_conversion_support 36 + - CONFIG( x86 ) { 37 + - QMAKE_POST_LINK += & mkdir -p GoldenDict.app/Contents/MacOS/opencc & \ 38 + - cp -R $${PWD}/opencc/*.json GoldenDict.app/Contents/MacOS/opencc/ & \ 39 + - cp -R $${PWD}/opencc/*.ocd GoldenDict.app/Contents/MacOS/opencc/ 40 + - } else { 41 + - QMAKE_POST_LINK += & mkdir -p GoldenDict.app/Contents/MacOS/opencc & \ 42 + - cp -R $${PWD}/opencc/x64/*.json GoldenDict.app/Contents/MacOS/opencc/ & \ 43 + - cp -R $${PWD}/opencc/x64/*.ocd GoldenDict.app/Contents/MacOS/opencc/ 44 + - } 45 + } 46 + } 47 + DEFINES += PROGRAM_VERSION=\\\"$$VERSION\\\" 48 + diff --git i/tiff.cc w/tiff.cc 49 + index e3cb8bf..9ff880f 100644 50 + --- i/tiff.cc 51 + +++ w/tiff.cc 52 + @@ -6,8 +6,8 @@ 53 + #include "tiff.hh" 54 + 55 + #if defined (Q_OS_MAC) || defined (Q_OS_WIN) 56 + -#include "tiff/tiff.h" 57 + -#include "tiff/tiffio.h" 58 + +#include "tiff.h" 59 + +#include "tiffio.h" 60 + #else 61 + #include "tiff.h" 62 + #include "tiffio.h"
+53 -18
pkgs/applications/misc/goldendict/default.nix
··· 1 - { mkDerivation, lib, fetchFromGitHub, pkgconfig, libXtst, libvorbis, hunspell 2 - , libao, ffmpeg, libeb, lzo, xz, libtiff, opencc 3 - , qtbase, qtsvg, qtwebkit, qtx11extras, qttools, qmake }: 4 - mkDerivation { 1 + { stdenv, mkDerivation, fetchFromGitHub, pkgconfig 2 + , libXtst, libvorbis, hunspell, lzo, xz, bzip2, libiconv 3 + , qtbase, qtsvg, qtwebkit, qtx11extras, qttools, qmake 4 + , withCC ? true, opencc 5 + , withEpwing ? true, libeb 6 + , withExtraTiff ? true, libtiff 7 + , withFFmpeg ? true, libao, ffmpeg 8 + , withMultimedia ? true 9 + , withZim ? true }: 5 10 6 - name = "goldendict-2019-08-01"; 11 + mkDerivation rec { 12 + pname = "goldendict"; 13 + version = "2020-01-09"; 14 + 7 15 src = fetchFromGitHub { 8 16 owner = "goldendict"; 9 - repo = "goldendict"; 10 - rev = "0f951b06a55f3a201891cf645a556e773bda5f52"; 11 - sha256 = "1d1hn95vhvsmbq9q96l5adn90g0hg25dl01knb4y4v6v9x4yrl2x"; 17 + repo = pname; 18 + rev = "da197ff5cd0e7326124c9240a1853a0e8b1de439"; 19 + sha256 = "0dlzwjh9wg4bzhhib71jycpp21qw762ww63a37dd50z1ymi61lxc"; 12 20 }; 21 + 22 + patches = [ 23 + ./0001-dont-check-for-updates.patch 24 + ] ++ stdenv.lib.optionals stdenv.isDarwin [ 25 + ./0001-dont-use-maclibs.patch 26 + ]; 27 + 28 + postPatch = '' 29 + substituteInPlace goldendict.pro \ 30 + --replace "hunspell-1.6.1" "hunspell-${stdenv.lib.versions.majorMinor hunspell.version}" 31 + ''; 13 32 14 33 nativeBuildInputs = [ pkgconfig qmake ]; 15 34 buildInputs = [ 16 - qtbase qtsvg qtwebkit qtx11extras qttools 17 - libXtst libvorbis hunspell libao ffmpeg libeb lzo xz libtiff opencc 18 - ]; 35 + qtbase qtsvg qtwebkit qttools 36 + libvorbis hunspell xz lzo 37 + ] ++ stdenv.lib.optionals stdenv.isLinux [ qtx11extras libXtst ] 38 + ++ stdenv.lib.optionals stdenv.isDarwin [ bzip2 libiconv ] 39 + ++ stdenv.lib.optional withCC opencc 40 + ++ stdenv.lib.optional withEpwing libeb 41 + ++ stdenv.lib.optional withExtraTiff libtiff 42 + ++ stdenv.lib.optionals withFFmpeg [ libao ffmpeg ]; 19 43 20 - qmakeFlags = [ 44 + qmakeFlags = with stdenv.lib; [ 21 45 "goldendict.pro" 22 - "CONFIG+=zim_support" 23 - "CONFIG+=chinese_conversion_support" 46 + (optional withCC "CONFIG+=chinese_conversion_support") 47 + (optional (!withCC) "CONFIG+=no_chinese_conversion_support") 48 + (optional (!withEpwing) "CONFIG+=no_epwing_support") 49 + (optional (!withExtraTiff) "CONFIG+=no_extra_tiff_handler") 50 + (optional (!withFFmpeg) "CONFIG+=no_ffmpeg_player") 51 + (optional (!withMultimedia)"CONFIG+=no_qtmultimedia_player") 52 + (optional withZim "CONFIG+=zim_support") 24 53 ]; 25 54 26 - meta = with lib; { 27 - homepage = http://goldendict.org/; 55 + postInstall = stdenv.lib.optionalString stdenv.isDarwin '' 56 + mkdir -p $out/Applications 57 + mv GoldenDict.app $out/Applications 58 + wrapQtApp $out/Applications/GoldenDict.app/Contents/MacOS/GoldenDict 59 + ''; 60 + 61 + meta = with stdenv.lib; { 62 + homepage = "http://goldendict.org/"; 28 63 description = "A feature-rich dictionary lookup program"; 29 - platforms = platforms.linux; 30 - maintainers = with maintainers; [ gebner astsmtl ]; 64 + platforms = with platforms; linux ++ darwin; 65 + maintainers = with maintainers; [ gebner astsmtl sikmir ]; 31 66 license = licenses.gpl3Plus; 32 67 }; 33 68 }
+1 -1
pkgs/development/libraries/libunique/default.nix
··· 32 32 homepage = "https://wiki.gnome.org/Attic/LibUnique"; 33 33 description = "A library for writing single instance applications"; 34 34 license = stdenv.lib.licenses.lgpl21; 35 - platforms = stdenv.lib.platforms.linux; 35 + platforms = with stdenv.lib.platforms; linux ++ darwin; 36 36 }; 37 37 }
+7 -2
pkgs/development/tools/cloudflare-wrangler/default.nix
··· 1 - { stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl 1 + { stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, curl, darwin 2 2 }: 3 3 4 4 rustPlatform.buildRustPackage rec { ··· 16 16 17 17 nativeBuildInputs = [ pkg-config ]; 18 18 19 - buildInputs = [ openssl ]; 19 + buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ 20 + curl 21 + darwin.apple_sdk.frameworks.Security 22 + darwin.apple_sdk.frameworks.CoreServices 23 + darwin.apple_sdk.frameworks.CoreFoundation 24 + ]; 20 25 21 26 # tries to use "/homeless-shelter" and fails 22 27 doCheck = false;
+37 -14
pkgs/misc/emulators/higan/default.nix
··· 1 1 { stdenv, fetchurl 2 - , p7zip, pkgconfig 2 + , p7zip, pkgconfig, libicns 3 3 , libX11, libXv 4 4 , udev 5 5 , libGLU, libGL, SDL 6 + , Carbon, Cocoa, OpenGL, OpenAL 6 7 , libao, openal, libpulseaudio 7 8 , gtk2, gtksourceview 8 9 , runtimeShell }: ··· 22 21 }; 23 22 24 23 patches = [ ./0001-change-flags.diff ]; 25 - postPatch = "sed '1i#include <cmath>' -i higan/fc/ppu/ppu.cpp"; 24 + postPatch = '' 25 + sed '1i#include <cmath>' -i higan/fc/ppu/ppu.cpp 26 + 27 + for file in icarus/GNUmakefile higan/target-tomoko/GNUmakefile; do 28 + substituteInPlace "$file" \ 29 + --replace 'sips -s format icns data/$(name).png --out out/$(name).app/Contents/Resources/$(name).icns' \ 30 + 'png2icns out/$(name).app/Contents/Resources/$(name).icns data/$(name).png' 31 + done 32 + ''; 33 + 34 + nativeBuildInputs = [ p7zip pkgconfig ] 35 + ++ optional stdenv.isDarwin [ libicns ]; 26 36 27 37 buildInputs = 28 - [ p7zip pkgconfig libX11 libXv udev libGLU libGL 29 - SDL libao openal libpulseaudio gtk2 gtksourceview ]; 38 + [ SDL libao ] 39 + ++ optionals stdenv.isLinux [ openal libpulseaudio udev libX11 libXv libGLU libGL gtk2 gtksourceview ] 40 + ++ optionals stdenv.isDarwin [ Carbon Cocoa OpenGL OpenAL ] 41 + ; 30 42 31 43 unpackPhase = '' 32 44 7z x $src ··· 52 38 ''; 53 39 54 40 # Now the cheats file will be distributed separately 55 - installPhase = '' 56 - install -dm 755 $out/bin $out/share/applications $out/share/higan $out/share/pixmaps 57 - install -m 755 icarus/out/icarus $out/bin/ 58 - install -m 755 higan/out/higan $out/bin/ 59 - install -m 644 higan/data/higan.desktop $out/share/applications/ 60 - install -m 644 higan/data/higan.png $out/share/pixmaps/higan-icon.png 61 - install -m 644 higan/resource/logo/higan.png $out/share/pixmaps/higan-logo.png 41 + installPhase = (if !stdenv.isDarwin then '' 42 + mkdir -p "$out"/bin "$out"/share/applications "$out"/share/pixmaps 43 + install -m 755 icarus/out/icarus "$out"/bin/ 44 + install -m 755 higan/out/higan "$out"/bin/ 45 + install -m 644 higan/data/higan.desktop "$out"/share/applications/ 46 + install -m 644 higan/data/higan.png "$out"/share/pixmaps/higan-icon.png 47 + install -m 644 higan/resource/logo/higan.png "$out"/share/pixmaps/higan-logo.png 48 + '' else '' 49 + mkdir "$out" 50 + mv higan/out/higan.app "$out"/ 51 + mv icarus/out/icarus.app "$out"/ 52 + '') + '' 53 + mkdir -p "$out"/share/higan 62 54 cp --recursive --no-dereference --preserve='links' --no-preserve='ownership' \ 63 - higan/systems/* $out/share/higan/ 55 + higan/systems/* "$out"/share/higan/ 64 56 ''; 65 57 66 - fixupPhase = '' 58 + fixupPhase = let 59 + dest = if !stdenv.isDarwin then "\\$HOME/.local/share/higan" else "\\$HOME/Library/Application Support/higan"; 60 + in '' 67 61 # A dirty workaround, suggested by @cpages: 68 62 # we create a first-run script to populate 69 63 # the local $HOME with all the auxiliary 70 64 # stuff needed by higan at runtime 71 65 66 + mkdir -p "$out"/bin 72 67 cat <<EOF > $out/bin/higan-init.sh 73 68 #!${runtimeShell} 74 69 75 - cp --recursive --update $out/share/higan/*.sys \$HOME/.local/share/higan/ 70 + cp --recursive --update $out/share/higan/*.sys "${dest}"/ 76 71 77 72 EOF 78 73
+21 -7
pkgs/misc/emulators/mame/default.nix
··· 1 1 { stdenv, mkDerivation, fetchFromGitHub, makeDesktopItem, makeWrapper 2 2 , python, pkgconfig, SDL2, SDL2_ttf, alsaLib, which, qtbase, libXinerama 3 + , libpcap, CoreAudioKit, ForceFeedback 3 4 , installShellFiles }: 5 + 6 + with stdenv; 4 7 5 8 let 6 9 majorVersion = "0"; ··· 11 8 12 9 desktopItem = makeDesktopItem { 13 10 name = "MAME"; 14 - exec = "mame${stdenv.lib.optionalString stdenv.is64bit "64"}"; 11 + exec = "mame${lib.optionalString stdenv.is64bit "64"}"; 15 12 desktopName = "MAME"; 16 13 genericName = "MAME is a multi-purpose emulation framework"; 17 14 categories = "System;Emulator;"; ··· 30 27 }; 31 28 32 29 hardeningDisable = [ "fortify" ]; 33 - NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" ]; 30 + NIX_CFLAGS_COMPILE = [ "-Wno-error=maybe-uninitialized" "-Wno-error=missing-braces" ]; 34 31 35 - makeFlags = [ "TOOLS=1" ]; 32 + makeFlags = [ 33 + "TOOLS=1" 34 + "USE_LIBSDL=1" 35 + ] 36 + ++ lib.optionals stdenv.cc.isClang [ "CC=clang" "CXX=clang++" ] 37 + ; 36 38 37 39 dontWrapQtApps = true; 38 40 39 - buildInputs = [ SDL2 SDL2_ttf alsaLib qtbase libXinerama ]; 41 + buildInputs = 42 + [ SDL2 SDL2_ttf qtbase libXinerama ] 43 + ++ lib.optional stdenv.isLinux alsaLib 44 + ++ lib.optionals stdenv.isDarwin [ libpcap CoreAudioKit ForceFeedback ] 45 + ; 40 46 nativeBuildInputs = [ python pkgconfig which makeWrapper installShellFiles ]; 41 47 42 48 # by default MAME assumes that paths with stock resources ··· 70 58 installManPage ${dest}/docs/man/*.1 ${dest}/docs/man/*.6 71 59 72 60 mv artwork plugins samples ${dest} 73 - 61 + '' + lib.optionalString stdenv.isLinux '' 74 62 mkdir -p $out/share 75 63 ln -s ${desktopItem}/share/applications $out/share 76 64 ''; 77 65 78 - meta = with stdenv.lib; { 66 + meta = with lib; { 79 67 description = "Is a multi-purpose emulation framework"; 80 68 homepage = https://www.mamedev.org/; 81 69 license = with licenses; [ bsd3 gpl2Plus ]; 82 - platforms = [ "x86_64-linux" "i686-linux" ]; 70 + platforms = platforms.unix; 71 + # makefile needs fixes for install target 72 + badPlatforms = [ "aarch64-linux" ]; 83 73 maintainers = with maintainers; [ gnidorah ]; 84 74 }; 85 75 }
+4 -4
pkgs/tools/graphics/lepton/default.nix
··· 1 1 { stdenv, fetchFromGitHub, cmake, git, glibc }: 2 2 3 - stdenv.mkDerivation { 3 + stdenv.mkDerivation rec { 4 4 version = "1.2.1"; 5 5 pname = "lepton"; 6 6 7 7 src = fetchFromGitHub { 8 8 repo = "lepton"; 9 9 owner = "dropbox"; 10 - rev = "c378cbfa2daaa99e8828be7395013f94cedb1bcc"; 10 + rev = version; 11 11 sha256 = "1f2vyp0crj4yw27bs53vykf2fqk4w57gv3lh9dp89dh3y7wwh1ba"; 12 12 }; 13 13 14 14 nativeBuildInputs = [ cmake git ]; 15 - buildInputs = [ glibc.static ]; 15 + buildInputs = stdenv.lib.optionals stdenv.isLinux [ glibc.static ]; 16 16 17 17 meta = with stdenv.lib; { 18 18 homepage = https://github.com/dropbox/lepton; 19 19 description = "A tool to losslessly compress JPEGs"; 20 20 license = licenses.asl20; 21 - platforms = [ "x86_64-linux" ]; 21 + platforms = [ "x86_64-linux" "x86_64-darwin" ]; 22 22 maintainers = with maintainers; [ artemist ]; 23 23 }; 24 24 }
+8 -3
pkgs/tools/misc/osm2pgsql/default.nix
··· 1 - { stdenv, fetchFromGitHub, cmake, expat, proj, bzip2, zlib, boost, postgresql, lua}: 1 + { stdenv, fetchFromGitHub, cmake, expat, proj, bzip2, zlib, boost, postgresql 2 + , withLuaJIT ? false, lua, luajit }: 2 3 3 4 stdenv.mkDerivation rec { 4 5 pname = "osm2pgsql"; ··· 14 13 15 14 nativeBuildInputs = [ cmake ]; 16 15 17 - buildInputs = [ expat proj bzip2 zlib boost postgresql lua ]; 16 + buildInputs = [ expat proj bzip2 zlib boost postgresql ] 17 + ++ stdenv.lib.optional withLuaJIT luajit 18 + ++ stdenv.lib.optional (!withLuaJIT) lua; 19 + 20 + cmakeFlags = stdenv.lib.optional withLuaJIT "-DWITH_LUAJIT:BOOL=ON"; 18 21 19 22 NIX_CFLAGS_COMPILE = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H"; 20 23 ··· 26 21 description = "OpenStreetMap data to PostgreSQL converter"; 27 22 homepage = "https://github.com/openstreetmap/osm2pgsql"; 28 23 license = licenses.gpl2; 29 - platforms = platforms.linux; 24 + platforms = with platforms; linux ++ darwin; 30 25 maintainers = with maintainers; [ jglukasik ]; 31 26 }; 32 27 }
+7 -2
pkgs/top-level/all-packages.nix
··· 19071 19071 19072 19072 gr-osmosdr = callPackage ../applications/radio/gnuradio/osmosdr.nix { }; 19073 19073 19074 - goldendict = libsForQt5.callPackage ../applications/misc/goldendict { }; 19074 + goldendict = libsForQt5.callPackage ../applications/misc/goldendict { 19075 + inherit (darwin) libiconv; 19076 + }; 19075 19077 19076 19078 gomuks = callPackage ../applications/networking/instant-messengers/gomuks { }; 19077 19079 ··· 24973 24971 icu = icu58; 24974 24972 }; 24975 24973 24976 - mame = libsForQt5.callPackage ../misc/emulators/mame { }; 24974 + mame = libsForQt5.callPackage ../misc/emulators/mame { 24975 + inherit (darwin.apple_sdk.frameworks) CoreAudioKit ForceFeedback; 24976 + }; 24977 24977 24978 24978 martyr = callPackage ../development/libraries/martyr { }; 24979 24979 ··· 25743 25739 25744 25740 higan = callPackage ../misc/emulators/higan { 25745 25741 inherit (gnome2) gtksourceview; 25742 + inherit (darwin.apple_sdk.frameworks) Carbon Cocoa OpenGL OpenAL; 25746 25743 }; 25747 25744 25748 25745 bullet = callPackage ../development/libraries/bullet {