This commit is contained in:
rzuasti
2026-02-12 10:44:58 -05:00
parent 91c5926e1b
commit 7908de9068
3 changed files with 66 additions and 21 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ class MainApp extends StatelessWidget {
title: 'OOTT', title: 'OOTT',
theme: ThemeData( theme: ThemeData(
colorScheme: ColorScheme.fromSeed( colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepOrange, seedColor: Colors.green,
brightness: Brightness.dark, brightness: Brightness.dark,
), ),
), ),
File diff suppressed because one or more lines are too long
+64 -20
View File
@@ -1,37 +1,81 @@
# {
# lib,
# pkgs,
# }: let
# oott-backend = pkgs.rustPlatform.buildRustPackage rec {
# pname = "oott-backend";
# version = "0.0.1";
# src = ./../backend;
# cargoLock = {
# lockFile = ./../backend/Cargo.lock;
# };
# 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;
# # We need to create the pubspec.lock.json file beforehand, for now we do it manually before releasing a new version by
# # cat pubspec.lock | nix run nixpkgs#yj > pubspec.lock.json
# # buildInputs = [pkgs.yj];
# # preBuild = ''
# # cat $src/pubspec.lock | yj > $src/pubspec.lock.json
# # '';
# };
# in
# pkgs.stdenv.mkDerivation {
# name = "oott";
# buildInputs = [oott-frontend oott-backend];
# src = ./../extras;
# installPhase = ''
# mkdir -p $out/bin
# cp ${oott-backend}/bin/* $out/bin/
# '';
# }
{ {
lib, lib,
pkgs, pkgs,
}: let }: let
oott-backend = pkgs.rustPlatform.buildRustPackage rec { oott-frontend = pkgs.stdenv.mkDerivation {
pname = "oott-backend"; name = "oott-frontend";
version = "0.0.1";
src = ./../backend;
cargoLock = {
lockFile = ./../backend/Cargo.lock;
};
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"; version = "0.0.1";
src = ./../frontend; src = ./../frontend;
pubspecLock = lib.importJSON ./../frontend/pubspec.lock.json; doCheck = false;
dontFixup = true;
buildInputs = [pkgs.yj]; nativeBuildInputs = [pkgs.cacert pkgs.wget];
preBuild = ''
cat $src/pubspec.lock | yj > $src/pubspec.lock.json buildInputs = [pkgs.flutter];
buildPhase = ''
runHook preBuild
mkdir -p $out/web
# pwd
# ls -la
# HOME=$out flutter build web -o $out/web/ --verbose --disable-analytics
# ls -la $out/web
HOME=$out flutter doctor
echo "done3"
runHook postBuild
''; '';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-p/tQCa0AvRHUGYiqdsILo0AEFOvXC4ZBtp8cMDv5hI0=";
# outputHash = pkgs.lib.fakeHash;
}; };
in in
pkgs.stdenv.mkDerivation { pkgs.stdenv.mkDerivation {
name = "oott"; name = "oott";
buildInputs = [oott-frontend oott-backend]; buildInputs = [oott-frontend];
src = ./../extras; src = ./../extras;
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp ${oott-backend}/bin/* $out/bin/ mkdir -p $out/web
ls -la ${oott-frontend}
ls -la ${oott-frontend}/web
cp -r ${oott-frontend}/web/* $out/web/
''; '';
} }