diff options
author | Aleksana <me@aleksana.moe> | 2024-05-06 22:56:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-06 22:56:00 +0800 |
commit | 97ae4fc7508449a4cc4c209a09345d72ce78c0d0 (patch) | |
tree | b553197cf57273f5e570f54fc903cef1047a9de4 /pkgs/by-name/wi | |
parent | 21b089641d73db6ebbe0904086f4b0eb45fa1b97 (diff) | |
parent | 1271860b5eb39783f3bba73bcebc9592da2d181f (diff) |
Merge pull request #308863 from lucperkins/move-into-by-name
treewide: move packages maintained by lucperkins to pkgs/by-name
Diffstat (limited to 'pkgs/by-name/wi')
-rw-r--r-- | pkgs/by-name/wi/wizer/package.nix | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/by-name/wi/wizer/package.nix b/pkgs/by-name/wi/wizer/package.nix new file mode 100644 index 0000000000000..7a46d673af9c9 --- /dev/null +++ b/pkgs/by-name/wi/wizer/package.nix @@ -0,0 +1,45 @@ +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, testers +, wizer +}: + +rustPlatform.buildRustPackage rec { + pname = "wizer"; + version = "6.0.0"; + + # the crate does not contain files which are necessary for the tests + # see https://github.com/bytecodealliance/wizer/commit/3a95e27ce42f1fdaef07b52988e4699eaa221e04 + src = fetchFromGitHub { + owner = "bytecodealliance"; + repo = "wizer"; + rev = "refs/tags/v${version}"; + hash = "sha256-JQrZysQJOM4G5EwyBlXXd7NTCCoGkOLDahwH0I1b0TY="; + }; + + cargoHash = "sha256-qMBsk8dLmneAYx8FJ9QqW0kLKFTn11EvV9VeVJkr5FU="; + + cargoBuildFlags = [ "--bin" pname ]; + + buildFeatures = [ "env_logger" "structopt" ]; + + # Setting $HOME to a temporary directory is necessary to prevent checks from failing, as + # the test suite creates a cache directory at $HOME/Library/Caches/BytecodeAlliance.wasmtime. + preCheck = '' + export HOME=$(mktemp -d) + ''; + + passthru.tests = { + version = testers.testVersion { package = wizer; }; + }; + + meta = with lib; { + description = "The WebAssembly pre-initializer"; + mainProgram = "wizer"; + homepage = "https://github.com/bytecodealliance/wizer"; + license = licenses.asl20; + maintainers = with maintainers; [ lucperkins amesgen ]; + }; +} |