diff options
Diffstat (limited to 'pkgs/development/compilers/flutter/artifacts')
4 files changed, 0 insertions, 122 deletions
diff --git a/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix b/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix deleted file mode 100644 index 0e1ce6e678cb..000000000000 --- a/pkgs/development/compilers/flutter/artifacts/fetch-artifacts.nix +++ /dev/null @@ -1,73 +0,0 @@ -# Schema: -# ${flutterVersion}.${targetPlatform}.${hostPlatform} -# -# aarch64-darwin as a host is not yet supported. -# https://github.com/flutter/flutter/issues/60118 -{ lib -, runCommand -, xorg -, cacert -, unzip - -, flutterPlatform -, systemPlatform -, flutter -, hash -}: - -let - flutterPlatforms = [ - "android" - "ios" - "web" - "linux" - "windows" - "macos" - "fuchsia" - "universal" - ]; - - flutter' = flutter.override { - # Use a version of Flutter with just enough capabilities to download - # artifacts. - supportedTargetFlutterPlatforms = [ ]; - - # Modify flutter-tool's system platform in order to get the desired platform's hashes. - flutter = flutter.unwrapped.override { - flutterTools = flutter.unwrapped.tools.override { - inherit systemPlatform; - }; - }; - }; -in -runCommand "flutter-artifacts-${flutterPlatform}-${systemPlatform}" -{ - nativeBuildInputs = [ xorg.lndir flutter' unzip ]; - - NIX_FLUTTER_TOOLS_VM_OPTIONS = "--root-certs-file=${cacert}/etc/ssl/certs/ca-bundle.crt"; - NIX_FLUTTER_OPERATING_SYSTEM = { - "x86_64-linux" = "linux"; - "aarch64-linux" = "linux"; - "x86_64-darwin" = "macos"; - "aarch64-darwin" = "macos"; - }.${systemPlatform}; - - outputHash = hash; - outputHashMode = "recursive"; - outputHashAlgo = "sha256"; - - passthru = { - inherit flutterPlatform; - }; -} '' - export FLUTTER_ROOT="$NIX_BUILD_TOP" - lndir -silent '${flutter'}' "$FLUTTER_ROOT" - rm -rf "$FLUTTER_ROOT/bin/cache" - mkdir "$FLUTTER_ROOT/bin/cache" - - HOME="$(mktemp -d)" flutter precache -v '--${flutterPlatform}' ${builtins.concatStringsSep " " (map (p: "'--no-${p}'") (lib.remove flutterPlatform flutterPlatforms))} - rm -rf "$FLUTTER_ROOT/bin/cache/lockfile" - find "$FLUTTER_ROOT" -type l -lname '${flutter'}/*' -delete - - cp -r bin/cache "$out" -'' diff --git a/pkgs/development/compilers/flutter/artifacts/overrides/darwin.nix b/pkgs/development/compilers/flutter/artifacts/overrides/darwin.nix deleted file mode 100644 index 83257d4e34d5..000000000000 --- a/pkgs/development/compilers/flutter/artifacts/overrides/darwin.nix +++ /dev/null @@ -1,13 +0,0 @@ -{}: -{ buildInputs ? [ ] -, ... -}: -{ - postPatch = '' - if [ "$pname" == "flutter-tools" ]; then - # Use arm64 instead of arm64e. - substituteInPlace lib/src/ios/xcodeproj.dart \ - --replace-fail arm64e arm64 - fi - ''; -} diff --git a/pkgs/development/compilers/flutter/artifacts/overrides/linux.nix b/pkgs/development/compilers/flutter/artifacts/overrides/linux.nix deleted file mode 100644 index bc6114415b90..000000000000 --- a/pkgs/development/compilers/flutter/artifacts/overrides/linux.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ gtk3 -}: - -{ buildInputs ? [ ] -, ... -}: - -{ - buildInputs = buildInputs ++ [ gtk3 ]; -} diff --git a/pkgs/development/compilers/flutter/artifacts/prepare-artifacts.nix b/pkgs/development/compilers/flutter/artifacts/prepare-artifacts.nix deleted file mode 100644 index def75e280da7..000000000000 --- a/pkgs/development/compilers/flutter/artifacts/prepare-artifacts.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib -, stdenv -, callPackage -, autoPatchelfHook -, src -}: - -(stdenv.mkDerivation { - inherit (src) name; - inherit src; - - nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; - - installPhase = '' - runHook preInstall - - mkdir -p "$out/bin" - cp -r . "$out/bin/cache" - - runHook postInstall - ''; -}).overrideAttrs ( - if builtins.pathExists (./overrides + "/${src.flutterPlatform}.nix") - then callPackage (./overrides + "/${src.flutterPlatform}.nix") { } - else ({ ... }: { }) -) |