mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +00:00
tmp
This commit is contained in:
22
README.md
22
README.md
@@ -15,6 +15,8 @@ However, Squoosh utilizes Google Analytics to collect the following:
|
||||
|
||||
# Developing
|
||||
|
||||
## Web App
|
||||
|
||||
To develop for Squoosh:
|
||||
|
||||
1. Clone the repository
|
||||
@@ -31,8 +33,28 @@ To develop for Squoosh:
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Codecs
|
||||
|
||||
All build instructions for codecs are written using [Nix]. If you have Nix installed, you can rebuild the WebAssembly binaries by running:
|
||||
|
||||
```sh
|
||||
# Build the codec
|
||||
cd codec/<codec>
|
||||
nix run '.#updateRepoBinaries'
|
||||
```
|
||||
|
||||
If you do not have Nix installed, you can use the provided Docker image to create a shell with nix available:
|
||||
|
||||
```sh
|
||||
# Build the image (only needs to be done once).
|
||||
docker build -t squoosh-nix ./nix
|
||||
docker run --name squoosh-nix -ti -v $PWD:/app squoosh-nix /bin/sh
|
||||
# ... continue with the steps above
|
||||
```
|
||||
|
||||
# Contributing
|
||||
|
||||
Squoosh is an open-source project that appreciates all community involvement. To contribute to the project, follow the [contribute guide](/CONTRIBUTING.md).
|
||||
|
||||
[squoosh]: https://squoosh.app
|
||||
[nix]: https://nixos.org
|
||||
|
||||
10
nix/Dockerfile
Normal file
10
nix/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM nixos/nix:2.24.5
|
||||
|
||||
RUN <<EOF
|
||||
cat >> /etc/nix/nix.conf << EOL
|
||||
experimental-features = nix-command flakes
|
||||
EOL
|
||||
EOF
|
||||
|
||||
WORKDIR /app
|
||||
CMD ["nix", "run", ".#updateRepoBinaries"]
|
||||
@@ -2,7 +2,10 @@
|
||||
rustPlatform,
|
||||
jq,
|
||||
rsync,
|
||||
lib,
|
||||
stdenv,
|
||||
# openssl,
|
||||
pkg-config,
|
||||
fenix,
|
||||
}:
|
||||
{
|
||||
@@ -40,6 +43,11 @@
|
||||
toolchain
|
||||
jq
|
||||
rsync
|
||||
pkg-config
|
||||
# (lib.getDev openssl)
|
||||
];
|
||||
buildInputs = [
|
||||
# openssl
|
||||
];
|
||||
dontConfigure = true;
|
||||
buildPhase = ''
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
fetchCrate,
|
||||
rustPlatform,
|
||||
curl,
|
||||
stdenv,
|
||||
openssl_1_1,
|
||||
pkg-config,
|
||||
darwin,
|
||||
}:
|
||||
rec {
|
||||
@@ -21,10 +24,15 @@ rec {
|
||||
rustPlatform.buildRustPackage {
|
||||
name = "wasm-bindgen-cli";
|
||||
inherit src cargoLock;
|
||||
buildInputs = [
|
||||
curl
|
||||
darwin.apple_sdk.frameworks.Security
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
openssl_1_1
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.IOKit
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user