nltk-data: store downloaded packages in correct locations
This commit is contained in:
parent
0807f6cbd3
commit
5e08b59977
|
@ -19,7 +19,7 @@ let
|
||||||
repo = "nltk_data";
|
repo = "nltk_data";
|
||||||
rev = "5db857e6f7df11eabb5e5665836db9ec8df07e28";
|
rev = "5db857e6f7df11eabb5e5665836db9ec8df07e28";
|
||||||
inherit hash;
|
inherit hash;
|
||||||
sparseCheckout = [ "${location}/${pname}.zip" ];
|
sparseCheckout = [ "packages/${location}/${pname}.zip" ];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
stdenvNoCC.mkDerivation (base // {
|
stdenvNoCC.mkDerivation (base // {
|
||||||
|
@ -29,8 +29,9 @@ let
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
unzip ${src}/${location}/${pname}.zip
|
unzip ${src}/packages/${location}/${pname}.zip
|
||||||
cp -R ${pname}/ $out/
|
mkdir -p $out/${location}
|
||||||
|
cp -R ${pname}/ $out/${location}
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
@ -39,12 +40,12 @@ in
|
||||||
lib.makeScope newScope (self: {
|
lib.makeScope newScope (self: {
|
||||||
punkt = makeNltkDataPackage ({
|
punkt = makeNltkDataPackage ({
|
||||||
pname = "punkt";
|
pname = "punkt";
|
||||||
location = "packages/tokenizers";
|
location = "tokenizers";
|
||||||
hash = "sha256-rMkgn3xzmSJNv8//kqbPF2Xq3Gf16lgA1Wx8FPYbaQo=";
|
hash = "sha256-rMkgn3xzmSJNv8//kqbPF2Xq3Gf16lgA1Wx8FPYbaQo=";
|
||||||
});
|
});
|
||||||
averaged_perceptron_tagger = makeNltkDataPackage ({
|
averaged_perceptron_tagger = makeNltkDataPackage ({
|
||||||
pname = "averaged_perceptron_tagger";
|
pname = "averaged_perceptron_tagger";
|
||||||
location = "packages/taggers";
|
location = "taggers";
|
||||||
hash = "sha256-ilTs4HWPUoHxQb4kWEy3wJ6QsE/98+EQya44gtV2inw=";
|
hash = "sha256-ilTs4HWPUoHxQb4kWEy3wJ6QsE/98+EQya44gtV2inw=";
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue