Merge pull request #179094 from wackbyte/wasynth

wasynth: new package
This commit is contained in:
Anderson Torres 2022-07-02 19:47:40 -03:00 committed by GitHub
commit 2316901e93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 305 additions and 0 deletions

260
pkgs/development/tools/wasynth/Cargo.lock generated Normal file
View file

@ -0,0 +1,260 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "arbitrary"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a7924531f38b1970ff630f03eb20a2fde69db5c590c93b0f3482e95dcc5fd60"
dependencies = [
"derive_arbitrary",
]
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "cc"
version = "1.0.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
[[package]]
name = "codegen-luajit"
version = "0.11.0"
dependencies = [
"wasm-ast",
"wasmparser",
]
[[package]]
name = "codegen-luau"
version = "0.11.0"
dependencies = [
"wasm-ast",
"wasmparser",
]
[[package]]
name = "derive_arbitrary"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9a577516173adb681466d517d39bd468293bc2c2a16439375ef0f35bba45f3d"
dependencies = [
"proc-macro2 1.0.40",
"quote 1.0.20",
"syn 1.0.98",
]
[[package]]
name = "dev-test"
version = "0.11.0"
dependencies = [
"codegen-luajit",
"codegen-luau",
"libfuzzer-sys",
"test-generator",
"wasm-ast",
"wasm-smith",
"wast",
]
[[package]]
name = "flagset"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cda653ca797810c02f7ca4b804b40b8b95ae046eb989d356bce17919a8c25499"
[[package]]
name = "glob"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "hashbrown"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db0d4cf898abf0081f964436dc980e96670a0f36863e4b83aaacdb65c9d7ccc3"
[[package]]
name = "indexmap"
version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "leb128"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]]
name = "libfuzzer-sys"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "336244aaeab6a12df46480dc585802aa743a72d66b11937844c61bbca84c991d"
dependencies = [
"arbitrary",
"cc",
"once_cell",
]
[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "once_cell"
version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225"
[[package]]
name = "proc-macro2"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
dependencies = [
"unicode-xid",
]
[[package]]
name = "proc-macro2"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
dependencies = [
"proc-macro2 0.4.30",
]
[[package]]
name = "quote"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bcdf212e9776fbcb2d23ab029360416bb1706b1aea2d1a5ba002727cbcab804"
dependencies = [
"proc-macro2 1.0.40",
]
[[package]]
name = "syn"
version = "0.15.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
dependencies = [
"proc-macro2 0.4.30",
"quote 0.6.13",
"unicode-xid",
]
[[package]]
name = "syn"
version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd"
dependencies = [
"proc-macro2 1.0.40",
"quote 1.0.20",
"unicode-ident",
]
[[package]]
name = "test-generator"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ea97be90349ab3574f6e74d1566e1c5dd3a4bc74b89f4af4cc10ca010af103c0"
dependencies = [
"glob",
"proc-macro2 0.4.30",
"quote 0.6.13",
"syn 0.15.44",
]
[[package]]
name = "unicode-ident"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c"
[[package]]
name = "unicode-width"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
[[package]]
name = "wasm-ast"
version = "0.11.0"
dependencies = [
"wasmparser",
]
[[package]]
name = "wasm-encoder"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31f0c17267a5ffd6ae3d897589460e21db1673c84fb7016b909c9691369a75ea"
dependencies = [
"leb128",
]
[[package]]
name = "wasm-smith"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c85cf25be85aac46356216b4662eb5768347046449a45c938ae1443b788665bb"
dependencies = [
"arbitrary",
"flagset",
"indexmap",
"leb128",
"wasm-encoder",
"wasmparser",
]
[[package]]
name = "wasmparser"
version = "0.86.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bcbfe95447da2aa7ff171857fc8427513eb57c75a729bb190e974dc695e8f5c"
dependencies = [
"indexmap",
]
[[package]]
name = "wast"
version = "42.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "badcb03f976f983ff0daf294da9697be659442f61e6b0942bb37a2b6cbfe9dd4"
dependencies = [
"leb128",
"memchr",
"unicode-width",
"wasm-encoder",
]

View file

@ -0,0 +1,43 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "wasynth";
version = "0.11.0";
src = fetchFromGitHub {
owner = "Rerumu";
repo = "Wasynth";
rev = "v${version}";
sha256 = "sha256-QYWseogWHAjnNRi1OVtiJYOCxOLtHKjmlAd/U8Yv4tI=";
};
# A lock file isn't provided, so it must be added manually.
cargoLock.lockFile = ./Cargo.lock;
postPatch = ''
cp ${./Cargo.lock} Cargo.lock
'';
# Not all of the tests pass.
doCheck = false;
# These binaries are tests and should be removed.
postInstall = ''
rm $out/bin/{luajit,luau}_translate
'';
meta = with lib; {
description = "WebAssembly translation tools for various languages";
longDescription = ''
Wasynth provides the following WebAssembly translation tools:
* wasm2luajit: translate WebAssembly to LuaJIT source code
* wasm2luau: translate WebAssembly Luau source code
'';
homepage = "https://github.com/Rerumu/Wasynth";
license = with licenses; [ gpl3Only ];
maintainers = with maintainers; [ wackbyte ];
};
}

View file

@ -35302,6 +35302,8 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security;
};
wasynth = callPackage ../development/tools/wasynth { };
wavegain = callPackage ../applications/audio/wavegain { };
wcalc = callPackage ../applications/misc/wcalc { };