Rollback to single nix package for backend

This commit is contained in:
rzuasti
2026-02-12 12:55:20 -05:00
parent ef6d2b73f1
commit f7f7810dfd
3 changed files with 11 additions and 63 deletions
-1
View File
@@ -1 +0,0 @@
# OOTT
+1 -1
View File
@@ -55,7 +55,7 @@
});
# A Nixpkgs overlay that provides a 'oott' package.
overlays.default = final: prev: {oott = final.callPackage ./nix/package.nix {inherit pkgsBySystem;};};
overlays.default = final: prev: {oott = final.callPackage ./nix/package.nix {};};
# Package definition
packages = forEachSystem (system: {
+10 -61
View File
@@ -1,63 +1,12 @@
{
lib,
pkgsBySystem,
}: let
system = "x86_64-linux";
pkgs = pkgsBySystem.${system};
androidSdk = pkgs.androidenv.androidPkgs.androidsdk;
oott-frontend = pkgs.stdenv.mkDerivation {
name = "oott-frontend";
version = "0.0.1";
src = ./../frontend;
doCheck = false;
dontFixup = true;
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk";
nativeBuildInputs = [pkgs.cacert];
buildInputs = with pkgs; [
openssl
flutter
android-tools
androidSdk
jdk17
];
buildPhase = ''
runHook preBuild
mkdir -p $out/web
HOME=$out flutter build web
cp -r build/web/* $out/web/
runHook postBuild
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "sha256-CyFxZMFL9WAklny0XwM6CGrt38NzSYT1xGdXaLSVePI=";
# outputHash = pkgs.lib.fakeHash;
{pkgs}:
pkgs.rustPlatform.buildRustPackage rec {
pname = "oott";
version = "0.0.1";
src = ./../backend;
cargoLock = {
lockFile = ./../backend/Cargo.lock;
};
oott-backend = pkgs.rustPlatform.buildRustPackage {
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";
};
in
pkgs.stdenv.mkDerivation {
name = "oott";
buildInputs = [oott-frontend oott-backend];
src = ./../extras;
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/web
cp -r ${oott-backend}/bin/* $out/bin/
cp -r ${oott-frontend}/web/* $out/web/
'';
}
nativeBuildInputs = [pkgs.pkg-config];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
}