about summary refs log tree commit diff
path: root/pkgs/build-support/rust/build-rust-crate/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/rust/build-rust-crate/default.nix')
-rw-r--r--pkgs/build-support/rust/build-rust-crate/default.nix17
1 files changed, 2 insertions, 15 deletions
diff --git a/pkgs/build-support/rust/build-rust-crate/default.nix b/pkgs/build-support/rust/build-rust-crate/default.nix
index db7f72acfb99..a11cef9f1f46 100644
--- a/pkgs/build-support/rust/build-rust-crate/default.nix
+++ b/pkgs/build-support/rust/build-rust-crate/default.nix
@@ -115,8 +115,7 @@ stdenv.mkDerivation (rec {
 
     crateBin = if crate ? crateBin then
        builtins.foldl' (bins: bin: let
-            _name = (if bin ? name then bin.name else crateName);
-            name = lib.strings.replaceStrings ["-"] ["_"] _name;
+            name = (if bin ? name then bin.name else crateName);
             path = if bin ? path then bin.path else "";
           in
           bins + (if bin == "" then "" else ",") + "${name} ${path}"
@@ -124,18 +123,6 @@ stdenv.mkDerivation (rec {
        ) "" crate.crateBin
     else "";
 
-    finalBins = if crate ? crateBin then
-       builtins.foldl' (bins: bin:
-          let name = lib.strings.replaceStrings ["-"] ["_"]
-                      (if bin ? name then bin.name else crateName);
-              new_name = if bin ? name then bin.name else crateName;
-          in
-          if name == new_name then bins else
-          (bins + "mv target/bin/${name} target/bin/${new_name};")
-
-       ) "" crate.crateBin
-    else "";
-
     build = crate.build or "";
     workspace_member = crate.workspace_member or ".";
     crateVersion = crate.version;
@@ -156,7 +143,7 @@ stdenv.mkDerivation (rec {
     buildPhase = buildCrate {
       inherit crateName dependencies
               crateFeatures libName release libPath crateType
-              metadata crateBin finalBins verbose colors
+              metadata crateBin verbose colors
               extraRustcOpts;
     };
     installPhase = installCrate crateName metadata;