24 lines
611 B
Nix
24 lines
611 B
Nix
|
{ rustPlatform, python3, makeWrapper }:
|
||
|
let
|
||
|
pythonEnv = python3.withPackages (p: with p; [ requests ]);
|
||
|
in
|
||
|
|
||
|
rustPlatform.buildRustPackage rec {
|
||
|
pname = "iusb-spoof";
|
||
|
version = "0.1.0";
|
||
|
|
||
|
src = builtins.fetchGit {
|
||
|
url = "https://git.lix.systems/the-distro/iusb-spoof/";
|
||
|
rev = "a1ec0384e724f609bb8e391512a8fa76d9894e55";
|
||
|
};
|
||
|
|
||
|
cargoLock.lockFile = src + "/Cargo.lock";
|
||
|
|
||
|
nativeBuildInputs = [ makeWrapper ];
|
||
|
|
||
|
postInstall = ''
|
||
|
install -Dm644 $src/make-token.py $out/opt/make-token.py
|
||
|
makeWrapper ${pythonEnv.interpreter} $out/bin/make-token --add-flags "$out/opt/make-token.py"
|
||
|
'';
|
||
|
}
|