@@ -0,0 +1,34 @@
1+{stdenv, fetchurl, python3, pylz4}:
2+stdenv.mkDerivation rec {
3+ name = "${pname}-${version}";
4+ pname = "mozlz4a";
5+ version = "2015-07-24";
6+ # or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
7+ src = fetchurl {
8+ url = "https://gist.githubusercontent.com/Tblue/62ff47bef7f894e92ed5/raw/2483756c55ed34be565aea269f05bd5eeb6b0a33/mozlz4a.py";
9+ sha256 = "1y52zqkdyfacl2hr5adkjphgqfyfylp8ksrkh165bq48zlbf00s8";
10+ };
11+
12+ unpackPhase = "true;";
13+
14+ installPhase = ''
15+ mkdir -p "$out/bin" "$out/${python3.sitePackages}/"
16+ cp "${src}" "$out/${python3.sitePackages}/mozlz4a.py"
17+
18+ echo "#!${stdenv.shell}" >> "$out/bin/mozlz4a"
19+ echo "export PYTHONPATH='$PYTHONPATH'" >> "$out/bin/mozlz4a"
20+ echo "'${python3}/bin/python' '$out/${python3.sitePackages}/mozlz4a.py' \"\$@\"" >> "$out/bin/mozlz4a"
21+ chmod a+x "$out/bin/mozlz4a"
22+ '';
23+
24+ buildInputs = [ pylz4 python3 ];
25+
26+ meta = {
27+ inherit version;
28+ description = "A script to handle Mozilla's mozlz4 files";
29+ license = stdenv.lib.licenses.bsd2;
30+ maintainers = [stdenv.lib.maintainers.raskin];
31+ platforms = stdenv.lib.platforms.linux;
32+ homepage = "https://gist.githubusercontent.com/Tblue/62ff47bef7f894e92ed5";
33+ };
34+}