mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-18 03:29:17 +00:00
Introduce mkInstallable
This commit is contained in:
@@ -19,10 +19,11 @@
|
||||
inherit (pkgs) callPackage writeShellScriptBin;
|
||||
|
||||
buildSquooshRustCodec= callPackage (import ../../nix/squoosh-rust-builder) {fenix = fenix.packages.${system};};
|
||||
mkInstallable = callPackage (import ../../nix/mk-installable) {};
|
||||
|
||||
src = ./.;
|
||||
in
|
||||
{
|
||||
mkInstallable {
|
||||
packages = rec {
|
||||
default = rotate-squoosh;
|
||||
rotate-squoosh = buildSquooshRustCodec {
|
||||
@@ -33,17 +34,6 @@
|
||||
};
|
||||
wasmBindgen = null;
|
||||
};
|
||||
|
||||
installScript = writeShellScriptBin "install.sh" ''
|
||||
${pkgs.coreutils}/bin/mkdir -p wasm_build
|
||||
${pkgs.rsync}/bin/rsync --chmod=u+w -r ${self.packages.${system}.rotate-squoosh}/* wasm_build/
|
||||
'';
|
||||
};
|
||||
apps = {
|
||||
install = {
|
||||
type = "app";
|
||||
program = "${self.packages.${system}.installScript}/bin/install.sh";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user