Commit 5b6735ad authored by qzylinra's avatar qzylinra
Browse files

flutter: remove unused code

parent d749418f
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -73,8 +73,6 @@ runCommand "flutter-artifacts-${flutterPlatform}-${systemPlatform}"
      lndir -silent '${flutter'}' "$FLUTTER_ROOT"
      rm --recursive --force "$FLUTTER_ROOT/bin/cache"
      mkdir "$FLUTTER_ROOT/bin/cache"
    ''
    + lib.optionalString (lib.versionAtLeast flutter'.version "3.26") ''
      mkdir "$FLUTTER_ROOT/bin/cache/dart-sdk"
      lndir -silent '${flutter'}/bin/cache/dart-sdk' "$FLUTTER_ROOT/bin/cache/dart-sdk"
    ''
@@ -94,8 +92,6 @@ runCommand "flutter-artifacts-${flutterPlatform}-${systemPlatform}"
        }

      rm --recursive --force "$FLUTTER_ROOT/bin/cache/lockfile"
    ''
    + lib.optionalString (lib.versionAtLeast flutter'.version "3.26") ''
      rm --recursive --force "$FLUTTER_ROOT/bin/cache/dart-sdk"
    ''
    + ''
+1 −1
Original line number Diff line number Diff line
@@ -306,7 +306,7 @@ stdenv.mkDerivation (finalAttrs: {
    export TERM=dumb
  ''
  # ValueError: ZIP does not support timestamps before 1980
  + lib.optionalString (lib.versionAtLeast flutterVersion "3.29") ''
  + ''
    substituteInPlace src/flutter/build/zip.py \
      --replace-fail "zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED)" "zipfile.ZipFile(args.output, 'w', zipfile.ZIP_DEFLATED, strict_timestamps=False)"
  ''
+3 −16
Original line number Diff line number Diff line
@@ -91,22 +91,9 @@ runCommand "flutter-engine-source-${version}-${buildPlatform.system}-${targetPla
      export -f clean_git
      export -f make_deterministic_repo

    ''
    + (
      if lib.versionAtLeast flutterVersion "3.29" then
        ''
      mkdir --parents source
      cp ${gclient} source/.gclient
      cd source
        ''
      else
        ''
          mkdir --parents $out
          cp ${gclient} $out/.gclient
          cd $out
        ''
    )
    + ''
      export PATH=$PATH:${tools.depot_tools}
      python3 ${tools.depot_tools}/gclient.py sync --no-history --shallow --nohooks -j $NIX_BUILD_CORES
    ''
+1 −5
Original line number Diff line number Diff line
@@ -3,11 +3,7 @@
  version,
  engineVersion,
  engineHashes ? { },
  engineUrl ?
    if lib.versionAtLeast version "3.29" then
      "https://github.com/flutter/flutter.git@${engineVersion}"
    else
      "https://github.com/flutter/engine.git@${engineVersion}",
  engineUrl ? "https://github.com/flutter/flutter.git@${engineVersion}",
  enginePatches ? [ ],
  engineRuntimeModes ? [
    "release"
+2 −3
Original line number Diff line number Diff line
@@ -32,9 +32,8 @@ let
      systemPlatform:
      callPackage "${nixpkgsRoot}/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix" {
        flutter = flutterPackages."v${flutterCompactVersion}";
        inherit flutterPlatform;
        inherit systemPlatform;
        hash = lib.fakeSha256;
        inherit flutterPlatform systemPlatform;
        hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
      }
    ) systemPlatforms)
  ) [ ] flutterPlatforms;
Loading