File tree 2 files changed +38
-0
lines changed
tools/compression/mozlz4a
2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -1099,6 +1099,10 @@ with pkgs;
1099
1099
1100
1100
mongodb-tools = callPackage ../tools/misc/mongodb-tools { };
1101
1101
1102
+ mozlz4a = callPackage ../tools/compression/mozlz4a {
1103
+ pylz4 = python3Packages.lz4;
1104
+ };
1105
+
1102
1106
msr-tools = callPackage ../os-specific/linux/msr-tools { };
1103
1107
1104
1108
mstflint = callPackage ../tools/misc/mstflint { };
You can’t perform that action at this time.
0 commit comments