File tree Expand file tree Collapse file tree 10 files changed +525
-185
lines changed Expand file tree Collapse file tree 10 files changed +525
-185
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"rust-analyzer.linkedProjects" : [
3
- " scripts/native-systemd-shim /Cargo.toml"
3
+ " scripts/native-utils /Cargo.toml"
4
4
],
5
5
"workbench.colorCustomizations" : {
6
6
"commandCenter.border" : " #e7e7e799" ,
Original file line number Diff line number Diff line change 58
58
username = pkgs . callPackage ./checks/username.nix args ;
59
59
} ;
60
60
61
- packages . staticShim = pkgs . pkgsStatic . callPackage ./scripts/native-systemd-shim/shim.nix { } ;
61
+ packages . staticShim = pkgs . pkgsStatic . callPackage ./scripts/native-utils { } ;
62
62
63
63
devShell = pkgs . mkShell {
64
64
RUST_SRC_PATH = "${ pkgs . rust . packages . stable . rustPlatform . rustLibSrc } " ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ with lib; {
26
26
defaultUser = config . users . users . ${ cfg . defaultUser } ;
27
27
} ;
28
28
29
- shim = pkgs . callPackage ../scripts/native-systemd-shim/shim.nix { } ;
29
+ nativeUtils = pkgs . callPackage ../scripts/native-utils { } ;
30
30
31
31
bashWrapper = pkgs . runCommand "nixos-wsl-bash-wrapper" { nativeBuildInputs = [ pkgs . makeWrapper ] ; } ''
32
32
makeWrapper ${ pkgs . bashInteractive } /bin/sh $out/bin/sh --prefix PATH ':' ${ lib . makeBinPath [ pkgs . systemd pkgs . gnugrep ] }
@@ -159,7 +159,7 @@ with lib; {
159
159
shimSystemd = stringAfter [ ] ''
160
160
echo "setting up /sbin/init shim..."
161
161
mkdir -p /sbin
162
- ln -sf ${ shim } /bin/nixos-wsl-native- systemd-shim /sbin/init
162
+ ln -sf ${ nativeUtils } /bin/systemd-shim /sbin/init
163
163
'' ;
164
164
setupLogin = stringAfter [ ] ''
165
165
echo "setting up /bin/login..."
@@ -172,10 +172,7 @@ with lib; {
172
172
# preserve $PATH from parent
173
173
variables . PATH = [ "$PATH" ] ;
174
174
extraInit = ''
175
- export WSLPATH=$(echo "$PATH" | tr ':' '\0' | command grep -az "^${ cfg . wslConf . automount . root } " | tr '\0' ':')
176
- ${ if cfg . interop . includePath then "" else ''
177
- export PATH=$(echo "$PATH" | tr ':' '\0' | command grep -avz "^${ cfg . wslConf . automount . root } " | tr '\0' ':')
178
- '' }
175
+ eval $(${ nativeUtils } /bin/split-path --automount-root="${ cfg . wslConf . automount . root } " ${ lib . optionalString cfg . interop . includePath "--include-interop" } )
179
176
'' ;
180
177
} ;
181
178
} )
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments