forked from external-repos/squoosh
nixfmt
This commit is contained in:
@@ -21,57 +21,59 @@
|
||||
with pkgs;
|
||||
rec {
|
||||
packages.${system} = {
|
||||
default = stdenv.mkDerivation {
|
||||
name = "mozjpeg-squoosh";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [ emscripten packages.${system}.mozjpeg ];
|
||||
MOZJPEG = packages.${system}.mozjpeg;
|
||||
dontConfigure = true;
|
||||
buildPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
emmake make -j$(nproc)
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp enc/*.{wasm,js} $out
|
||||
'';
|
||||
};
|
||||
mozjpeg = stdenv.mkDerivation {
|
||||
name = "mozjpeg";
|
||||
src = mozjpeg;
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
emscripten
|
||||
pkg-config
|
||||
];
|
||||
configurePhase = ''
|
||||
# $HOME is required for Emscripten to work.
|
||||
# See: https://nixos.org/manual/nixpkgs/stable/#emscripten
|
||||
export HOME=$TMPDIR
|
||||
autoreconf -ifv
|
||||
emconfigure ./configure \
|
||||
--disable-shared \
|
||||
--without-turbojpeg \
|
||||
--without-simd \
|
||||
--without-arith-enc \
|
||||
--without-arith-dec \
|
||||
--with-build-date=squoosh \
|
||||
--prefix=$out
|
||||
'';
|
||||
buildPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
emmake make V=1 -j$(nproc) --trace
|
||||
'';
|
||||
installPhase = ''
|
||||
make install
|
||||
cp *.h $out/include
|
||||
cp rdswitch.o $out/lib
|
||||
'';
|
||||
dontFixup = true;
|
||||
|
||||
};
|
||||
default = stdenv.mkDerivation {
|
||||
name = "mozjpeg-squoosh";
|
||||
src = ./.;
|
||||
nativeBuildInputs = [
|
||||
emscripten
|
||||
packages.${system}.mozjpeg
|
||||
];
|
||||
MOZJPEG = packages.${system}.mozjpeg;
|
||||
dontConfigure = true;
|
||||
buildPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
emmake make -j$(nproc)
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp enc/*.{wasm,js} $out
|
||||
'';
|
||||
};
|
||||
mozjpeg = stdenv.mkDerivation {
|
||||
name = "mozjpeg";
|
||||
src = mozjpeg;
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
libtool
|
||||
emscripten
|
||||
pkg-config
|
||||
];
|
||||
configurePhase = ''
|
||||
# $HOME is required for Emscripten to work.
|
||||
# See: https://nixos.org/manual/nixpkgs/stable/#emscripten
|
||||
export HOME=$TMPDIR
|
||||
autoreconf -ifv
|
||||
emconfigure ./configure \
|
||||
--disable-shared \
|
||||
--without-turbojpeg \
|
||||
--without-simd \
|
||||
--without-arith-enc \
|
||||
--without-arith-dec \
|
||||
--with-build-date=squoosh \
|
||||
--prefix=$out
|
||||
'';
|
||||
buildPhase = ''
|
||||
export HOME=$TMPDIR
|
||||
emmake make V=1 -j$(nproc) --trace
|
||||
'';
|
||||
installPhase = ''
|
||||
make install
|
||||
cp *.h $out/include
|
||||
cp rdswitch.o $out/lib
|
||||
'';
|
||||
dontFixup = true;
|
||||
};
|
||||
};
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = [
|
||||
|
||||
Reference in New Issue
Block a user