Update resize codec build

This commit is contained in:
Surma
2024-09-06 17:54:54 +01:00
parent 738d07d98a
commit 4f93abb105
5 changed files with 48 additions and 164 deletions

View File

@@ -2,45 +2,37 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/24.05";
flake-utils.url = "github:numtide/flake-utils";
wasm-bindgen = {
url = "path:../../nix/wasm-bindgen";
inputs.nixpkgs.follows = "nixpkgs";
};
rust-helpers = {
url = "path:../../nix/rust-helpers";
inputs.nixpkgs.follows = "nixpkgs";
};
squoosh-codec-builders = {
url = "path:../../nix/squoosh-codec-builders";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-helpers.follows = "rust-helpers";
inputs.wasm-bindgen.follows = "wasm-bindgen";
};
fenix.url = "github:nix-community/fenix/7bad6c7ff73b784a9c7de9147626c8d5d5072809";
};
outputs =
{
self,
nixpkgs,
flake-utils,
squoosh-codec-builders,
...
fenix,
}:
flake-utils.lib.eachDefaultSystem (
system:
with nixpkgs.legacyPackages.${system};
let
pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs) callPackage writeShellScriptBin;
squooshCodecBuilders = callPackage (import ../../nix/squoosh-codec-builders) {fenix = fenix.packages.${system};};
src = ./.;
in
{
packages = rec {
default = resize-squoosh;
resize-squoosh = squoosh-codec-builders.lib.buildSquooshCodecRust {
resize-squoosh = squooshCodecBuilders.buildSquooshCodecRust {
name = "resize-squoosh";
inherit system src;
cargoLock = {
lockFile = "${src}/Cargo.lock";
};
wasmBindgenSha = "sha256-HTElSB76gqCpDu8S0ZJlfd/S4ftMrbwxFgJM9OXBRz8=";
wasmBindgen = {
sha256 = "sha256-HTElSB76gqCpDu8S0ZJlfd/S4ftMrbwxFgJM9OXBRz8=";
};
};
installScript = writeShellScriptBin "install.sh" ''