diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a4d4b1461688..68ed8a02c3ef 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -5534,6 +5534,12 @@ githubId = 4158274; name = "Michiel Leenaars"; }; + legendofmiracles = { + email = "legendofmiracles@protonmail.com"; + github = "legendofmiracles"; + githubId = 30902201; + name = "legendofmiracles"; + }; lejonet = { email = "daniel@kuehn.se"; github = "lejonet"; diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 97fab6f11ea2..21c30305188b 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -446,7 +446,8 @@ in '') rootPools)); }; - boot.loader.grub = mkIf inInitrd { + # TODO FIXME See https://github.com/NixOS/nixpkgs/pull/99386#issuecomment-798813567. To not break people's bootloader and as probably not everybody would read release notes that thoroughly add inSystem. + boot.loader.grub = mkIf (inInitrd || inSystem) { zfsSupport = true; }; diff --git a/pkgs/applications/audio/apple-music-electron/default.nix b/pkgs/applications/audio/apple-music-electron/default.nix index e4d43d7f01f8..850f644afc34 100644 --- a/pkgs/applications/audio/apple-music-electron/default.nix +++ b/pkgs/applications/audio/apple-music-electron/default.nix @@ -18,7 +18,7 @@ in appimageTools.wrapType2 { install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications substituteInPlace $out/share/applications/${pname}.desktop \ - --replace "Exec=AppRun" "Exec=$out/bin/apple-music-electron" + --replace 'Exec=AppRun' 'Exec=${pname}' cp -r ${appimageContents}/usr/share/icons $out/share ''; diff --git a/pkgs/applications/audio/nuclear/default.nix b/pkgs/applications/audio/nuclear/default.nix index 6b2a5b67122d..e107f44cf6f1 100644 --- a/pkgs/applications/audio/nuclear/default.nix +++ b/pkgs/applications/audio/nuclear/default.nix @@ -18,7 +18,7 @@ in appimageTools.wrapType2 { install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications substituteInPlace $out/share/applications/${pname}.desktop \ - --replace 'Exec=AppRun' 'Exec=$out/bin/nuclear' + --replace 'Exec=AppRun' 'Exec=${pname}' cp -r ${appimageContents}/usr/share/icons $out/share ''; diff --git a/pkgs/applications/audio/plexamp/default.nix b/pkgs/applications/audio/plexamp/default.nix index cb682f91b6d3..47b74cc865b4 100644 --- a/pkgs/applications/audio/plexamp/default.nix +++ b/pkgs/applications/audio/plexamp/default.nix @@ -25,7 +25,7 @@ in appimageTools.wrapType2 { install -m 444 -D ${appimageContents}/plexamp.desktop $out/share/applications/plexamp.desktop install -m 444 -D ${appimageContents}/plexamp.png \ $out/share/icons/hicolor/512x512/apps/plexamp.png - substituteInPlace $out/share/applications/plexamp.desktop \ + substituteInPlace $out/share/applications/${pname}.desktop \ --replace 'Exec=AppRun' 'Exec=${pname}' ''; diff --git a/pkgs/applications/blockchains/crypto-org-wallet.nix b/pkgs/applications/blockchains/crypto-org-wallet.nix index be45967018d0..7b0a895f4a1a 100644 --- a/pkgs/applications/blockchains/crypto-org-wallet.nix +++ b/pkgs/applications/blockchains/crypto-org-wallet.nix @@ -20,7 +20,7 @@ in appimageTools.wrapType2 rec { ${imagemagick}/bin/convert ${appimageContents}/${pname}.png -resize 512x512 ${pname}_512.png install -m 444 -D ${pname}_512.png $out/share/icons/hicolor/512x512/apps/${pname}.png substituteInPlace $out/share/applications/${pname}.desktop \ - --replace 'Exec=AppRun --no-sandbox %U' "Exec=$out/bin/${pname}" + --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U' ''; meta = with lib; { diff --git a/pkgs/applications/blockchains/trezor-suite/default.nix b/pkgs/applications/blockchains/trezor-suite/default.nix index 098a948c8455..68b83aff88dc 100644 --- a/pkgs/applications/blockchains/trezor-suite/default.nix +++ b/pkgs/applications/blockchains/trezor-suite/default.nix @@ -35,7 +35,8 @@ appimageTools.wrapType2 rec { install -m 444 -D ${appimageContents}/${pname}.desktop $out/share/applications/${pname}.desktop install -m 444 -D ${appimageContents}/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png install -m 444 -D ${appimageContents}/resources/images/icons/512x512.png $out/share/icons/hicolor/512x512/apps/${pname}.png - substituteInPlace $out/share/applications/trezor-suite.desktop --replace 'Exec=AppRun' 'Exec=${pname}' + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' # symlink system binaries instead bundled ones mkdir -p $out/share/${pname}/resources/bin/{bridge,tor} diff --git a/pkgs/applications/graphics/foxotron/default.nix b/pkgs/applications/graphics/foxotron/default.nix new file mode 100644 index 000000000000..71adfe0d2dba --- /dev/null +++ b/pkgs/applications/graphics/foxotron/default.nix @@ -0,0 +1,74 @@ +{ stdenv +, lib +, fetchFromGitHub +, nix-update-script +, cmake +, pkg-config +, makeWrapper +, zlib +, libX11 +, libXrandr +, libXinerama +, libXcursor +, libXi +, libXext +, libGLU +, alsaLib +, fontconfig +, AVFoundation +, Carbon +, Cocoa +, CoreAudio +, Kernel +, OpenGL +}: + +stdenv.mkDerivation rec { + pname = "foxotron"; + version = "2021-03-12"; + + src = fetchFromGitHub { + owner = "Gargaj"; + repo = "Foxotron"; + rev = version; + fetchSubmodules = true; + sha256 = "1finvbs3pbfyvm525blwgwl5jci2zjxb1923i0cm8rmf7wasaapb"; + }; + + nativeBuildInputs = [ cmake pkg-config makeWrapper ]; + + buildInputs = [ zlib ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama libXcursor libXi libXext alsaLib fontconfig libGLU ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{bin,lib/foxotron} + cp -R ${lib.optionalString stdenv.hostPlatform.isDarwin "Foxotron.app/Contents/MacOS/"}Foxotron \ + ../{config.json,Shaders,Skyboxes} $out/lib/foxotron/ + wrapProgram $out/lib/foxotron/Foxotron \ + --run "cd $out/lib/foxotron" + ln -s $out/{lib/foxotron,bin}/Foxotron + + runHook postInstall + ''; + + passthru = { + updateScript = nix-update-script { + attrPath = pname; + }; + }; + + meta = with lib; { + description = "General purpose model viewer"; + longDescription = '' + ASSIMP based general purpose model viewer ("turntable") created for the + Revision 2021 3D Graphics Competition. + ''; + homepage = "https://github.com/Gargaj/Foxotron"; + license = licenses.publicDomain; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/graphics/runwayml/default.nix b/pkgs/applications/graphics/runwayml/default.nix deleted file mode 100644 index 9366276ebf84..000000000000 --- a/pkgs/applications/graphics/runwayml/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib -, fetchurl -, appimageTools -, symlinkJoin -}: - -let - pname = "runwayml"; - version = "0.14.3"; - name = "${pname}-${version}"; - - src = fetchurl { - url = "https://runway-releases.s3.amazonaws.com/Runway-${version}.AppImage"; - sha256 = "1bx8j39wd2z6f32hdvmk9z77bivnizzdhn296kin2nnqgq6v6y93"; - }; - - binary = appimageTools.wrapType2 { - name = pname; - inherit src; - }; - # we only use this to extract the icon and desktop file - appimage-contents = appimageTools.extractType2 { - inherit name src; - }; - -in - symlinkJoin { - inherit name; - paths = [ binary ]; - - postBuild = '' - mkdir -p $out/share/pixmaps/ $out/share/applications - cp ${appimage-contents}/usr/share/icons/hicolor/1024x1024/apps/runway.png $out/share/pixmaps/runway.png - sed 's:Exec=AppRun:Exec=runwayml:' ${appimage-contents}/runway.desktop > $out/share/applications/runway.desktop - ''; - - meta = with lib; { - description = "Machine learning for creators"; - homepage = "https://runwayml.com/"; - license = licenses.unfree; - maintainers = with maintainers; [ prusnak ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/applications/misc/shfm/default.nix b/pkgs/applications/misc/shfm/default.nix new file mode 100644 index 000000000000..602151075fc7 --- /dev/null +++ b/pkgs/applications/misc/shfm/default.nix @@ -0,0 +1,38 @@ +{ lib +, stdenv +, fetchFromGitHub +}: + +stdenv.mkDerivation rec { + pname = "shfm"; + version = "0.4.2"; + + src = fetchFromGitHub { + owner = "dylanaraps"; + repo = pname; + rev = version; + hash = "sha256-ilVrUFfyzOZgjbBTqlHA9hLaTHw1xHFo1Y/tjXygNEs="; + }; + + postPatch = '' + patchShebangs ./shfm + ''; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + install -D shfm --target-directory $out/bin/ + install -D README --target-directory $out/share/doc/${pname}/ + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/dylanaraps/shfm"; + description = "POSIX-shell based file manager"; + license = licenses.mit; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/applications/misc/tdrop/default.nix b/pkgs/applications/misc/tdrop/default.nix index e8c42ab48d70..66708aa8135d 100644 --- a/pkgs/applications/misc/tdrop/default.nix +++ b/pkgs/applications/misc/tdrop/default.nix @@ -2,15 +2,15 @@ , xwininfo, xdotool, xprop, gawk, coreutils , gnugrep, procps }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "tdrop"; - version = "unstable-2020-05-14"; + version = "0.4.0"; src = fetchFromGitHub { owner = "noctuid"; repo = "tdrop"; - rev = "a9f2862515e5c190ac61d394e7fe7e1039871b89"; - sha256 = "1zxhihgba33k8byjsracsyhby9qpdngbly6c8hpz3pbsyag5liwc"; + rev = version; + sha256 = "sha256-1umHwzpv4J8rZ0c0q+2dPsEk4vhFB4UerwI8ctIJUZg="; }; dontBuild = true; diff --git a/pkgs/applications/misc/zettlr/default.nix b/pkgs/applications/misc/zettlr/default.nix index eb8c81dae7e8..3d7f56291233 100644 --- a/pkgs/applications/misc/zettlr/default.nix +++ b/pkgs/applications/misc/zettlr/default.nix @@ -33,7 +33,8 @@ appimageTools.wrapType2 rec { mv $out/bin/{${name},${pname}} install -m 444 -D ${appimageContents}/Zettlr.desktop $out/share/applications/zettlr.desktop install -m 444 -D ${appimageContents}/Zettlr.png $out/share/icons/hicolor/512x512/apps/zettlr.png - substituteInPlace $out/share/applications/zettlr.desktop --replace 'Exec=AppRun' 'Exec=${pname}' + substituteInPlace $out/share/applications/zettlr.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' ''; meta = with lib; { diff --git a/pkgs/applications/networking/instant-messengers/mikutter/default.nix b/pkgs/applications/networking/instant-messengers/mikutter/default.nix index be84342787d2..111a3ed091e1 100644 --- a/pkgs/applications/networking/instant-messengers/mikutter/default.nix +++ b/pkgs/applications/networking/instant-messengers/mikutter/default.nix @@ -1,82 +1,160 @@ -{ lib, stdenv, fetchurl -, bundlerEnv, ruby -, alsaUtils, libnotify, which, wrapGAppsHook, gtk2, atk, gobject-introspection +{ lib +, stdenv +, fetchurl +, bundlerEnv +, alsaUtils +, atk +, copyDesktopItems +, gobject-introspection +, gtk2 +, ruby +, libicns +, libnotify +, makeDesktopItem +, which +, wrapGAppsHook +, writeText }: -# how to update: -# find latest version at: http://mikutter.hachune.net/download#download -# run these commands: -# -# wget http://mikutter.hachune.net/bin/mikutter.4.0.0.tar.gz -# mkdir mikutter -# cd mikutter -# tar xvf ../mikutter.4.0.0.tar.gz -# find . -not -name Gemfile -exec rm {} \; -# find . -type d -exec rmdir -p --ignore-fail-on-non-empty {} \; -# cd .. -# mv mikutter/* . -# rm mikutter.4.0.0.tar.gz -# rm gemset.nix Gemfile.lock; nix-shell -p bundler bundix --run 'bundle lock && bundix' - -stdenv.mkDerivation rec { - pname = "mikutter"; - version = "4.0.0"; - - src = fetchurl { - url = "https://mikutter.hachune.net/bin/mikutter.${version}.tar.gz"; - sha256 = "0nx14vlp7p69m2vw0s6kbiyymsfq0r2jd4nm0v5c4xb9avkpgc8g"; +let + # NOTE: $out may have different values depending on context + mikutterPaths = rec { + optPrefixDir = "$out/opt/mikutter"; + appPrefixDir = "$out/Applications/mikutter.app/Contents"; + appBinDir = "${appPrefixDir}/MacOS"; + appResourceDir = "${appPrefixDir}/Resources"; + iconPath = "${optPrefixDir}/core/skin/data/icon.png"; }; - buildInputs = [ alsaUtils libnotify which gtk2 ruby atk gobject-introspection ]; - nativeBuildInputs = [ wrapGAppsHook ]; + gems = bundlerEnv { + name = "mikutter-gems"; # leave the version out to enable package reuse + gemdir = ./deps; + groups = [ "default" "plugin" ]; + inherit ruby; - unpackPhase = '' - mkdir source - cd source - unpackFile $src + # Avoid the following error: + # > `': uninitialized constant Moneta::Builder (NameError) + # + # Related: + # https://github.com/NixOS/nixpkgs/pull/76510 + # https://github.com/NixOS/nixpkgs/pull/76765 + # https://github.com/NixOS/nixpkgs/issues/83442 + # https://github.com/NixOS/nixpkgs/issues/106545 + copyGemFiles = true; + }; + + mkDesktopItem = { description }: + makeDesktopItem { + name = "mikutter"; + desktopName = "mikutter"; + exec = "mikutter"; + icon = "mikutter"; + categories = "Network;"; + comment = description; + extraDesktopEntries.Keywords = "Mastodon;"; + }; + + mkInfoPlist = { version }: + writeText "Info.plist" (lib.generators.toPlist { } { + CFBundleName = "mikutter"; + CFBundleDisplayName = "mikutter"; + CFBundleExecutable = "mikutter"; + CFBundleIconFile = "mikutter"; + CFBundleIdentifier = "net.hachune.mikutter"; + CFBundleInfoDictionaryVersion = "6.0"; + CFBundlePackageType = "APPL"; + CFBundleVersion = version; + CFBundleShortVersionString = version; + }); + + inherit (gems) wrappedRuby; +in +with mikutterPaths; stdenv.mkDerivation rec { + pname = "mikutter"; + version = "4.1.4"; + + src = fetchurl { + url = "https://mikutter.hachune.net/bin/mikutter-${version}.tar.gz"; + sha256 = "05253nz4i1lmnq6czj48qdab2ny4vx2mznj6nsn2l1m2z6zqkwk3"; + }; + + nativeBuildInputs = [ copyDesktopItems wrapGAppsHook ] + ++ lib.optionals stdenv.isDarwin [ libicns ]; + buildInputs = [ + atk + gtk2 + gobject-introspection + libnotify + which # some plugins use it at runtime + wrappedRuby + ] ++ lib.optionals stdenv.isLinux [ alsaUtils ]; + + scriptPath = lib.makeBinPath ( + [ wrappedRuby libnotify which ] + ++ lib.optionals stdenv.isLinux [ alsaUtils ] + ); + + postUnpack = '' rm -rf vendor ''; - installPhase = let - env = bundlerEnv { - name = "mikutter-${version}-gems"; - gemdir = ./.; + installPhase = '' + runHook preInstall - inherit ruby; - }; - in '' - install -v -D -m644 README $out/share/doc/mikutter/README - install -v -D -m644 LICENSE $out/share/doc/mikutter/LICENSE - rm -v README LICENSE + mkdir -p $out/bin ${optPrefixDir} - cp -rv . $out - mkdir $out/bin/ - # hack wrapGAppsHook wants a file not a symlink - mv $out/mikutter.rb $out/bin/mikutter + install -Dm644 README $out/share/doc/mikutter/README + install -Dm644 LICENSE $out/share/doc/mikutter/LICENSE + rm -r README LICENSE deployment - gappsWrapperArgs+=( - --prefix PATH : "${ruby}/bin:${alsaUtils}/bin:${libnotify}/bin" - --prefix GEM_HOME : "${env}/${env.ruby.gemPath}" + cp -r . ${optPrefixDir} + + gappsWrapperArgsHook # FIXME: currently runs at preFixup + wrapGApp ${optPrefixDir}/mikutter.rb \ + --prefix PATH : "${scriptPath}" \ --set DISABLE_BUNDLER_SETUP 1 - ) - # --prefix GIO_EXTRA_MODULES : "$prefix/lib/gio/modules" + mv ${optPrefixDir}/mikutter.rb $out/bin/mikutter - mkdir -p $out/share/mikutter $out/share/applications - ln -sv $out/core/skin $out/share/mikutter/skin - substituteAll ${./mikutter.desktop} $out/share/applications/mikutter.desktop + install -Dm644 ${iconPath} $out/share/icons/hicolor/256x256/apps/mikutter.png + + runHook postInstall ''; - postFixup = '' - mv $out/bin/.mikutter-wrapped $out/mikutter.rb - substituteInPlace $out/bin/mikutter \ - --replace "$out/bin/.mikutter-wrapped" "$out/mikutter.rb" + postInstall = + let + infoPlist = mkInfoPlist { inherit version; }; + in + lib.optionalString stdenv.isDarwin '' + mkdir -p ${appBinDir} ${appResourceDir} + install -Dm644 ${infoPlist} ${appPrefixDir}/Info.plist + ln -s $out/bin/mikutter ${appBinDir}/mikutter + png2icns ${appResourceDir}/mikutter.icns ${iconPath} + ''; + + installCheckPhase = '' + runHook preInstallCheck + + testDir="$(mktemp -d)" + install -Dm644 ${./test_plugin.rb} "$testDir/plugin/test_plugin/test_plugin.rb" + + $out/bin/mikutter --confroot="$testDir" --plugin=test_plugin --debug + + runHook postInstallCheck ''; + desktopItems = [ + (mkDesktopItem { inherit (meta) description; }) + ]; + + doInstallCheck = true; + dontWrapGApps = true; # the target is placed outside of bin/ + + passthru.updateScript = [ ./update.sh version (toString ./.) ]; + meta = with lib; { - description = "An extensible Twitter client"; + description = "An extensible Mastodon client"; homepage = "https://mikutter.hachune.net"; platforms = ruby.meta.platforms; license = licenses.mit; - broken = true; }; } diff --git a/pkgs/applications/networking/instant-messengers/mikutter/Gemfile b/pkgs/applications/networking/instant-messengers/mikutter/deps/Gemfile similarity index 84% rename from pkgs/applications/networking/instant-messengers/mikutter/Gemfile rename to pkgs/applications/networking/instant-messengers/mikutter/deps/Gemfile index 216af305b4ad..fbe6a2f29c5d 100644 --- a/pkgs/applications/networking/instant-messengers/mikutter/Gemfile +++ b/pkgs/applications/networking/instant-messengers/mikutter/deps/Gemfile @@ -11,12 +11,12 @@ ruby '>= 2.5.0' group :default do gem 'addressable','>= 2.7.0', '< 2.8' - gem 'delayer','>= 1.0.1', '< 1.1' - gem 'delayer-deferred','>= 2.1.1', '< 2.2' - gem 'diva','>= 1.0.1', '< 1.1' + gem 'delayer','>= 1.1.2', '< 2.0' + gem 'delayer-deferred','>= 2.2.0', '< 3.0' + gem 'diva','>= 1.0.2', '< 2.0' gem 'memoist','>= 0.16.2', '< 0.17' gem 'oauth','>= 0.5.4' - gem 'pluggaloid','>= 1.2.0', '< 1.3' + gem 'pluggaloid','>= 1.5.0', '< 2.0' gem 'typed-array','>= 0.1.2', '< 0.2' end diff --git a/pkgs/applications/networking/instant-messengers/mikutter/Gemfile.lock b/pkgs/applications/networking/instant-messengers/mikutter/deps/Gemfile.lock similarity index 59% rename from pkgs/applications/networking/instant-messengers/mikutter/Gemfile.lock rename to pkgs/applications/networking/instant-messengers/mikutter/deps/Gemfile.lock index 63f9a63849b1..92568056d52a 100644 --- a/pkgs/applications/networking/instant-messengers/mikutter/Gemfile.lock +++ b/pkgs/applications/networking/instant-messengers/mikutter/deps/Gemfile.lock @@ -5,22 +5,23 @@ GEM public_suffix (>= 2.0.2, < 5.0) atk (3.4.1) glib2 (= 3.4.1) - cairo (1.16.4) + cairo (1.17.5) native-package-installer (>= 1.0.3) pkg-config (>= 1.2.2) + red-colors cairo-gobject (3.4.1) cairo (>= 1.16.2) glib2 (= 3.4.1) - crack (0.4.3) - safe_yaml (~> 1.0.0) - delayer (1.0.1) - delayer-deferred (2.1.1) - delayer (>= 1.0, < 2.0) - diva (1.0.1) + crack (0.4.5) + rexml + delayer (1.2.0) + delayer-deferred (2.2.0) + delayer (>= 1.1.2, < 2.0) + diva (1.0.2) addressable (>= 2.5.2, < 2.8) gdk_pixbuf2 (3.4.1) gio2 (= 3.4.1) - gettext (3.2.9) + gettext (3.3.7) locale (>= 2.0.5) text (>= 1.3.0) gio2 (3.4.1) @@ -34,40 +35,38 @@ GEM atk (= 3.4.1) gdk_pixbuf2 (= 3.4.1) pango (= 3.4.1) - hashdiff (1.0.0) + hashdiff (1.0.1) httpclient (2.8.3) instance_storage (1.0.0) - io-console (0.5.3) - irb (1.2.1) - reline (>= 0.0.1) - locale (2.1.2) + locale (2.1.3) memoist (0.16.2) - mini_portile2 (2.4.0) - mocha (1.11.1) - moneta (1.2.1) - native-package-installer (1.0.9) - nokogiri (1.10.7) - mini_portile2 (~> 2.4.0) - oauth (0.5.4) + mini_portile2 (2.5.0) + mocha (1.12.0) + moneta (1.4.1) + native-package-installer (1.1.1) + nokogiri (1.11.3) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) + oauth (0.5.6) pango (3.4.1) cairo-gobject (= 3.4.1) gobject-introspection (= 3.4.1) - pkg-config (1.4.0) - pluggaloid (1.2.0) - delayer (>= 1.0.0, < 2.0) + pkg-config (1.4.6) + pluggaloid (1.5.0) + delayer (>= 1.1.0, < 2.0) instance_storage (>= 1.0.0, < 2.0.0) - power_assert (1.1.5) - public_suffix (4.0.1) - rake (13.0.1) - reline (0.1.2) - io-console (~> 0.5) - ruby-prof (1.1.0) - safe_yaml (1.0.5) - test-unit (3.3.4) + power_assert (2.0.0) + public_suffix (4.0.6) + racc (1.5.2) + rake (13.0.3) + red-colors (0.1.1) + rexml (3.2.5) + ruby-prof (1.4.3) + test-unit (3.4.0) power_assert text (1.3.1) typed-array (0.1.2) - webmock (3.7.6) + webmock (3.12.2) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -77,19 +76,18 @@ PLATFORMS DEPENDENCIES addressable (>= 2.7.0, < 2.8) - delayer (>= 1.0.1, < 1.1) - delayer-deferred (>= 2.1.1, < 2.2) - diva (>= 1.0.1, < 1.1) - gettext (>= 3.2.9, < 3.3) + delayer (>= 1.1.2, < 2.0) + delayer-deferred (>= 2.2.0, < 3.0) + diva (>= 1.0.2, < 2.0) + gettext (>= 3.3.5, < 3.4) gtk2 (= 3.4.1) httpclient - irb (>= 1.2.0, < 1.3) memoist (>= 0.16.2, < 0.17) mocha (>= 1.11.1) moneta nokogiri oauth (>= 0.5.4) - pluggaloid (>= 1.2.0, < 1.3) + pluggaloid (>= 1.5.0, < 2.0) rake (>= 13.0.1) ruby-prof (>= 1.1.0) test-unit (>= 3.3.4, < 4.0) @@ -97,7 +95,7 @@ DEPENDENCIES webmock (>= 3.7.6) RUBY VERSION - ruby 2.7.0p0 + ruby 2.6.6p146 BUNDLED WITH - 2.1.2 + 2.1.4 diff --git a/pkgs/applications/networking/instant-messengers/mikutter/gemset.nix b/pkgs/applications/networking/instant-messengers/mikutter/deps/gemset.nix similarity index 74% rename from pkgs/applications/networking/instant-messengers/mikutter/gemset.nix rename to pkgs/applications/networking/instant-messengers/mikutter/deps/gemset.nix index 2bc4db978dda..b45a36c6fec0 100644 --- a/pkgs/applications/networking/instant-messengers/mikutter/gemset.nix +++ b/pkgs/applications/networking/instant-messengers/mikutter/deps/gemset.nix @@ -22,15 +22,15 @@ version = "3.4.1"; }; cairo = { - dependencies = ["native-package-installer" "pkg-config"]; + dependencies = ["native-package-installer" "pkg-config" "red-colors"]; groups = ["default" "plugin"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0yvv2lcbsybzbw1nrmfivmln23da4rndrs3av6ymjh0x3ww5h7p8"; + sha256 = "0vbj9szp2xbnxqan8hppip8vm9fxpcmpx745y5fvg2scdh9f0p7s"; type = "gem"; }; - version = "1.16.4"; + version = "1.17.5"; }; cairo-gobject = { dependencies = ["cairo" "glib2"]; @@ -44,25 +44,25 @@ version = "3.4.1"; }; crack = { - dependencies = ["safe_yaml"]; + dependencies = ["rexml"]; groups = ["default" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"; + sha256 = "1cr1kfpw3vkhysvkk3wg7c54m75kd68mbm9rs5azdjdq57xid13r"; type = "gem"; }; - version = "0.4.3"; + version = "0.4.5"; }; delayer = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "09p4rkh3dpdm1mhq721m4d6zvxqqp44kg7069s8l7kmaf7nv2nb3"; + sha256 = "0iqf4i18i8rk3x7qgvkhbiqskf0xzdf733fjimrq6xkag2mq60bl"; type = "gem"; }; - version = "1.0.1"; + version = "1.2.0"; }; delayer-deferred = { dependencies = ["delayer"]; @@ -70,10 +70,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1mbdxn1hskjqf3zlj4waxl71ccvbj6lk81c99769paxw4fajwrgx"; + sha256 = "0i2das3ncssacpqdgaf4as77vrxm7jfiizaja884fqv4rzv6s2sv"; type = "gem"; }; - version = "2.1.1"; + version = "2.2.0"; }; diva = { dependencies = ["addressable"]; @@ -81,10 +81,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "182gws1zihhpl7r3m8jsf29maqg9xdhj46s9lidbldar8clpl23h"; + sha256 = "05wl4wg57vvng4nrp4lzjq148v908xzq092kq93phwvyxs7jnw2g"; type = "gem"; }; - version = "1.0.1"; + version = "1.0.2"; }; gdk_pixbuf2 = { dependencies = ["gio2"]; @@ -103,10 +103,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0764vj7gacn0aypm2bf6m46dzjzwzrjlmbyx6qwwwzbmi94r40wr"; + sha256 = "1fqlwq7i8ck1fjyhn19q3skvgrbz44q7gq51mlr0qym5rkj5f6rn"; type = "gem"; }; - version = "3.2.9"; + version = "3.3.7"; }; gio2 = { dependencies = ["gobject-introspection"]; @@ -157,10 +157,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "18jqpbvidrlnq3xf0hkdbs00607jgz35lry6gjw4bcxgh52am2mk"; + sha256 = "1nynpl0xbj0nphqx1qlmyggq58ms1phf5i03hk64wcc0a17x1m1c"; type = "gem"; }; - version = "1.0.0"; + version = "1.0.1"; }; httpclient = { groups = ["plugin"]; @@ -182,36 +182,15 @@ }; version = "1.0.0"; }; - io-console = { - groups = ["default" "plugin"]; - platforms = []; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0srn91ly4cc5qvyj3r87sc7v8dnm52qj1hczzxmysib6ffparngd"; - type = "gem"; - }; - version = "0.5.3"; - }; - irb = { - dependencies = ["reline"]; - groups = ["default" "plugin"]; - platforms = []; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1r1y8i46qd5izdszzzn5jxvwvq00m89rk0hm8cs8f21p7nlwmh5w"; - type = "gem"; - }; - version = "1.2.1"; - }; locale = { groups = ["default" "plugin"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1sls9bq4krx0fmnzmlbn64dw23c4d6pz46ynjzrn9k8zyassdd0x"; + sha256 = "0997465kxvpxm92fiwc2b16l49mngk7b68g5k35ify0m3q0yxpdn"; type = "gem"; }; - version = "2.1.2"; + version = "2.1.3"; }; memoist = { groups = ["default"]; @@ -228,61 +207,61 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"; + sha256 = "1hdbpmamx8js53yk3h8cqy12kgv6ca06k0c9n3pxh6b6cjfs19x7"; type = "gem"; }; - version = "2.4.0"; + version = "2.5.0"; }; mocha = { groups = ["test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "06i2q5qjr9mvjgjc8w41pdf3qalw340y33wjvzc0rp4a1cbbb7pp"; + sha256 = "05yw6rwgjppq116jgqfg4pv4bql3ci4r2fmmg0m2c3sqib1bq41a"; type = "gem"; }; - version = "1.11.1"; + version = "1.12.0"; }; moneta = { groups = ["plugin"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0q7fskfdc0h5dhl8aamg3ypybd6cyl4x0prh4803gj7hxr17jfm1"; + sha256 = "0z25b4yysvnf2hi9jxnsiv3fvnicnzr2m70ci231av5093jfknc6"; type = "gem"; }; - version = "1.2.1"; + version = "1.4.1"; }; native-package-installer = { groups = ["default" "plugin"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0piclgf6pw7hr10x57x0hn675djyna4sb3xc97yb9vh66wkx1fl0"; + sha256 = "1ww1mq41q7rda975byjmq5dk8k13v8dawvm33370pbkrymd8syp8"; type = "gem"; }; - version = "1.0.9"; + version = "1.1.1"; }; nokogiri = { - dependencies = ["mini_portile2"]; + dependencies = ["mini_portile2" "racc"]; groups = ["plugin"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0r0qpgf80h764k176yr63gqbs2z0xbsp8vlvs2a79d5r9vs83kln"; + sha256 = "19d78mdg2lbz9jb4ph6nk783c9jbsdm8rnllwhga6pd53xffp6x0"; type = "gem"; }; - version = "1.10.7"; + version = "1.11.3"; }; oauth = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1zszdg8q1b135z7l7crjj234k4j0m347hywp5kj6zsq7q78pw09y"; + sha256 = "1zwd6v39yqfdrpg1p3d9jvzs9ljg55ana2p06m0l7qn5w0lgx1a0"; type = "gem"; }; - version = "0.5.4"; + version = "0.5.6"; }; pango = { dependencies = ["cairo-gobject" "gobject-introspection"]; @@ -300,10 +279,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1cxdpr2wlz9b587avlq04a1da5fz1vdw8jvr6lx23mcq7mqh2xcx"; + sha256 = "1mjjy1grxr64znkffxsvprcckbrrnm40b6gbllnbm7jxslbr3gjl"; type = "gem"; }; - version = "1.4.0"; + version = "1.4.6"; }; pluggaloid = { dependencies = ["delayer" "instance_storage"]; @@ -311,71 +290,80 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1gv0rjjdic8c41gfr3kyyphvf0fmv5rzcf6qd57zjdfcn6fvi3hh"; + sha256 = "0m3f940lf1bg01jin22by7hg9hs43y995isgcyqb6vbvlv51zj11"; type = "gem"; }; - version = "1.2.0"; + version = "1.5.0"; }; power_assert = { groups = ["default" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1dii0wkfa0jm8sk9b20zl1z4980dmrjh0zqnii058485pp3ws10s"; + sha256 = "172qfmzwxdf82bmwgcb13hnz9i3p6i2s2nijxnx6r63kn3drjppr"; type = "gem"; }; - version = "1.1.5"; + version = "2.0.0"; }; public_suffix = { groups = ["default" "test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0xnfv2j2bqgdpg2yq9i2rxby0w2sc9h5iyjkpaas2xknwrgmhdb0"; + sha256 = "1xqcgkl7bwws1qrlnmxgh8g4g9m10vg60bhlw40fplninb3ng6d9"; type = "gem"; }; - version = "4.0.1"; + version = "4.0.6"; + }; + racc = { + groups = ["default" "plugin"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "178k7r0xn689spviqzhvazzvxfq6fyjldxb3ywjbgipbfi4s8j1g"; + type = "gem"; + }; + version = "1.5.2"; }; rake = { groups = ["test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0w6qza25bq1s825faaglkx1k6d59aiyjjk3yw3ip5sb463mhhai9"; + sha256 = "1iik52mf9ky4cgs38fp2m8r6skdkq1yz23vh18lk95fhbcxb6a67"; type = "gem"; }; - version = "13.0.1"; + version = "13.0.3"; }; - reline = { - dependencies = ["io-console"]; + red-colors = { groups = ["default" "plugin"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0908ijrngc3wkn5iny7d0kxkp74w6ixk2nwzzngplplfla1vkp8x"; + sha256 = "0ar2k7zvhr1215jx5di29hkg5h1798f1gypmq6v0sy9v35w6ijca"; type = "gem"; }; - version = "0.1.2"; + version = "0.1.1"; + }; + rexml = { + groups = ["default" "test"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53"; + type = "gem"; + }; + version = "3.2.5"; }; ruby-prof = { groups = ["test"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "18ga5f4h1fnwn0xh910kpnw4cg3lq3jqljd3h16bdw9pgc5ff7dn"; + sha256 = "1r3xalp91l07m0cwllcxjzg6nkviiqnxkcbgg5qnzsdji6rgy65m"; type = "gem"; }; - version = "1.1.0"; - }; - safe_yaml = { - groups = ["default" "test"]; - platforms = []; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0j7qv63p0vqcd838i2iy2f76c3dgwzkiz1d1xkg7n0pbnxj2vb56"; - type = "gem"; - }; - version = "1.0.5"; + version = "1.4.3"; }; test-unit = { dependencies = ["power_assert"]; @@ -383,10 +371,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0mrkpb6wz0cs1740kaca240k4ymmkbvb2v5xaxsy6vynqw8n0g6z"; + sha256 = "1h0c323zfn4hdida4g58h8wnlh4kax438gyxlw20dd78kcp01i8m"; type = "gem"; }; - version = "3.3.4"; + version = "3.4.0"; }; text = { groups = ["default" "plugin"]; @@ -414,9 +402,9 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "19xvs7gdf8r75bmyb17w9g367qxzqnlrmbdda1y36cn1vrlnf2l8"; + sha256 = "038igpmkpmn0nw0k7s4db8x88af1nwcy7wzh9m9c9q4p74h7rii0"; type = "gem"; }; - version = "3.7.6"; + version = "3.12.2"; }; } diff --git a/pkgs/applications/networking/instant-messengers/mikutter/plugin/gtk/Gemfile b/pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/gtk/Gemfile similarity index 100% rename from pkgs/applications/networking/instant-messengers/mikutter/plugin/gtk/Gemfile rename to pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/gtk/Gemfile diff --git a/pkgs/applications/networking/instant-messengers/mikutter/plugin/image_file_cache/Gemfile b/pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/image_file_cache/Gemfile similarity index 100% rename from pkgs/applications/networking/instant-messengers/mikutter/plugin/image_file_cache/Gemfile rename to pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/image_file_cache/Gemfile diff --git a/pkgs/applications/networking/instant-messengers/mikutter/plugin/photo_support/Gemfile b/pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/photo_support/Gemfile similarity index 100% rename from pkgs/applications/networking/instant-messengers/mikutter/plugin/photo_support/Gemfile rename to pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/photo_support/Gemfile diff --git a/pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/uitranslator/Gemfile b/pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/uitranslator/Gemfile new file mode 100644 index 000000000000..08b4831dfc66 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/mikutter/deps/plugin/uitranslator/Gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +group :default do + gem 'gettext', '>= 3.3.5', '< 3.4' +end diff --git a/pkgs/applications/networking/instant-messengers/mikutter/mikutter.desktop b/pkgs/applications/networking/instant-messengers/mikutter/mikutter.desktop deleted file mode 100644 index 092f5f35cbf8..000000000000 --- a/pkgs/applications/networking/instant-messengers/mikutter/mikutter.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=mikutter -Comment=Twitter Client -Type=Application -Exec=@out@/bin/mikutter -Icon=@out@/core/skin/data/icon.png -Terminal=false -Categories=Network; -Keywords=Twitter; diff --git a/pkgs/applications/networking/instant-messengers/mikutter/plugin/uitranslator/Gemfile b/pkgs/applications/networking/instant-messengers/mikutter/plugin/uitranslator/Gemfile deleted file mode 100644 index 14ebffd4e0ad..000000000000 --- a/pkgs/applications/networking/instant-messengers/mikutter/plugin/uitranslator/Gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://rubygems.org' - -group :default do - gem 'gettext', '>= 3.2.9', '< 3.3' - gem 'irb', '>= 1.2.0', '< 1.3' -end diff --git a/pkgs/applications/networking/instant-messengers/mikutter/test_plugin.rb b/pkgs/applications/networking/instant-messengers/mikutter/test_plugin.rb new file mode 100644 index 000000000000..b19c15cd304f --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/mikutter/test_plugin.rb @@ -0,0 +1,10 @@ +# Tests mikutter's event system. + +Plugin.create(:test_plugin) do + require 'logger' + Delayer.new do + log = Logger.new(STDOUT) + log.info("loaded test_plugin") + exit + end +end diff --git a/pkgs/applications/networking/instant-messengers/mikutter/update.sh b/pkgs/applications/networking/instant-messengers/mikutter/update.sh new file mode 100755 index 000000000000..142fd8ca9424 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/mikutter/update.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p bundler bundix curl jq common-updater-scripts +# shellcheck shell=bash + +set -euo pipefail + +main() { + local currentVer="$1" + local scriptDir="$2" + local latestVer + local srcDir + + if [[ -z "$UPDATE_NIX_ATTR_PATH" ]]; then + echo "[ERROR] Please run the following instead:" >&2 + echo >&2 + echo " % nix-shell maintainers/scripts/update.nix --argstr path mikutter" >&2 + exit 1 + fi + + latestVer="$(queryLatestVersion)" + if [[ "$currentVer" == "$latestVer" ]]; then + echo "[INFO] mikutter is already up to date" >&2 + exit + fi + + update-source-version "$UPDATE_NIX_ATTR_PATH" "$latestVer" + + cd "$scriptDir" + + rm -rf deps + mkdir deps + cd deps + + srcDir="$(nix-build ../../../../../.. --no-out-link -A mikutter.src)" + tar xvf "$srcDir" --strip-components=1 + find . -not -name Gemfile -exec rm {} \; + find . -type d -exec rmdir -p --ignore-fail-on-non-empty {} \; || true + + bundle lock + bundix +} + +queryLatestVersion() { + curl -sS 'https://mikutter.hachune.net/download.json?count=1' \ + | jq -r '.[].version_string' \ + | head -n1 +} + +main "$@" + +# vim:set ft=bash: diff --git a/pkgs/applications/networking/mailreaders/mailspring/default.nix b/pkgs/applications/networking/mailreaders/mailspring/default.nix index 9389b7576c3e..a27f3c87e03f 100644 --- a/pkgs/applications/networking/mailreaders/mailspring/default.nix +++ b/pkgs/applications/networking/mailreaders/mailspring/default.nix @@ -18,11 +18,11 @@ stdenv.mkDerivation rec { pname = "mailspring"; - version = "1.9.0"; + version = "1.9.1"; src = fetchurl { url = "https://github.com/Foundry376/Mailspring/releases/download/${version}/mailspring-${version}-amd64.deb"; - sha256 = "ISwNFR8M377+J7WoG9MlblF8r5yRTgCxEGszZCjqW/k="; + sha256 = "mfpwDYRpFULD9Th8tI5yqb5RYWZJHarbWYpfKS3Q6mE="; }; nativeBuildInputs = [ diff --git a/pkgs/applications/networking/pcloud/default.nix b/pkgs/applications/networking/pcloud/default.nix index 312734dba147..64721cd75a67 100644 --- a/pkgs/applications/networking/pcloud/default.nix +++ b/pkgs/applications/networking/pcloud/default.nix @@ -84,8 +84,8 @@ in stdenv.mkDerivation { substitute \ app/pcloud.desktop \ share/applications/pcloud.desktop \ - --replace "Name=pcloud" "Name=pCloud" \ - --replace "Exec=AppRun" "Exec=$out/bin/pcloud" + --replace 'Name=pcloud' 'Name=pCloud' \ + --replace 'Exec=AppRun' 'Exec=${pname}' # Build the main executable cat > bin/pcloud < str: def get_radare2_rev() -> str: - feed_url = "http://github.com/radareorg/radare2/releases.atom" + feed_url = "https://github.com/radareorg/radare2/releases.atom" with urllib.request.urlopen(feed_url) as resp: tree = ET.fromstring(resp.read()) releases = tree.findall(".//{http://www.w3.org/2005/Atom}entry") diff --git a/pkgs/development/tools/conftest/default.nix b/pkgs/development/tools/conftest/default.nix index 7f2e65fd9918..4c6cbbbe6b04 100644 --- a/pkgs/development/tools/conftest/default.nix +++ b/pkgs/development/tools/conftest/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "conftest"; - version = "0.23.0"; + version = "0.24.0"; src = fetchFromGitHub { owner = "open-policy-agent"; repo = "conftest"; rev = "v${version}"; - sha256 = "sha256-mSiZjpsFZfkM522f1WcJgBexiBS0o3uf1g94pjhgGVU="; + sha256 = "sha256-iFxRZq/8TW7Df+aAc5IN+FAXU4kvbDiHWiFOlWMmCY0="; }; - vendorSha256 = "sha256-iCIuEvwkbfBZ858yZZyVf5om6YLsGKRvzFmYzJBrRf4="; + vendorSha256 = "sha256-LvaSs1y1CEP+cJc0vqTh/8MezmtuFAbfMgqloAjLZl8="; doCheck = false; diff --git a/pkgs/development/web/remarkjs/node-packages.nix b/pkgs/development/web/remarkjs/node-packages.nix index beac26c5f007..5f5d3576b761 100644 --- a/pkgs/development/web/remarkjs/node-packages.nix +++ b/pkgs/development/web/remarkjs/node-packages.nix @@ -3712,7 +3712,7 @@ in buildInputs = globalBuildInputs; meta = { description = "Portable Unix shell commands for Node.js"; - homepage = "http://github.com/shelljs/shelljs"; + homepage = "https://github.com/shelljs/shelljs"; license = "BSD-3-Clause"; }; production = true; diff --git a/pkgs/games/ja2-stracciatella/Cargo.lock b/pkgs/games/ja2-stracciatella/Cargo.lock deleted file mode 100644 index d017e93e4dba..000000000000 --- a/pkgs/games/ja2-stracciatella/Cargo.lock +++ /dev/null @@ -1,291 +0,0 @@ -[[package]] -name = "aho-corasick" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "bitflags" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "dtoa" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "getopts" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "itoa" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "libc" -version = "0.2.42" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "memchr" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "proc-macro2" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "quote" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex" -version = "0.1.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "regex-syntax" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "remove_dir_all" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde" -version = "1.0.70" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde_derive" -version = "1.0.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_json" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "shell32-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "stracciatella" -version = "0.1.0" -dependencies = [ - "getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", - "shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "syn" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread-id" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "thread_local" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "unicode-width" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "user32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "utf8-ranges" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" -"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" -"checksum dtoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6d301140eb411af13d3115f9a562c85cc6b541ade9dfa314132244aaee7489dd" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum getopts 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "0a7292d30132fb5424b354f5dc02512a86e4c516fe544bb7a25e7f266951b797" -"checksum itoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5adb58558dcd1d786b5f0bd15f3226ee23486e24b7b58304b60f64dc68e62606" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum libc 0.2.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b685088df2b950fccadf07a7187c8ef846a959c142338a48f9dc0b94517eb5f1" -"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" -"checksum proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "effdb53b25cdad54f8f48843d67398f7ef2e14f12c1b4cb4effc549a6462a4d6" -"checksum quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e44651a0dc4cdd99f71c83b561e221f714912d11af1a4dff0631f923d53af035" -"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5" -"checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" -"checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" -"checksum remove_dir_all 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" -"checksum serde 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)" = "0c3adf19c07af6d186d91dae8927b83b0553d07ca56cbf7f2f32560455c91920" -"checksum serde_derive 1.0.70 (registry+https://github.com/rust-lang/crates.io-index)" = "3525a779832b08693031b8ecfb0de81cd71cfd3812088fafe9a7496789572124" -"checksum serde_json 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "84b8035cabe9b35878adec8ac5fe03d5f6bc97ff6edd7ccb96b44c1276ba390e" -"checksum shell32-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" -"checksum syn 0.14.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2beff8ebc3658f07512a413866875adddd20f4fd47b2a4e6c9da65cd281baaea" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03" -"checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" -"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" -"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/pkgs/games/ja2-stracciatella/default.nix b/pkgs/games/ja2-stracciatella/default.nix index 4dfcc53d3397..4f186c3c60a1 100644 --- a/pkgs/games/ja2-stracciatella/default.nix +++ b/pkgs/games/ja2-stracciatella/default.nix @@ -1,45 +1,57 @@ -{ stdenv, fetchFromGitHub, cmake, SDL2, boost, fltk, rustPlatform }: +{ stdenv, lib, fetchurl, fetchFromGitHub, cmake, python, rustPlatform, SDL2, fltk, rapidjson, gtest, Carbon, Cocoa }: let - version = "0.16.1"; + version = "0.17.0"; src = fetchFromGitHub { owner = "ja2-stracciatella"; repo = "ja2-stracciatella"; rev = "v${version}"; - sha256 = "1pyn23syg70kiyfbs3pdlq0ixd2bxhncbamnic43rym3dmd52m29"; - }; - lockfile = ./Cargo.lock; - libstracciatellaSrc = stdenv.mkDerivation { - name = "libstracciatella-${version}-src"; - src = "${src}/rust"; - installPhase = '' - mkdir -p $out - cp -R ./* $out/ - cp ${lockfile} $out/Cargo.lock - ''; + sha256 = "0m6rvgkba29jy3yq5hs1sn26mwrjl6mamqnv4plrid5fqaivhn6j"; }; libstracciatella = rustPlatform.buildRustPackage { pname = "libstracciatella"; inherit version; - src = libstracciatellaSrc; - cargoSha256 = "15djs4xaz4y1hpfyfqxdgdasxr0b5idy9i5a7c8cmh0jkxjv8bqc"; - doCheck = false; + src = "${src}/rust"; + cargoSha256 = "0blb971cv9k6c460mwq3zq8vih687bdnb39b9gph1hr90pxjviba"; + + preBuild = '' + mkdir -p $out/include/stracciatella + export HEADER_LOCATION=$out/include/stracciatella/stracciatella.h + ''; + }; + stringTheoryUrl = "https://github.com/zrax/string_theory/archive/3.1.tar.gz"; + stringTheory = fetchurl { + url = stringTheoryUrl; + sha256 = "1flq26kkvx2m1yd38ldcq2k046yqw07jahms8a6614m924bmbv41"; }; in stdenv.mkDerivation { pname = "ja2-stracciatella"; - inherit src; - inherit version; + inherit src version; - nativeBuildInputs = [ cmake ]; - buildInputs = [ SDL2 fltk boost ]; + nativeBuildInputs = [ cmake python ]; + buildInputs = [ SDL2 fltk rapidjson gtest ] ++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ]; patches = [ ./remove-rust-buildstep.patch ]; preConfigure = '' - sed -i -e 's|rust-stracciatella|${libstracciatella}/lib/libstracciatella.so|g' CMakeLists.txt - cmakeFlagsArray+=("-DEXTRA_DATA_DIR=$out/share/ja2") + # Use rust library built with nix + substituteInPlace CMakeLists.txt \ + --replace lib/libstracciatella_c_api.a ${libstracciatella}/lib/libstracciatella_c_api.a \ + --replace include/stracciatella ${libstracciatella}/include/stracciatella \ + --replace bin/ja2-resource-pack ${libstracciatella}/bin/ja2-resource-pack + + # Patch dependencies that are usually loaded by url + substituteInPlace dependencies/lib-string_theory/builder/CMakeLists.txt.in \ + --replace ${stringTheoryUrl} file://${stringTheory} + + cmakeFlagsArray+=("-DLOCAL_RAPIDJSON_LIB=OFF" "-DLOCAL_GTEST_LIB=OFF" "-DEXTRA_DATA_DIR=$out/share/ja2") + ''; + + doInstallCheck = true; + installCheckPhase = '' + HOME=/tmp $out/bin/ja2 -unittests ''; meta = { diff --git a/pkgs/games/ja2-stracciatella/remove-rust-buildstep.patch b/pkgs/games/ja2-stracciatella/remove-rust-buildstep.patch index b86589fc6716..64e3c11b2502 100644 --- a/pkgs/games/ja2-stracciatella/remove-rust-buildstep.patch +++ b/pkgs/games/ja2-stracciatella/remove-rust-buildstep.patch @@ -1,21 +1,73 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index f354370e0..c9fa23c6d 100644 +index e4e5547af..a3017d197 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -159,7 +159,6 @@ add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/externalized") +@@ -175,13 +175,12 @@ if(BUILD_LAUNCHER) + endif() + message(STATUS "Fltk Libraries: ${FLTK_LIBRARIES}") + +-set(JA2_INCLUDES "") ++set(JA2_INCLUDES "include/stracciatella") + set(JA2_SOURCES "") + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/externalized") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/game") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/sgp") - add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/src/slog") --add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/rust") add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-smacker") - +-add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-stracciatella") + add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-string_theory") + if(BUILD_LAUNCHER) -@@ -235,8 +234,6 @@ copy_assets_dir_to_ja2_binary_after_build("externalized") - copy_assets_dir_to_ja2_binary_after_build("unittests") - copy_assets_dir_to_ja2_binary_after_build("mods") - --get_property(STRACCIATELLA_SHARED_LIB TARGET rust-stracciatella PROPERTY IMPORTED_LOCATION) +@@ -239,14 +238,12 @@ string(LENGTH "${CMAKE_SOURCE_DIR}/src/" SOURCE_PATH_SIZE) + add_definitions("-DSOURCE_PATH_SIZE=${SOURCE_PATH_SIZE}") + + add_executable(${JA2_BINARY} ${JA2_SOURCES}) +-target_link_libraries(${JA2_BINARY} ${SDL2_LIBRARY} ${GTEST_LIBRARIES} smacker ${STRACCIATELLA_LIBRARIES} string_theory-internal) +-add_dependencies(${JA2_BINARY} stracciatella) ++target_link_libraries(${JA2_BINARY} ${SDL2_LIBRARY} ${GTEST_LIBRARIES} smacker lib/libstracciatella_c_api.a dl pthread string_theory-internal) + set_property(SOURCE ${CMAKE_SOURCE_DIR}/src/game/GameVersion.cc APPEND PROPERTY COMPILE_DEFINITIONS "GAME_VERSION=v${ja2-stracciatella_VERSION}") + + if(BUILD_LAUNCHER) + add_executable(${LAUNCHER_BINARY} ${LAUNCHER_SOURCES}) +- target_link_libraries(${LAUNCHER_BINARY} ${FLTK_LIBRARIES} ${STRACCIATELLA_LIBRARIES} string_theory-internal) +- add_dependencies(${LAUNCHER_BINARY} stracciatella) ++ target_link_libraries(${LAUNCHER_BINARY} ${FLTK_LIBRARIES} lib/libstracciatella_c_api.a dl pthread string_theory-internal) + endif() + + macro(copy_assets_dir_to_ja2_binary_after_build DIR) +@@ -375,12 +372,12 @@ set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}_${CPACK_PACKAGE_VERSION}_${PACKAGE_ + + include(CPack) + +-if (UNIX AND NOT MINGW AND NOT APPLE) ++if (UNIX) + install(TARGETS ${JA2_BINARY} RUNTIME DESTINATION bin) + if(BUILD_LAUNCHER) + install(TARGETS ${LAUNCHER_BINARY} RUNTIME DESTINATION bin) + endif() +- install(PROGRAMS "${CMAKE_BINARY_DIR}/lib-stracciatella/bin/ja2-resource-pack${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin) ++ install(PROGRAMS "bin/ja2-resource-pack" DESTINATION bin) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/externalized assets/mods assets/unittests DESTINATION share/ja2) + if(WITH_EDITOR_SLF) + install(FILES "${EDITORSLF_FILE}" DESTINATION share/ja2) +@@ -400,7 +397,7 @@ else() + if(BUILD_LAUNCHER) + install(TARGETS ${LAUNCHER_BINARY} RUNTIME DESTINATION .) + endif() +- install(PROGRAMS "${CMAKE_BINARY_DIR}/lib-stracciatella/bin/ja2-resource-pack${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION .) ++ install(PROGRAMS "bin/ja2-resource-pack" DESTINATION .) + install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/assets/externalized assets/mods assets/unittests DESTINATION .) + if(WITH_EDITOR_SLF) + install(FILES "${EDITORSLF_FILE}" DESTINATION .) +@@ -428,12 +425,6 @@ if (MINGW) + install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/install-dlls-mingw.cmake") + endif() + +-if(APPLE) +- file(GLOB APPLE_DIST_FILES "${CMAKE_CURRENT_SOURCE_DIR}/assets/distr-files-mac/*.txt") +- install(FILES ${APPLE_DIST_FILES} DESTINATION .) +- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dependencies/lib-SDL2-2.0.8-macos/SDL2.framework DESTINATION .) +-endif() - - if (MSVC OR APPLE) - add_custom_command(TARGET ${JA2_BINARY} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy + ## Uninstall + + add_custom_templated_target("uninstall") diff --git a/pkgs/os-specific/darwin/chunkwm/default.nix b/pkgs/os-specific/darwin/chunkwm/default.nix index b326b98de539..c0229ba3ae23 100644 --- a/pkgs/os-specific/darwin/chunkwm/default.nix +++ b/pkgs/os-specific/darwin/chunkwm/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { pname = "chunkwm"; version = "0.4.9"; src = fetchzip { - url = "http://github.com/koekeishiya/chunkwm/archive/v${version}.tar.gz"; + url = "https://github.com/koekeishiya/chunkwm/archive/v${version}.tar.gz"; sha256 = "0w8q92q97fdvbwc3qb5w44jn4vi3m65ssdvjp5hh6b7llr17vspl"; }; diff --git a/pkgs/os-specific/linux/kernel/linux-xanmod.nix b/pkgs/os-specific/linux/kernel/linux-xanmod.nix index 1057d8cb4717..e3f0ebf76f5f 100644 --- a/pkgs/os-specific/linux/kernel/linux-xanmod.nix +++ b/pkgs/os-specific/linux/kernel/linux-xanmod.nix @@ -1,7 +1,7 @@ { lib, stdenv, buildLinux, fetchFromGitHub, ... } @ args: let - version = "5.11.14"; + version = "5.11.15"; suffix = "xanmod1-cacule"; in buildLinux (args // rec { @@ -12,7 +12,7 @@ in owner = "xanmod"; repo = "linux"; rev = modDirVersion; - sha256 = "sha256-kRbU1jheZi2U6mfNyhBFn3FJ7fjYkNUVwkx3w/DZNQI="; + sha256 = "sha256-Qhq01SgLeNbts86DLi/t70HJfJPmM1So1C4eqVyRLK0="; extraPostFetch = '' rm $out/.config ''; diff --git a/pkgs/servers/consul/default.nix b/pkgs/servers/consul/default.nix index cc00f4cf0cea..fd1b14e6158c 100644 --- a/pkgs/servers/consul/default.nix +++ b/pkgs/servers/consul/default.nix @@ -2,7 +2,7 @@ buildGoModule rec { pname = "consul"; - version = "1.9.4"; + version = "1.9.5"; rev = "v${version}"; # Note: Currently only release tags are supported, because they have the Consul UI @@ -17,7 +17,7 @@ buildGoModule rec { owner = "hashicorp"; repo = pname; inherit rev; - sha256 = "1ck55i8snpm583p21y1hac0w76wiwyjpgfxkzscd4whp2jnzhhif"; + sha256 = "sha256-CKezHuCbL1I79gDz7ZQiSgPbSXo0NtssQro2MqqmeXw="; }; passthru.tests.consul = nixosTests.consul; @@ -26,7 +26,7 @@ buildGoModule rec { # has a split module structure in one repo subPackages = ["." "connect/certgen"]; - vendorSha256 = "0y744zpj49zvn5vqqb9wmfs1fs0lir71h2kcmhidmn9j132vg1bq"; + vendorSha256 = "sha256-YqrW3PeFv1Y6lmjVmMMP0SZao57iPqfut3a1afIWkI0="; doCheck = false; diff --git a/pkgs/servers/http/envoy/default.nix b/pkgs/servers/http/envoy/default.nix index e6ecbb868603..57c0e22d8aff 100644 --- a/pkgs/servers/http/envoy/default.nix +++ b/pkgs/servers/http/envoy/default.nix @@ -38,7 +38,7 @@ buildBazelPackage rec { patches = [ # Quiche needs to be updated to compile under newer GCC. - # This is a manual backport of http://github.com/envoyproxy/envoy/pull/13949. + # This is a manual backport of https://github.com/envoyproxy/envoy/pull/13949. ./0001-quiche-update-QUICHE-tar-13949.patch # upb needs to be updated to compile under newer GCC. diff --git a/pkgs/tools/admin/exoscale-cli/default.nix b/pkgs/tools/admin/exoscale-cli/default.nix index cb487db6a5f5..c098fa278b3d 100644 --- a/pkgs/tools/admin/exoscale-cli/default.nix +++ b/pkgs/tools/admin/exoscale-cli/default.nix @@ -2,13 +2,13 @@ buildGoPackage rec { pname = "exoscale-cli"; - version = "1.27.1"; + version = "1.27.2"; src = fetchFromGitHub { owner = "exoscale"; repo = "cli"; rev = "v${version}"; - sha256 = "sha256-YaW7rTeVz2Mbnmp6ORsnALlyVxGnf8K73LXN/fmJMLk="; + sha256 = "sha256-Wq3CWKYuF4AaOVpe0sGn9BzLx/6rSPFN6rFc2jUUVEA="; }; goPackagePath = "github.com/exoscale/cli"; diff --git a/pkgs/tools/audio/yabridge/default.nix b/pkgs/tools/audio/yabridge/default.nix index d2a14aae3307..c09045bdb6e4 100644 --- a/pkgs/tools/audio/yabridge/default.nix +++ b/pkgs/tools/audio/yabridge/default.nix @@ -45,25 +45,25 @@ let # Derived from vst3.wrap vst3 = rec { - version = "e2fbb41f28a4b311f2fc7d28e9b4330eec1802b6"; + version = "3.7.2_build_28-patched"; src = fetchFromGitHub { owner = "robbert-vdh"; repo = "vst3sdk"; - rev = version; + rev = "v${version}"; fetchSubmodules = true; - sha256 = "sha256-4oLOa6kVB053Hrq7BBbZFdruAXuqnC944y5Kuib1F7s="; + sha256 = "sha256-39pvfcg4fvf7DAbAPzEHA1ja1LFL6r88nEwNYwaDC8w="; }; }; in stdenv.mkDerivation rec { pname = "yabridge"; - version = "3.0.2"; + version = "3.1.0"; # NOTE: Also update yabridgectl's cargoHash when this is updated src = fetchFromGitHub { owner = "robbert-vdh"; repo = pname; rev = version; - hash = "sha256-3uZCYGqo9acpANy5tQl3U0LK6wuOzjQpfjHDvaPSGlI="; + hash = "sha256-xvKjb+ql3WxnGHqcn3WnxunY5+s9f8Gt/n6EFSBrNdI="; }; # Unpack subproject sources diff --git a/pkgs/tools/audio/yabridgectl/default.nix b/pkgs/tools/audio/yabridgectl/default.nix index 5c7f3a628f56..4548b288b690 100644 --- a/pkgs/tools/audio/yabridgectl/default.nix +++ b/pkgs/tools/audio/yabridgectl/default.nix @@ -6,7 +6,7 @@ rustPlatform.buildRustPackage rec { src = yabridge.src; sourceRoot = "source/tools/yabridgectl"; - cargoHash = "sha256-mSp/IH7ZB7YSOBCFwNtHLYDz7CvWo2sO9VuPdqpl/u0="; + cargoHash = "sha256-TcjFaDo5IUs6Z3tgb+6jqyyrB2BLcif6Ycw++5FzuDY="; patches = [ # By default, yabridgectl locates libyabridge.so by using diff --git a/pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch b/pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch index e17cda6ada33..ec42f98a2e82 100644 --- a/pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch +++ b/pkgs/tools/audio/yabridgectl/libyabridge-from-nix-profiles.patch @@ -1,8 +1,8 @@ diff --git a/tools/yabridgectl/src/config.rs b/tools/yabridgectl/src/config.rs -index c1c89cf..d7bd822 100644 +index 6e05e34..656eef3 100644 --- a/tools/yabridgectl/src/config.rs +++ b/tools/yabridgectl/src/config.rs -@@ -23,6 +23,7 @@ use std::collections::{BTreeMap, BTreeSet}; +@@ -23,6 +23,7 @@ use std::collections::{BTreeMap, BTreeSet, HashSet}; use std::env; use std::fmt::Display; use std::fs; @@ -10,7 +10,7 @@ index c1c89cf..d7bd822 100644 use std::path::{Path, PathBuf}; use which::which; use xdg::BaseDirectories; -@@ -216,34 +217,24 @@ impl Config { +@@ -222,34 +223,24 @@ impl Config { } } None => { @@ -56,10 +56,10 @@ index c1c89cf..d7bd822 100644 )); } diff --git a/tools/yabridgectl/src/main.rs b/tools/yabridgectl/src/main.rs -index 0db1bd4..221cdd0 100644 +index ce701b8..b6b9633 100644 --- a/tools/yabridgectl/src/main.rs +++ b/tools/yabridgectl/src/main.rs -@@ -102,7 +102,7 @@ fn main() -> Result<()> { +@@ -150,7 +150,7 @@ fn main() -> Result<()> { .about("Path to the directory containing 'libyabridge-{vst2,vst3}.so'") .long_about( "Path to the directory containing 'libyabridge-{vst2,vst3}.so'. If this \ diff --git a/pkgs/tools/compression/nx2elf/default.nix b/pkgs/tools/compression/nx2elf/default.nix new file mode 100644 index 000000000000..8b7f094bf39a --- /dev/null +++ b/pkgs/tools/compression/nx2elf/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchFromGitHub, lz4 }: + +stdenv.mkDerivation rec { + pname = "nx2elf"; + version = "unstable-2020-05-26"; + + src = fetchFromGitHub { + owner = "shuffle2"; + repo = "nx2elf"; + rev = "7212e82a77b84fcc18ef2d050970350dbf63649b"; + sha256 = "1j4k5s86c6ixa3wdqh4cfm31fxabwn6jcjc6pippx8mii98ac806"; + }; + + buildInputs = [ lz4 ]; + + postPatch = '' + # This project does not comply with C++14 standards, and compilation on that fails. + # This does however succesfully compile with the gnu++20 standard. + substituteInPlace Makefile --replace "c++14" "gnu++20" + + # pkg-config is not supported, so we'll manually use a non-ancient version of lz4 + cp ${lz4.src}/lib/lz4.{h,c} . + ''; + + installPhase = '' + mkdir -p $out/bin + install -D nx2elf $out/bin/nx2elf + ''; + + meta = with lib; { + homepage = "https://github.com/shuffle2/nx2elf"; + description = "Convert Nintendo Switch executable files to ELFs"; + license = licenses.unfree; # No license specified upstream + platforms = [ "x86_64-linux" ]; # Should work on Darwin as well, but this is untested. aarch64-linux fails. + maintainers = [ maintainers.ivar ]; + }; +} diff --git a/pkgs/tools/filesystems/mtools/default.nix b/pkgs/tools/filesystems/mtools/default.nix index 4316e0ee4268..8f83f800b671 100644 --- a/pkgs/tools/filesystems/mtools/default.nix +++ b/pkgs/tools/filesystems/mtools/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "mtools"; - version = "4.0.26"; + version = "4.0.27"; src = fetchurl { url = "mirror://gnu/mtools/${pname}-${version}.tar.bz2"; - sha256 = "06pabnjc4r2vv3dzfm6q97g6jbp2k5bhmcdwv2cf25ka8y5ir7sk"; + sha256 = "1crqi10adwfahj8xyw60lx70hkpcc5g00b5r8277cm2f4kcwi24w"; }; patches = lib.optional stdenv.isDarwin ./UNUSED-darwin.patch; diff --git a/pkgs/tools/graphics/jhead/default.nix b/pkgs/tools/graphics/jhead/default.nix index ab5fd4f5401d..16e572522757 100644 --- a/pkgs/tools/graphics/jhead/default.nix +++ b/pkgs/tools/graphics/jhead/default.nix @@ -1,31 +1,20 @@ -{ lib, stdenv, fetchurl, fetchpatch, libjpeg }: +{ lib, stdenv, fetchFromGitHub, libjpeg }: stdenv.mkDerivation rec { pname = "jhead"; - version = "3.04"; + version = "3.06.0.1"; - src = fetchurl { - url = "http://www.sentex.net/~mwandel/jhead/${pname}-${version}.tar.gz"; - sha256 = "1j831bqw1qpkbchdriwcy3sgzvbagaj45wlc124fs9bc9z7vp2gg"; + src = fetchFromGitHub { + owner = "Matthias-Wandel"; + repo = "jhead"; + rev = version; + sha256 = "0zgh36486cpcnf7xg6dwf7rhz2h4gpayqvdk8hmrx6y418b2pfyf"; }; - patches = [ - (fetchpatch { - url = "https://sources.debian.org/data/main/j/jhead/1:3.04-2/debian/patches/01_gpsinfo.c"; - sha256 = "0r8hdbfrdxip4dwz5wqsv47a29j33cx7w5zx4jdhp5l1ihg003lz"; - }) - ]; - buildInputs = [ libjpeg ]; makeFlags = [ "CPPFLAGS=" "CFLAGS=-O3" "LDFLAGS=" ]; - patchPhase = '' - sed -i '/dpkg-buildflags/d' makefile - substituteInPlace jhead.c \ - --replace "jpegtran -trim" "${libjpeg.bin}/bin/jpegtran -trim" - ''; - installPhase = '' mkdir -p \ $out/bin \ @@ -43,10 +32,5 @@ stdenv.mkDerivation rec { license = licenses.publicDomain; maintainers = with maintainers; [ rycee ]; platforms = platforms.all; - # https://github.com/NixOS/nixpkgs/issues/90828 - knownVulnerabilities = [ - "CVE-2020-6624" - "CVE-2020-6625" - ]; }; } diff --git a/pkgs/tools/misc/betterdiscord-installer/default.nix b/pkgs/tools/misc/betterdiscord-installer/default.nix index d74a914ba65c..f1aefd9b7583 100644 --- a/pkgs/tools/misc/betterdiscord-installer/default.nix +++ b/pkgs/tools/misc/betterdiscord-installer/default.nix @@ -18,7 +18,7 @@ in appimageTools.wrapType2 { install -m 444 -D ${appimageContents}/betterdiscord.desktop -t $out/share/applications substituteInPlace $out/share/applications/betterdiscord.desktop \ - --replace "Exec=AppRun" "Exec=$out/bin/${pname}" + --replace 'Exec=AppRun' 'Exec=${pname}' cp -r ${appimageContents}/usr/share/icons $out/share ''; diff --git a/pkgs/tools/misc/ostree/default.nix b/pkgs/tools/misc/ostree/default.nix index 53966705c2d7..10b1143cc29a 100644 --- a/pkgs/tools/misc/ostree/default.nix +++ b/pkgs/tools/misc/ostree/default.nix @@ -12,6 +12,8 @@ , xz , e2fsprogs , libsoup +, glib-networking +, wrapGAppsHook , gpgme , which , makeWrapper @@ -78,6 +80,7 @@ in stdenv.mkDerivation rec { libxslt docbook-xsl-nons docbook_xml_dtd_42 + wrapGAppsHook ]; buildInputs = [ @@ -85,6 +88,7 @@ in stdenv.mkDerivation rec { systemd e2fsprogs libsoup + glib-networking gpgme fuse libselinux diff --git a/pkgs/tools/security/libmodsecurity/default.nix b/pkgs/tools/security/libmodsecurity/default.nix index 2222316a7426..03aed8c50e06 100644 --- a/pkgs/tools/security/libmodsecurity/default.nix +++ b/pkgs/tools/security/libmodsecurity/default.nix @@ -4,14 +4,14 @@ stdenv.mkDerivation rec { pname = "libmodsecurity"; - version = "3.0.3"; + version = "3.0.4"; src = fetchFromGitHub { owner = "SpiderLabs"; repo = "ModSecurity"; fetchSubmodules = true; rev = "v${version}"; - sha256 = "00g2407g2679zv73q67zd50z0f1g1ij734ssv2pp77z4chn5dzib"; + sha256 = "07vry10cdll94sp652hwapn0ppjv3mb7n2s781yhy7hssap6f2vp"; }; nativeBuildInputs = [ autoreconfHook pkg-config doxygen ]; diff --git a/pkgs/tools/system/awstats/default.nix b/pkgs/tools/system/awstats/default.nix index 88162780cb70..e0fb92b519f7 100644 --- a/pkgs/tools/system/awstats/default.nix +++ b/pkgs/tools/system/awstats/default.nix @@ -2,11 +2,11 @@ perlPackages.buildPerlPackage rec { pname = "awstats"; - version = "7.7"; + version = "7.8"; src = fetchurl { url = "mirror://sourceforge/awstats/${pname}-${version}.tar.gz"; - sha256 = "0z3p77jnpjilajs9yv87r8xla2x1gjqlvrhpbgbh5ih73386v3j2"; + sha256 = "1f6l0hd01jmz7hpg0py8qixxiq50n8gl37iypayskxmy05z8craa"; }; postPatch = '' @@ -54,7 +54,7 @@ perlPackages.buildPerlPackage rec { meta = with lib; { description = "Real-time logfile analyzer to get advanced statistics"; - homepage = "http://awstats.org"; + homepage = "https://awstats.org"; license = licenses.gpl3Plus; platforms = platforms.unix; }; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 3d40f13ad6b0..d28fcdb1dca0 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -645,6 +645,7 @@ mapAliases ({ rubyPackages_2_5 = throw "rubyPackages_2_5 was deprecated in 2021-02: use a newer version of rubyPackages instead"; rubygems = throw "rubygems was deprecated on 2016-03-02: rubygems is now bundled with ruby"; rubyMinimal = throw "rubyMinimal was removed due to being unused"; + runwayml = throw "runwayml is now a webapp"; # added 2021-04-17 rxvt_unicode-with-plugins = rxvt-unicode; # added 2020-02-02 rxvt_unicode = rxvt-unicode-unwrapped; # added 2020-02-02 subversion19 = throw "subversion19 has been removed as it has reached its end of life"; # added 2021-03-31 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd22f4c9dacd..ae4f7165941a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2847,6 +2847,8 @@ in nwipe = callPackage ../tools/security/nwipe { }; + nx2elf = callPackage ../tools/compression/nx2elf { }; + nx-libs = callPackage ../tools/X11/nx-libs { }; nyx = callPackage ../tools/networking/nyx { }; @@ -6960,6 +6962,7 @@ in nnn = callPackage ../applications/misc/nnn { }; + shfm = callPackage ../applications/misc/shfm { }; noise-repellent = callPackage ../applications/audio/noise-repellent { }; @@ -8785,6 +8788,8 @@ in tmpwatch = callPackage ../tools/misc/tmpwatch { }; + tmpmail = callPackage ../applications/networking/tmpmail { }; + tmux = callPackage ../tools/misc/tmux { }; tmux-cssh = callPackage ../tools/misc/tmux-cssh { }; @@ -11987,7 +11992,10 @@ in dust = callPackage ../development/interpreters/pixie/dust.nix { }; buildRubyGem = callPackage ../development/ruby-modules/gem { }; - defaultGemConfig = callPackage ../development/ruby-modules/gem-config { }; + defaultGemConfig = callPackage ../development/ruby-modules/gem-config { + inherit (darwin) DarwinTools cctools; + inherit (darwin.apple_sdk.frameworks) CoreServices; + }; bundix = callPackage ../development/ruby-modules/bundix { }; bundler = callPackage ../development/ruby-modules/bundler { }; bundlerEnv = callPackage ../development/ruby-modules/bundler-env { }; @@ -23077,6 +23085,10 @@ in inherit buildPythonApplication; }; + foxotron = callPackage ../applications/graphics/foxotron { + inherit (darwin.apple_sdk.frameworks) AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL; + }; + foxtrotgps = callPackage ../applications/misc/foxtrotgps { }; fractal = callPackage ../applications/networking/instant-messengers/fractal { }; @@ -27696,7 +27708,9 @@ in ivan = callPackage ../games/ivan { }; - ja2-stracciatella = callPackage ../games/ja2-stracciatella { }; + ja2-stracciatella = callPackage ../games/ja2-stracciatella { + inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; + }; katago = callPackage ../games/katago { }; @@ -30920,8 +30934,6 @@ in zrepl = callPackage ../tools/backup/zrepl { }; - runwayml = callPackage ../applications/graphics/runwayml {}; - uhubctl = callPackage ../tools/misc/uhubctl {}; kodelife = callPackage ../applications/graphics/kodelife {}; diff --git a/pkgs/top-level/kodi-packages.nix b/pkgs/top-level/kodi-packages.nix index fbdf45d4202a..f9bf8dc87061 100644 --- a/pkgs/top-level/kodi-packages.nix +++ b/pkgs/top-level/kodi-packages.nix @@ -94,6 +94,8 @@ let self = rec { vfs-libarchive = callPackage ../applications/video/kodi-packages/vfs-libarchive { }; + youtube = callPackage ../applications/video/kodi-packages/youtube { }; + # addon packages (dependencies) certifi = callPackage ../applications/video/kodi-packages/certifi { }; diff --git a/pkgs/top-level/ruby-packages.nix b/pkgs/top-level/ruby-packages.nix index b25f854bdd06..594e66f598d9 100644 --- a/pkgs/top-level/ruby-packages.nix +++ b/pkgs/top-level/ruby-packages.nix @@ -1863,10 +1863,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "06r2kjl4ylfgw08gjxvlwqdy1lgmgsylwnysk1d0qr6q3nd0nvg6"; + sha256 = "1yl6wy2gfvjkq0457plwadk7jwx5sbpqxl9aycbphskisis9g238"; type = "gem"; }; - version = "6.1.0"; + version = "6.1.3.1"; }; rails-dom-testing = { dependencies = ["activesupport" "nokogiri"];