mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitLab,
|
|
nix-update-script,
|
|
rustPlatform,
|
|
rustc,
|
|
writableTmpDirAsHomeHook,
|
|
binaryen,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage {
|
|
pname = "tpsecore";
|
|
version = "0.1.1-unstable-2026-04-06";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "UniQMG";
|
|
repo = "tpsecore";
|
|
rev = "549767cac60df6f887f6012fa5d26ca12d55a2eb";
|
|
hash = "sha256-nnekiqs9W7oOl0/yjuQI83MsRgRZRrgipnwIbhRdLW8=";
|
|
};
|
|
|
|
cargoHash = "sha256-rJDy0gbtIGM5q6w0tfgIE09HW1lQ9pEL9o+LSdX6RyU=";
|
|
|
|
nativeBuildInputs = [
|
|
binaryen
|
|
rustc.llvmPackages.lld
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
|
|
cargo build --profile release \
|
|
--target wasm32-unknown-unknown --features wasm_rendering
|
|
|
|
runHook postBuild
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
cp target/wasm32-unknown-unknown/release/tpsecore.wasm $out/
|
|
cp tpsecore.js $out/
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
doCheck = false;
|
|
|
|
passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
|
|
|
|
meta = {
|
|
description = "Self contained toolkit for creating, editing, and previewing TPSE files";
|
|
homepage = "https://gitlab.com/UniQMG/tpsecore";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ huantian ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|