Compare commits

...

32 Commits

Author SHA1 Message Date
APEX FIGHT
2bbeea7bfb Merge branch 'main' of https://gitea.apexfight.net/apex/Mozzarella 2025-11-01 04:13:42 -04:00
APEX FIGHT
fe4d6e8cc4 targeted builds and cross comp 2025-11-01 04:13:30 -04:00
a19b42aa02 Update README.md 2025-11-01 07:07:55 +00:00
5042becb49 Update README.md 2025-11-01 07:07:23 +00:00
c130aef4f0 Update README.md 2025-11-01 07:01:19 +00:00
APEX FIGHT
2388f4d202 added more verbosity 2025-11-01 02:47:35 -04:00
APEX FIGHT
73619f1cbf uncomment download 2025-11-01 02:44:28 -04:00
APEX FIGHT
09c696d94b added compression and moving build output to target dir 2025-11-01 02:43:56 -04:00
APEX FIGHT
161e2e070f organized configs 2025-11-01 02:43:18 -04:00
APEX FIGHT
7161da7281 framework for later just chucking in a script here to garbage collect all of nix because the building of firefox can take up lots of space very fast 2025-11-01 02:42:44 -04:00
APEX FIGHT
2475af5427 downgraded python because mozilla has mental issues too (twinning) 2025-10-31 23:20:41 -04:00
APEX FIGHT
0d1020647b added pkgconfig 2025-10-31 23:12:00 -04:00
APEX FIGHT
7471751078 added cbindgen 2025-10-31 23:07:35 -04:00
APEX FIGHT
a5b7484164 added cargo to package list 2025-10-31 23:00:47 -04:00
APEX FIGHT
79384be636 MORE packages, great 2025-10-31 22:58:48 -04:00
APEX FIGHT
1d789ee8bb more needed packages 2025-10-31 22:55:58 -04:00
APEX FIGHT
adccb59812 added neccesary packages to compile 2025-10-31 22:53:45 -04:00
APEX FIGHT
0ba1f7c6bc added verbosity and temporarily disabled downloading as to not download 100gb from firefox by the time this is over 2025-10-31 22:48:30 -04:00
APEX FIGHT
10113d0e4c fix 2025-10-31 22:43:29 -04:00
APEX FIGHT
28134a9b38 brace disambiguation 2025-10-31 22:40:16 -04:00
APEX FIGHT
338c302582 fix 2025-10-31 22:37:55 -04:00
APEX FIGHT
7016f1d285 changed tar unzipped path again 2025-10-31 22:36:13 -04:00
APEX FIGHT
7c71533ed2 final change for this hopefully, fixed unzipped path, again, wrote on windows 2025-10-31 22:33:22 -04:00
APEX FIGHT
da236d59dc more incorrect tar usage because i have mental insanity 2025-10-31 22:30:37 -04:00
APEX FIGHT
8da3bbc141 got rid wrong tar usage (wrote it on windows initially, just kinda guessing it) 2025-10-31 22:28:33 -04:00
APEX FIGHT
ccb25f1c3d unpure 2025-10-31 22:23:54 -04:00
APEX FIGHT
a234f87efe quotes around curl? 2025-10-31 22:20:45 -04:00
APEX FIGHT
284c6cd23d small change 2025-10-31 22:16:53 -04:00
APEX FIGHT
dd1eeb2975 firefox doesnt like slash at the end + nicer buildpath 2025-10-31 22:09:48 -04:00
APEX FIGHT
40ed13f3ba added "debug stuff" 2025-10-31 22:06:38 -04:00
APEX FIGHT
a884e64fe0 notes and framework for nix-shell env 2025-10-31 21:39:18 -04:00
APEX FIGHT
359a34ddc5 basic build script for firefox 2025-10-31 21:39:05 -04:00
5 changed files with 80 additions and 3 deletions

View File

@@ -1,7 +1,9 @@
# Mozzarella
fully automatic Mozilla builds and downloads
fully automatic Mozilla builds (just spidermonkey right now)
(intended specifically for val's earth modding support)
Powered by [Nix](https://nixos.org/)
coming soon...
builds pertinent to val's earth (but potentially useful otherwise) are located at [apexfight.net](https://mozzarella.apexfight.net/)
(intended specifically for val's earth modding support, but if you're here then feel free to use it for whatever)

1
nixgc.sh Normal file
View File

@@ -0,0 +1 @@
# basic script that garbage collects all of nixos to make it... take up like half the space, it gets real big after a while...

57
src/build.sh Normal file
View File

@@ -0,0 +1,57 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash
#! nix-shell -p bash curl gcc zlib libffi icu77 python313 rustc ccache ninja cmake libllvm cargo rust-cbindgen pkg-config
# CONFIGURATION OPTIONS
MAJORVERSION="140" # MAJOR firefox esr version
MINORVERSION="${MAJORVERSION}.4.0" # Minor firefox version
VERSION="${MINORVERSION}esr" # Whole Version put together
DOWNLOAD="https://ftp.mozilla.org/pub/firefox/releases/$VERSION/source/firefox-$VERSION.source.tar.xz"
BUILDPATH=$(realpath .) # Where to output build fragments
OUTPUT="/var/www/$VERSION/" # Where to place built and zipped hashes and all that (ex. for file hosting)
# Ensure necessary directories exist
mkdir $BUILDPATH/bin
mkdir $OUTPUT
#debug stuff
echo Version:
echo $VERSION
echo Link:
echo $DOWNLOAD
echo Build Location:
echo $BUILDPATH
#unzip this or something
echo Downloading...
curl -RO "$DOWNLOAD"
echo Unzipping Source...
tar -xJf "firefox-$VERSION.source.tar.xz"
cd "firefox-$MINORVERSION/js/src"
echo Making Build Path...
mkdir _build
cd _build
# https://clang.llvm.org/docs/CrossCompilation.html
echo Configuring build...
../configure --disable-jemalloc --with-system-zlib --with-system-icu --prefix="$BUILDPATH/bin" --with-intl-api --enable-optimize --target=x86_64-pc-linux-gnu
echo Compiling...
make -k
make -k install
echo Finished Building!
cd $BUILDPATH/bin/include
echo Compressing build fragment...
tar -cJf $VERSION.tar.xz mozjs-$MAJORVERSION/
echo Calculating sum of fragment...
sha256sum $VERSION.tar.xz > $VERSION.tar.xz.sha256
echo Moving fragments to output
mv $VERSION.tar.xz $VERSION.tar.xz.sha256 $OUTPUT

4
src/notes.txt Normal file
View File

@@ -0,0 +1,4 @@
VERSION = "140.4.0esr"
LINK = ftp.mozilla.org/pub/firefox/releases/$VERSION/source/firefox-$VERSION.source.tar.xz/
// (add .asc for hash)

13
src/shell.nix Normal file
View File

@@ -0,0 +1,13 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
# nativeBuildInputs is usually what you want -- tools you need to run
nativeBuildInputs = with pkgs.buildPackages; [
];
shellHook = ''
'';
}