diff options
author | Paul Tsupikoff <goodsoft@goodsoft.lv> | 2019-04-18 22:37:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 22:37:30 +0300 |
commit | 0d9575ced8197dd8089686ad4ad91ec6dc5bee98 (patch) | |
tree | ba26de97ccd5fad3f2e9c1f9dbffeedf7dea6f0a /pkgs/development/beam-modules/mix-bootstrap | |
parent | 8bb785c3b1a26d303eaedfd8a8ed872646ca34e7 (diff) | |
download | nixpkgs-0d9575ced8197dd8089686ad4ad91ec6dc5bee98.tar nixpkgs-0d9575ced8197dd8089686ad4ad91ec6dc5bee98.tar.gz nixpkgs-0d9575ced8197dd8089686ad4ad91ec6dc5bee98.tar.bz2 nixpkgs-0d9575ced8197dd8089686ad4ad91ec6dc5bee98.tar.lz nixpkgs-0d9575ced8197dd8089686ad4ad91ec6dc5bee98.tar.xz nixpkgs-0d9575ced8197dd8089686ad4ad91ec6dc5bee98.tar.zst nixpkgs-0d9575ced8197dd8089686ad4ad91ec6dc5bee98.zip |
buildMix: fix bootstrapping packages with hyphens in version
I'm using `buildMix` to build a package, which has a dependency with a hyphen in its version: `dialyxir-1.0.0-rc6`. Due to `mix-bootstrap` using `string:tokens` the dependency ends up in `_build/prod/lib/dyalyxir1.0.0rc6` instead of `_build/prod/lib/dialyxir`. Here I'm fixing it to use `string:split`, which splits by first hyphen only, and returns an array with no more than two elements.
Diffstat (limited to 'pkgs/development/beam-modules/mix-bootstrap')
-rwxr-xr-x | pkgs/development/beam-modules/mix-bootstrap | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/beam-modules/mix-bootstrap b/pkgs/development/beam-modules/mix-bootstrap index 6c9a20c6de2..d7a912ee1ed 100755 --- a/pkgs/development/beam-modules/mix-bootstrap +++ b/pkgs/development/beam-modules/mix-bootstrap @@ -40,7 +40,7 @@ main(Args) -> -spec fixup_app_name(file:name()) -> string(). fixup_app_name(Path) -> BaseName = filename:basename(Path), - case string:tokens(BaseName, "-") of + case string:split(BaseName, "-") of [Name, _Version] -> Name; Name -> Name end. |