Skip to content

Commit 7c85eb1

Browse files
terlarnzbr
authored andcommitted
usbip: fix auto-attach script
The upstream script changed to a relative path based on the working directory. This patches the code to use the lookup by PATH instead.
1 parent d0b85c2 commit 7c85eb1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

modules/usbip.nix

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{ config, lib, pkgs, ... }:
22

33
let
4-
usbipd-win-auto-attach = pkgs.fetchurl {
5-
url = "https://raw.githubusercontent.com/dorssel/usbipd-win/v4.2.0/Usbipd/WSL/auto-attach.sh";
6-
hash = "sha256-AiXbRWwOy48mxQxxpWPtog7AAwL3mU3ZSHxrVuVk8/s=";
4+
usbipd-win-auto-attach = pkgs.substitute {
5+
src = pkgs.fetchurl {
6+
url = "https://raw.githubusercontent.com/dorssel/usbipd-win/v4.2.0/Usbipd/WSL/auto-attach.sh";
7+
hash = "sha256-AiXbRWwOy48mxQxxpWPtog7AAwL3mU3ZSHxrVuVk8/s=";
8+
};
9+
substitutions = [
10+
"--replace"
11+
"./usbip"
12+
"usbip"
13+
];
714
};
815

916
cfg = config.wsl.usbip;

0 commit comments

Comments
 (0)