summary refs log tree commit diff
path: root/pkgs/tools/compression/pbzx/default.nix
blob: 8a57d483ab28ec5d8a8d62ba4e9d012c8dd8bbdc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{stdenv, lib, fetchFromGitHub, xz, xar}:

stdenv.mkDerivation rec {
  pname = "pbzx";
  version = "1.0.2";
  src = fetchFromGitHub {
    owner = "NiklasRosenstein";
    repo = "pbzx";
    rev = "v${version}";
    sha256 = "0bwd7wmnhpz1n5p39mh6asfyccj4cm06hwigslcwbb3pdwmvxc90";
  };
  buildInputs = [ xz xar ];
  buildPhase = ''
    cc pbzx.c -llzma -lxar -o pbzx
  '';
  installPhase = ''
    mkdir -p $out/bin
    cp pbzx $out/bin
  '';
  meta = with lib; {
    description = "Stream parser of Apple's pbzx compression format";
    platforms = platforms.unix;
    license = licenses.gpl3;
    maintainers = [ maintainers.matthewbauer ];
  };
}