add regenpfeifer
This commit is contained in:
parent
14ad2dad47
commit
bb2c898d0d
3 changed files with 72 additions and 1 deletions
36
flake.lock
36
flake.lock
|
@ -209,6 +209,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"regenpfeifer": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1651954301,
|
||||
"narHash": "sha256-Gtgcw8jGmW2NEAJCQasazyTKJ5MbA84E7hTEYpqcF7U=",
|
||||
"owner": "mkrnr",
|
||||
"repo": "regenpfeifer",
|
||||
"rev": "95e1707076347b8e91912769b68eac54724bb519",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mkrnr",
|
||||
"repo": "regenpfeifer",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"clean-s3-cache": "clean-s3-cache",
|
||||
|
@ -222,7 +238,9 @@
|
|||
"nasin-nanpa": "nasin-nanpa",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-go116": "nixpkgs-go116",
|
||||
"plover": "plover"
|
||||
"plover": "plover",
|
||||
"regenpfeifer": "regenpfeifer",
|
||||
"wortformliste": "wortformliste"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
|
@ -239,6 +257,22 @@
|
|||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wortformliste": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1651954389,
|
||||
"narHash": "sha256-IvDPqI+FixG40upe919g6HG+oTOreWryJL+SpbUvduM=",
|
||||
"owner": "mkrnr",
|
||||
"repo": "wortformliste",
|
||||
"rev": "9a1b96e05baa3a78637a93abd2e818a9caf3db5d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mkrnr",
|
||||
"repo": "wortformliste",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -24,6 +24,10 @@
|
|||
nasin-nanpa.flake = false;
|
||||
plover.url = "github:openstenoproject/plover";
|
||||
plover.flake = false;
|
||||
regenpfeifer.url = "github:mkrnr/regenpfeifer";
|
||||
regenpfeifer.flake = false;
|
||||
wortformliste.url = "github:mkrnr/wortformliste";
|
||||
wortformliste.flake = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
|
|
@ -41,6 +41,39 @@ with pkgs; rec {
|
|||
};
|
||||
checkInputs = [pytest];
|
||||
};
|
||||
plover-regenpfeifer = with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
pname = "plover_regenpfeifer";
|
||||
version = "0.0.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mkrnr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-2KzVz8zsrRPU4zjlzyPYfBCWppfy73+nrT5RUKU/670=";
|
||||
};
|
||||
propagatedBuildInputs = [plover];
|
||||
};
|
||||
regenpfeifer-env = python3.buildEnv.override {
|
||||
extraLibs = with pkgs.python3Packages; [marisa-trie];
|
||||
};
|
||||
wortformliste = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "wortformliste";
|
||||
version = inputs.wortformliste.lastModifiedDate;
|
||||
src = inputs.wortformliste;
|
||||
|
||||
buildPhase = "true";
|
||||
installPhase = "cp wortformliste.csv $out";
|
||||
};
|
||||
regenpfeifer = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "regenpfeifer";
|
||||
version = inputs.regenpfeifer.lastModifiedDate;
|
||||
src = inputs.regenpfeifer;
|
||||
nativeBuildInputs = [regenpfeifer-env];
|
||||
buildPhase = ''
|
||||
python -m regenpfeifer.dictionary_generator ${wortformliste} $out unmatched.log 300000 300000
|
||||
'';
|
||||
installPhase = "cat unmatched.log";
|
||||
};
|
||||
plover = with python3Packages;
|
||||
qt5.mkDerivationWith buildPythonPackage rec {
|
||||
pname = "plover";
|
||||
|
|
Reference in a new issue