Remove optional builtins prefixes from prelude functions by running:
builtins=(
abort
baseNameOf
break
derivation
derivationStrict
dirOf
false
fetchGit
fetchMercurial
fetchTarball
fetchTree
fromTOML
import
isNull
map
null
placeholder
removeAttrs
scopedImport
throw
toString
true
)
fd \
--type file \
. \
pkgs \
--exec-batch sed --in-place --regexp-extended "
s/\<builtins\.($(
printf '%s\n' "${builtins[@]}" |
paste --delimiter '|' --serial -
))\>/\1/g
"
nix fmt
21 lines
400 B
Nix
21 lines
400 B
Nix
{
|
|
buildPythonPackage,
|
|
|
|
sentencepiece,
|
|
pkg-config,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sentencepiece";
|
|
format = "setuptools";
|
|
inherit (sentencepiece) version src;
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ sentencepiece.dev ];
|
|
|
|
sourceRoot = "${src.name}/python";
|
|
|
|
# sentencepiece installs 'bin' output.
|
|
meta = removeAttrs sentencepiece.meta [ "outputsToInstall" ];
|
|
}
|