From 91c5926e1b3f5b0dab1ca8875e1a6d85d167f5ba Mon Sep 17 00:00:00 2001 From: rzuasti Date: Thu, 12 Feb 2026 09:31:35 -0500 Subject: [PATCH] Adding json lock file for flutter project --- frontend/pubspec.lock.json | 0 nix/package.nix | 20 ++++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 frontend/pubspec.lock.json diff --git a/frontend/pubspec.lock.json b/frontend/pubspec.lock.json new file mode 100644 index 0000000..e69de29 diff --git a/nix/package.nix b/nix/package.nix index 371323a..3d41a45 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -1,4 +1,7 @@ -{pkgs}: let +{ + lib, + pkgs, +}: let oott-backend = pkgs.rustPlatform.buildRustPackage rec { pname = "oott-backend"; version = "0.0.1"; @@ -10,12 +13,25 @@ nativeBuildInputs = [pkgs.pkg-config]; 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 pkgs.stdenv.mkDerivation { name = "oott"; - buildInputs = [oott-backend]; + buildInputs = [oott-frontend oott-backend]; src = ./../extras; installPhase = '' + mkdir -p $out/bin cp ${oott-backend}/bin/* $out/bin/ ''; }