mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 10:56:56 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
42 lines
1.5 KiB
Nix
42 lines
1.5 KiB
Nix
{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, python3, substituteAll }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "wabt";
|
|
version = "1.0.20";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "WebAssembly";
|
|
repo = "wabt";
|
|
rev = version;
|
|
sha256 = "1wwyljppxz03slvgx809g87mdrglpimz4xaici71a9mqwjpgj0l8";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
cmakeFlags = [ "-DBUILD_TESTS=OFF" "-DCMAKE_PROJECT_VERSION=${version}" ];
|
|
buildInputs = [ python3 ];
|
|
|
|
meta = with lib; {
|
|
description = "The WebAssembly Binary Toolkit";
|
|
longDescription = ''
|
|
WABT (pronounced "wabbit") is a suite of tools for WebAssembly, including:
|
|
* wat2wasm: translate from WebAssembly text format to the WebAssembly
|
|
binary format
|
|
* wasm2wat: the inverse of wat2wasm, translate from the binary format
|
|
back to the text format (also known as a .wat)
|
|
* wasm-objdump: print information about a wasm binary. Similiar to
|
|
objdump.
|
|
* wasm-interp: decode and run a WebAssembly binary file using a
|
|
stack-based interpreter
|
|
* wat-desugar: parse .wat text form as supported by the spec interpreter
|
|
(s-expressions, flat syntax, or mixed) and print "canonical" flat
|
|
format
|
|
* wasm2c: convert a WebAssembly binary file to a C source and header
|
|
'';
|
|
homepage = "https://github.com/WebAssembly/wabt";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ekleog ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|