Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{stdenv, lib, fetchFromGitHub, xz, xar}: 2 3stdenv.mkDerivation rec { 4 pname = "pbzx"; 5 version = "1.0.2"; 6 src = fetchFromGitHub { 7 owner = "NiklasRosenstein"; 8 repo = "pbzx"; 9 rev = "v${version}"; 10 sha256 = "0bwd7wmnhpz1n5p39mh6asfyccj4cm06hwigslcwbb3pdwmvxc90"; 11 }; 12 buildInputs = [ xz xar ]; 13 buildPhase = '' 14 ${stdenv.cc.targetPrefix}cc pbzx.c -llzma -lxar -o pbzx 15 ''; 16 installPhase = '' 17 mkdir -p $out/bin 18 cp pbzx $out/bin 19 ''; 20 meta = with lib; { 21 description = "Stream parser of Apple's pbzx compression format"; 22 platforms = platforms.unix; 23 license = licenses.gpl3; 24 maintainers = [ maintainers.matthewbauer ]; 25 }; 26}