summary refs log tree commit diff
path: root/pkgs/build-support/rust/sysroot/cargo.py
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-11-08 02:05:25 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-11-08 20:38:59 +0000
commitc9c3de0131c565bf5a7f0e2249cd26f6e7acb172 (patch)
treea4964a437eecc083d4f95360d19de928c0888676 /pkgs/build-support/rust/sysroot/cargo.py
parentcbd00bab803b03cacbea27d442c60e719a804992 (diff)
downloadnixpkgs-c9c3de0131c565bf5a7f0e2249cd26f6e7acb172.tar
nixpkgs-c9c3de0131c565bf5a7f0e2249cd26f6e7acb172.tar.gz
nixpkgs-c9c3de0131c565bf5a7f0e2249cd26f6e7acb172.tar.bz2
nixpkgs-c9c3de0131c565bf5a7f0e2249cd26f6e7acb172.tar.lz
nixpkgs-c9c3de0131c565bf5a7f0e2249cd26f6e7acb172.tar.xz
nixpkgs-c9c3de0131c565bf5a7f0e2249cd26f6e7acb172.tar.zst
nixpkgs-c9c3de0131c565bf5a7f0e2249cd26f6e7acb172.zip
Update script as rust-src layout has changed
Use stub lib so `core` and `alloc` are handled symmetrically.
Diffstat (limited to 'pkgs/build-support/rust/sysroot/cargo.py')
-rw-r--r--pkgs/build-support/rust/sysroot/cargo.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/pkgs/build-support/rust/sysroot/cargo.py b/pkgs/build-support/rust/sysroot/cargo.py
index 09f6fba6d1c..9d970eff79e 100644
--- a/pkgs/build-support/rust/sysroot/cargo.py
+++ b/pkgs/build-support/rust/sysroot/cargo.py
@@ -6,7 +6,7 @@ orig_cargo = os.environ['ORIG_CARGO'] if 'ORIG_CARGO' in os.environ else None
 
 base = {
   'package': {
-    'name': 'alloc',
+    'name': 'nixpkgs-sysroot-stub-crate',
     'version': '0.0.0',
     'authors': ['The Rust Project Developers'],
     'edition': '2018',
@@ -17,17 +17,19 @@ base = {
       'features': ['rustc-dep-of-std', 'mem'],
     },
     'core': {
-      'path': os.path.join(rust_src, 'libcore'),
+      'path': os.path.join(rust_src, 'core'),
+    },
+    'alloc': {
+      'path': os.path.join(rust_src, 'alloc'),
     },
-  },
-  'lib': {
-    'name': 'alloc',
-    'path': os.path.join(rust_src, 'liballoc/lib.rs'),
   },
   'patch': {
     'crates-io': {
       'rustc-std-workspace-core': {
-        'path': os.path.join(rust_src, 'tools/rustc-std-workspace-core'),
+        'path': os.path.join(rust_src, 'rustc-std-workspace-core'),
+      },
+      'rustc-std-workspace-alloc': {
+        'path': os.path.join(rust_src, 'rustc-std-workspace-alloc'),
       },
     },
   },