nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 rustPlatform,
5 openssl,
6 elfutils,
7 makeBinaryWrapper,
8 pkg-config,
9 xz,
10}:
11
12rustPlatform.buildRustPackage rec {
13 pname = "pwninit";
14 version = "3.3.1";
15
16 src = fetchFromGitHub {
17 owner = "io12";
18 repo = "pwninit";
19 rev = version;
20 sha256 = "sha256-tbZS7PdRFvO2ifoHA/w3cSPfqqHrLeLHAg6V8oG9gVE=";
21 };
22
23 buildInputs = [
24 openssl
25 xz
26 ];
27 nativeBuildInputs = [
28 pkg-config
29 makeBinaryWrapper
30 ];
31 postInstall = ''
32 wrapProgram $out/bin/pwninit \
33 --prefix PATH : "${lib.getBin elfutils}/bin"
34 '';
35 doCheck = false; # there are no tests to run
36
37 cargoHash = "sha256-N0vje5ZU7B++f71BJKwkEfpbInpermH241f6oP1/fQE=";
38
39 meta = {
40 description = "Automate starting binary exploit challenges";
41 mainProgram = "pwninit";
42 homepage = "https://github.com/io12/pwninit";
43 license = lib.licenses.mit;
44 maintainers = [ lib.maintainers.scoder12 ];
45 platforms = lib.platforms.all;
46 };
47}