lol
0
fork

Configure Feed

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

dart: Spoof Git dependency version checks

+24 -4
+1 -1
pkgs/build-support/dart/build-dart-application/hooks/dart-config-hook.sh
··· 4 4 echo "Executing dartConfigHook" 5 5 6 6 echo "Installing dependencies" 7 - eval "$pubGetScript" --offline 7 + eval doPubGet "$pubGetScript" --offline 8 8 9 9 echo "Finished dartConfigHook" 10 10 }
+16 -1
pkgs/build-support/dart/fetch-dart-deps/default.nix
··· 1 1 { stdenvNoCC 2 2 , lib 3 3 , makeSetupHook 4 + , writeShellScriptBin 4 5 , dart 5 6 , git 6 7 , cacert ··· 170 171 ''; 171 172 } // buildDrvInheritArgs); 172 173 174 + # As of Dart 3.0.0, Pub checks the revision of cached Git-sourced packages. 175 + # Git must be wrapped to return a positive result, as the real .git directory is wiped 176 + # to produce a deteministic dependency derivation output. 177 + # https://github.com/dart-lang/pub/pull/3791/files#diff-1639c4669c428c26e68cfebd5039a33f87ba568795f2c058c303ca8528f62b77R631 178 + gitSourceWrapper = writeShellScriptBin "git" '' 179 + args=("$@") 180 + if [[ "''${args[0]}" == "rev-list" && "''${args[1]}" == "--max-count=1" ]]; then 181 + revision="''${args[''${#args[@]}-1]}" 182 + echo "$revision" 183 + else 184 + ${git}/bin/git "''${args[@]}" 185 + fi 186 + ''; 187 + 173 188 hook = (makeSetupHook { 174 189 # The setup hook should not be part of the fixed-output derivation. 175 190 # Updates to the hook script should not change vendor hashes, and it won't 176 191 # work at all anyway due to https://github.com/NixOS/nix/issues/6660. 177 192 name = "${name}-dart-deps-setup-hook"; 178 - substitutions = { inherit deps; }; 193 + substitutions = { inherit gitSourceWrapper deps; }; 179 194 propagatedBuildInputs = [ dart git ]; 180 195 passthru = { 181 196 files = deps.outPath;
+5
pkgs/build-support/dart/fetch-dart-deps/setup-hook.sh
··· 39 39 exit 1 40 40 fi 41 41 } 42 + 43 + # Performs the given pub get command with an appropriate environment. 44 + doPubGet() { 45 + PATH="@gitSourceWrapper@/bin:$PATH" "$@" 46 + }
+1 -1
pkgs/build-support/flutter/default.nix
··· 76 76 77 77 mkdir -p build/flutter_assets/fonts 78 78 79 - flutter packages get --offline -v 79 + doPubGet flutter pub get --offline -v 80 80 flutter build linux -v --release --split-debug-info="$debug" ${builtins.concatStringsSep " " (map (flag: "\"${flag}\"") finalAttrs.flutterBuildFlags)} 81 81 82 82 runHook postBuild
+1 -1
pkgs/misc/dart-sass-embedded/default.nix
··· 41 41 42 42 configurePhase = '' 43 43 runHook preConfigure 44 - dart pub get --offline 44 + doPubGet dart pub get --offline 45 45 mkdir build 46 46 ln -s ${embedded-protocol} build/embedded-protocol 47 47 runHook postConfigure