Adding json lock file for flutter project

This commit is contained in:
rzuasti
2026-02-12 09:31:35 -05:00
parent 14995230db
commit 91c5926e1b
2 changed files with 18 additions and 2 deletions
View File
+18 -2
View File
@@ -1,4 +1,7 @@
{pkgs}: let {
lib,
pkgs,
}: let
oott-backend = pkgs.rustPlatform.buildRustPackage rec { oott-backend = pkgs.rustPlatform.buildRustPackage rec {
pname = "oott-backend"; pname = "oott-backend";
version = "0.0.1"; version = "0.0.1";
@@ -10,12 +13,25 @@
nativeBuildInputs = [pkgs.pkg-config]; nativeBuildInputs = [pkgs.pkg-config];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
}; };
oott-frontend = pkgs.flutter.buildFlutterApplication rec {
pname = "oott-frontend";
version = "0.0.1";
src = ./../frontend;
pubspecLock = lib.importJSON ./../frontend/pubspec.lock.json;
buildInputs = [pkgs.yj];
preBuild = ''
cat $src/pubspec.lock | yj > $src/pubspec.lock.json
'';
};
in in
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
name = "oott"; name = "oott";
buildInputs = [oott-backend]; buildInputs = [oott-frontend oott-backend];
src = ./../extras; src = ./../extras;
installPhase = '' installPhase = ''
mkdir -p $out/bin
cp ${oott-backend}/bin/* $out/bin/ cp ${oott-backend}/bin/* $out/bin/
''; '';
} }