@ -4,6 +4,7 @@
, updateScript ? null
, updateScript ? null
, binaryName ? " f i r e f o x "
, binaryName ? " f i r e f o x "
, application ? " b r o w s e r "
, application ? " b r o w s e r "
, applicationName ? " M o z i l l a F i r e f o x "
, src
, src
, unpackPhase ? null
, unpackPhase ? null
, extraPatches ? [ ]
, extraPatches ? [ ]
@ -18,6 +19,7 @@
{ lib
{ lib
, pkgs
, stdenv
, stdenv
# build time
# build time
@ -161,6 +163,22 @@ let
ln - s $ lib $ out/lib/wasm32-wasi
ln - s $ lib $ out/lib/wasm32-wasi
done
done
'' ;
'' ;
distributionIni = pkgs . writeText " d i s t r i b u t i o n . i n i " ( lib . generators . toINI { } {
# Some light branding indicating this build uses our distro preferences
Global = {
id = " n i x o s " ;
version = " 1 . 0 " ;
about = " ${ applicationName } f o r N i x O S " ;
} ;
Preferences = {
# These values are exposed through telemetry
" a p p . d i s t r i b u t o r " = " n i x o s " ;
" a p p . d i s t r i b u t o r . c h a n n e l " = " n i x p k g s " ;
" a p p . p a r t n e r . n i x o s " = " n i x o s " ;
} ;
} ) ;
in
in
buildStdenv . mkDerivation ( {
buildStdenv . mkDerivation ( {
@ -290,6 +308,7 @@ buildStdenv.mkDerivation ({
" - - e n a b l e - a p p l i c a t i o n = ${ application } "
" - - e n a b l e - a p p l i c a t i o n = ${ application } "
" - - e n a b l e - d e f a u l t - t o o l k i t = c a i r o - g t k 3 ${ lib . optionalString waylandSupport " - w a y l a n d " } "
" - - e n a b l e - d e f a u l t - t o o l k i t = c a i r o - g t k 3 ${ lib . optionalString waylandSupport " - w a y l a n d " } "
" - - e n a b l e - s y s t e m - p i x m a n "
" - - e n a b l e - s y s t e m - p i x m a n "
" - - w i t h - d i s t r i b u t i o n - i d = o r g . n i x o s "
" - - w i t h - l i b c l a n g - p a t h = ${ llvmPackages . libclang . lib } / l i b "
" - - w i t h - l i b c l a n g - p a t h = ${ llvmPackages . libclang . lib } / l i b "
" - - w i t h - s y s t e m - f f i "
" - - w i t h - s y s t e m - f f i "
" - - w i t h - s y s t e m - i c u "
" - - w i t h - s y s t e m - i c u "
@ -429,7 +448,11 @@ buildStdenv.mkDerivation ({
cd mozobj
cd mozobj
'' ;
'' ;
postInstall = lib . optionalString buildStdenv . isLinux ''
postInstall = ''
# Install distribution customizations
install - Dvm644 $ { distributionIni } $ out/lib / $ { binaryName } /distribution/distribution.ini
'' + l i b . o p t i o n a l S t r i n g b u i l d S t d e n v . i s L i n u x ''
# Remove SDK cruft. FIXME: move to a separate output?
# Remove SDK cruft. FIXME: move to a separate output?
rm - rf $ out/share/idl $ out/include $ out/lib / $ { binaryName } - devel- *
rm - rf $ out/share/idl $ out/include $ out/lib / $ { binaryName } - devel- *