mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-17 19:19:47 +00:00
Move src to var
This commit is contained in:
@@ -28,13 +28,15 @@
|
|||||||
base = { };
|
base = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
src = lib.sources.sourceByRegex ./. [
|
||||||
|
"Makefile"
|
||||||
|
"enc(/.+)?"
|
||||||
|
];
|
||||||
|
|
||||||
builder = variantName: opts: {
|
builder = variantName: opts: {
|
||||||
mozjpeg-squoosh = buildSquooshCppCodec {
|
mozjpeg-squoosh = buildSquooshCppCodec {
|
||||||
name = "mozjpeg-squoosh";
|
name = "mozjpeg-squoosh";
|
||||||
src = lib.sources.sourceByRegex ./. [
|
inherit src;
|
||||||
"Makefile"
|
|
||||||
"enc(/.+)?"
|
|
||||||
];
|
|
||||||
MOZJPEG = self.packages.${system}."mozjpeg-${variantName}";
|
MOZJPEG = self.packages.${system}."mozjpeg-${variantName}";
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
|||||||
@@ -21,17 +21,19 @@
|
|||||||
fenix = fenix.packages.${system};
|
fenix = fenix.packages.${system};
|
||||||
};
|
};
|
||||||
squooshHelpers = callPackage (import ../../nix/squoosh-helpers) { };
|
squooshHelpers = callPackage (import ../../nix/squoosh-helpers) { };
|
||||||
inherit (squooshHelpers) mkRepoBinaryUpdater;
|
inherit (squooshHelpers) mkRepoBinaryUpdater forAllVariants;
|
||||||
|
|
||||||
|
variants = {
|
||||||
|
base = { };
|
||||||
|
};
|
||||||
|
|
||||||
src = lib.sources.sourceByRegex ./. [
|
src = lib.sources.sourceByRegex ./. [
|
||||||
"Cargo.*"
|
"Cargo.*"
|
||||||
".*\.rs"
|
"build\.rs"
|
||||||
"src"
|
"src(/.+)?"
|
||||||
];
|
];
|
||||||
in
|
|
||||||
mkRepoBinaryUpdater {
|
builder = variantName: opts: {
|
||||||
packages = rec {
|
|
||||||
default = resize-squoosh;
|
|
||||||
resize-squoosh = buildSquooshRustCodec {
|
resize-squoosh = buildSquooshRustCodec {
|
||||||
name = "resize-squoosh";
|
name = "resize-squoosh";
|
||||||
inherit src;
|
inherit src;
|
||||||
@@ -43,6 +45,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packageVariants = forAllVariants { inherit builder variants; };
|
||||||
|
in
|
||||||
|
mkRepoBinaryUpdater {
|
||||||
|
packages = packageVariants // {
|
||||||
|
default = packageVariants."resize-squoosh-base";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,16 +21,18 @@
|
|||||||
fenix = fenix.packages.${system};
|
fenix = fenix.packages.${system};
|
||||||
};
|
};
|
||||||
squooshHelpers = callPackage (import ../../nix/squoosh-helpers) { };
|
squooshHelpers = callPackage (import ../../nix/squoosh-helpers) { };
|
||||||
inherit (squooshHelpers) mkRepoBinaryUpdater;
|
inherit (squooshHelpers) mkRepoBinaryUpdater forAllVariants;
|
||||||
|
|
||||||
|
variants = {
|
||||||
|
base = { };
|
||||||
|
};
|
||||||
|
|
||||||
src = lib.sources.sourceByRegex ./. [
|
src = lib.sources.sourceByRegex ./. [
|
||||||
"Cargo\.*"
|
"Cargo\.*"
|
||||||
".*\.rs"
|
".*\.rs"
|
||||||
];
|
];
|
||||||
in
|
|
||||||
mkRepoBinaryUpdater {
|
builder = variantName: opts: {
|
||||||
packages = rec {
|
|
||||||
default = rotate-squoosh;
|
|
||||||
rotate-squoosh = buildSquooshRustCodec {
|
rotate-squoosh = buildSquooshRustCodec {
|
||||||
name = "rotate-squoosh";
|
name = "rotate-squoosh";
|
||||||
inherit src;
|
inherit src;
|
||||||
@@ -40,6 +42,13 @@
|
|||||||
wasmBindgen = null;
|
wasmBindgen = null;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packageVariants = forAllVariants { inherit builder variants; };
|
||||||
|
in
|
||||||
|
mkRepoBinaryUpdater {
|
||||||
|
packages = packageVariants // {
|
||||||
|
default = packageVariants."rotate-squoosh-base";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,17 +32,19 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
src = lib.sources.sourceByRegex ./. [
|
||||||
|
"Makefile"
|
||||||
|
"enc(/.+)?"
|
||||||
|
"dec(/.+)?"
|
||||||
|
];
|
||||||
|
|
||||||
builder =
|
builder =
|
||||||
variantName:
|
variantName:
|
||||||
{ simd }:
|
{ simd }:
|
||||||
{
|
{
|
||||||
"webp-squoosh" = buildSquooshCppCodec {
|
"webp-squoosh" = buildSquooshCppCodec {
|
||||||
name = "webp-squoosh-${variantName}";
|
name = "webp-squoosh-${variantName}";
|
||||||
src = lib.sources.sourceByRegex ./. [
|
inherit src;
|
||||||
"Makefile"
|
|
||||||
"enc(/.+)?"
|
|
||||||
"dec(/.+)?"
|
|
||||||
];
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgs.emscripten
|
pkgs.emscripten
|
||||||
self.packages.${system}."webp-${variantName}"
|
self.packages.${system}."webp-${variantName}"
|
||||||
|
|||||||
Reference in New Issue
Block a user