at master 585 B view raw
1{ 2 lib, 3 stdenv, 4 callPackage, 5 autoPatchelfHook, 6 src, 7}: 8 9(stdenv.mkDerivation { 10 inherit (src) name; 11 inherit src; 12 13 nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook; 14 15 installPhase = '' 16 runHook preInstall 17 18 mkdir -p "$out/bin" 19 cp -r . "$out/bin/cache" 20 rm -f "$out/bin/cache/flutter.version.json" 21 22 runHook postInstall 23 ''; 24}).overrideAttrs 25 ( 26 if builtins.pathExists (./overrides + "/${src.flutterPlatform}.nix") then 27 callPackage (./overrides + "/${src.flutterPlatform}.nix") { } 28 else 29 ({ ... }: { }) 30 )