1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00

buildDartApplication: Add entire Dart derivation to nativeBuildInputs

This commit is contained in:
hacker1024 2023-10-23 05:31:25 +11:00 committed by Maciej Krüger
parent d331e2d68c
commit 75b809c7c6
No known key found for this signature in database
GPG key ID: 0D948CE19CF49C5F

View file

@ -1,4 +1,4 @@
{ lib, stdenv, callPackage, fetchDartDeps, writeText, symlinkJoin, dartHooks, makeWrapper, dart, cacert, nodejs, darwin, jq }:
{ lib, stdenv, callPackage, fetchDartDeps, runCommand, symlinkJoin, writeText, dartHooks, makeWrapper, dart, cacert, nodejs, darwin, jq }:
{ sdkSetupScript ? ""
, pubGetScript ? "dart pub get"
@ -37,13 +37,15 @@
let
dartDeps = (fetchDartDeps.override {
dart = symlinkJoin {
name = "dart-fod";
paths = [ dart ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram "$out/bin/dart" \
--add-flags "--root-certs-file=${cacert}/etc/ssl/certs/ca-bundle.crt"
'';
name = "dart-sdk-fod";
paths = [
(runCommand "dart-fod" { nativeBuildInputs = [ makeWrapper ]; } ''
mkdir -p "$out/bin"
makeWrapper "${dart}/bin/dart" "$out/bin/dart" \
--add-flags "--root-certs-file=${cacert}/etc/ssl/certs/ca-bundle.crt"
'')
dart
];
};
}) {
buildDrvArgs = args;