python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / security / snowcrash / default.nix
blobbe4380cb9188b11427f70be3893522955a172959
1 { lib
2 , stdenv
3 , buildGoModule
4 , fetchFromGitHub
5 , fetchpatch
6 }:
8 buildGoModule rec {
9   pname = "snowcrash";
10   version = "unstable-2021-04-29";
12   src = fetchFromGitHub {
13     owner = "redcode-labs";
14     repo = "SNOWCRASH";
15     rev = "514cceea1ca82f44e0c8a8744280f3a16abb6745";
16     sha256 = "sha256-jQrd7sluDd9eC4VdNtxvGct7Y4Y3zOylc4y2n6Kz4Zo=";
17   };
19   patches = [
20     (fetchpatch {
21       name = "update-x-sys-for-go-1.18-on-aarch64-darwin.patch";
22       url = "https://github.com/redcode-labs/SNOWCRASH/commit/24eefdcc944ade0cf435f7f35dee59ef3f0497fd.patch";
23       sha256 = "sha256-UXk7cMyEVAVcOkELcC9TlQNppZOXIvn6DBYu1j2iVNg=";
24     })
25   ];
27   vendorSha256 = "sha256-WTDE+MYL8CjeNvGHRNiMgBFrydDJWIcG8TYvbQTH/6o=";
29   subPackages = [ "." ];
31   postFixup = lib.optionals (!stdenv.isDarwin) ''
32     mv $out/bin/SNOWCRASH $out/bin/${pname}
33   '';
35   meta = with lib; {
36     description = "Polyglot payload generator";
37     homepage = "https://github.com/redcode-labs/SNOWCRASH";
38     license = with licenses; [ mit ];
39     maintainers = with maintainers; [ fab ] ++ teams.redcodelabs.members;
40     mainProgram = "SNOWCRASH";
41   };