1{ lib, stdenv, fetchFromGitHub }:
2
3stdenv.mkDerivation rec {
4 pname = "dejsonlz4";
5 version = "1.1";
6
7 src = fetchFromGitHub {
8 owner = "avih";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "0ggs69qamaama5mid07mhp95m1x42wljdb953lrwfr7p8p6f8czh";
12 };
13
14 buildPhase = ''
15 ${stdenv.cc.targetPrefix}cc -o dejsonlz4 src/dejsonlz4.c src/lz4.c
16 '';
17
18 installPhase = ''
19 mkdir -p $out/bin/
20 cp dejsonlz4 $out/bin/
21 '';
22
23 meta = with lib; {
24 description = "Decompress Mozilla Firefox bookmarks backup files";
25 homepage = "https://github.com/avih/dejsonlz4";
26 license = licenses.bsd2;
27 maintainers = with maintainers; [ mt-caret ];
28 platforms = platforms.all;
29 };
30}