Files
nixpkgs/pkgs/by-name/tp/tpsecore/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

60 lines
1.1 KiB
Nix

{
lib,
fetchFromGitLab,
rustPlatform,
rustc,
wasm-pack,
wasm-bindgen-cli_0_2_95,
binaryen,
}:
let
version = "0.1.1";
in
rustPlatform.buildRustPackage {
pname = "tpsecore";
inherit version;
src = fetchFromGitLab {
owner = "UniQMG";
repo = "tpsecore";
rev = "v${version}";
hash = "sha256-+OynnLMBEiYwdFzxGzgkcBN6xrHoH1Q6O5i+OW7RBLo=";
};
cargoHash = "sha256-EM/THiR0NV4N3mFGjRYe1cpaF82rCYnOPLxv67BronU=";
nativeBuildInputs = [
wasm-pack
wasm-bindgen-cli_0_2_95
binaryen
rustc.llvmPackages.lld
];
buildPhase = ''
runHook preBuild
HOME=$(mktemp -d) wasm-pack build --target web --release
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r pkg/ $out
runHook postInstall
'';
doCheck = false;
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;
};
}