mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
buildDartApplication: Allow passing a sdkSetupScript
This commit is contained in:
parent
6298ac2774
commit
5391c0204e
@ -1,6 +1,7 @@
|
||||
{ lib, stdenv, callPackage, fetchDartDeps, runCommand, writeText, dartHooks, makeWrapper, dart, cacert, nodejs, darwin, jq }:
|
||||
|
||||
{ pubGetScript ? "dart pub get"
|
||||
{ sdkSetupScript ? ""
|
||||
, pubGetScript ? "dart pub get"
|
||||
|
||||
# Output type to produce. Can be any kind supported by dart
|
||||
# https://dart.dev/tools/dart-compile#types-of-output
|
||||
@ -41,13 +42,13 @@ let
|
||||
'';
|
||||
}) {
|
||||
buildDrvArgs = args;
|
||||
inherit pubGetScript vendorHash pubspecLockFile;
|
||||
inherit sdkSetupScript pubGetScript vendorHash pubspecLockFile;
|
||||
};
|
||||
inherit (dartHooks.override { inherit dart; }) dartConfigHook dartBuildHook dartInstallHook dartFixupHook;
|
||||
|
||||
baseDerivation = stdenv.mkDerivation (finalAttrs: args // {
|
||||
inherit pubGetScript dartCompileCommand dartOutputType dartRuntimeCommand
|
||||
dartCompileFlags dartJitFlags runtimeDependencies;
|
||||
inherit sdkSetupScript pubGetScript dartCompileCommand dartOutputType
|
||||
dartRuntimeCommand dartCompileFlags dartJitFlags runtimeDependencies;
|
||||
|
||||
dartEntryPoints =
|
||||
if (dartEntryPoints != null)
|
||||
|
@ -3,6 +3,9 @@
|
||||
dartConfigHook() {
|
||||
echo "Executing dartConfigHook"
|
||||
|
||||
echo "Setting up SDK"
|
||||
eval "$sdkSetupScript"
|
||||
|
||||
echo "Installing dependencies"
|
||||
eval doPubGet "$pubGetScript" --offline
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user