summary refs log tree commit diff
path: root/pkgs/tools/compression/dejsonlz4/default.nix
blob: 0dd703035fa97350ef9049d5ba6419f73738622f (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
27
28
29
30
{ lib, stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
  pname = "dejsonlz4";
  version = "1.1";

  src = fetchFromGitHub {
    owner = "avih";
    repo = pname;
    rev = "v${version}";
    sha256 = "0ggs69qamaama5mid07mhp95m1x42wljdb953lrwfr7p8p6f8czh";
  };

  buildPhase = ''
    ${stdenv.cc.targetPrefix}cc -o dejsonlz4 src/dejsonlz4.c src/lz4.c
  '';

  installPhase = ''
    mkdir -p $out/bin/
    cp dejsonlz4 $out/bin/
  '';

  meta = with lib; {
    description = "Decompress Mozilla Firefox bookmarks backup files";
    homepage = "https://github.com/avih/dejsonlz4";
    license = licenses.bsd2;
    maintainers = with maintainers; [ mt-caret ];
    platforms = platforms.all;
  };
}