flutter: format with nixpkgs-fmt

This commit is contained in:
Thiago Kenji Okada 2021-01-06 17:38:03 -03:00
parent 877bc4b720
commit a03f012956
2 changed files with 38 additions and 9 deletions

View File

@ -1,5 +1,4 @@
{ callPackage, dart }:
let
dart_stable = dart.override { version = "2.10.0"; };
dart_beta = dart.override { version = "2.10.0"; };
@ -8,7 +7,8 @@ let
getPatches = dir:
let files = builtins.attrNames (builtins.readDir dir);
in map (f: dir + ("/" + f)) files;
in {
in
{
mkFlutter = mkFlutter;
stable = mkFlutter rec {
pname = "flutter";

View File

@ -1,10 +1,37 @@
{ channel, pname, version, sha256Hash, patches, dart
, filename ? "flutter_linux_${version}-${channel}.tar.xz"}:
{ bash, buildFHSUserEnv, cacert, coreutils, git, makeWrapper, runCommand, stdenv
, fetchurl, alsaLib, dbus, expat, libpulseaudio, libuuid, libX11, libxcb
, libXcomposite, libXcursor, libXdamage, libXfixes, libGL, nspr, nss, systemd }:
{ channel
, pname
, version
, sha256Hash
, patches
, dart
, filename ? "flutter_linux_${version}-${channel}.tar.xz"
}:
{ bash
, buildFHSUserEnv
, cacert
, coreutils
, git
, makeWrapper
, runCommand
, stdenv
, fetchurl
, alsaLib
, dbus
, expat
, libpulseaudio
, libuuid
, libX11
, libxcb
, libXcomposite
, libXcursor
, libXdamage
, libXfixes
, libGL
, nspr
, nss
, systemd
}:
let
drvName = "flutter-${channel}-${version}";
flutter = stdenv.mkDerivation {
@ -100,7 +127,9 @@ let
];
};
in runCommand drvName {
in
runCommand drvName
{
startScript = ''
#!${bash}/bin/bash
export PUB_CACHE=''${PUB_CACHE:-"$HOME/.pub-cache"}