You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
606 B
Nix
33 lines
606 B
Nix
{ lib,
|
|
stdenvNoCC,
|
|
lzip,
|
|
python3,
|
|
makeWrapper }:
|
|
let
|
|
wrappedPath = lib.makeBinPath [ lzip ];
|
|
in stdenvNoCC.mkDerivation {
|
|
name = "waydroid_script";
|
|
|
|
buildInputs = [
|
|
(python3.withPackages(ps: with ps; [ tqdm requests inquirerpy ]))
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
];
|
|
|
|
src = ./.;
|
|
|
|
postPatch = ''
|
|
patchShebangs main.py
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/libexec
|
|
cp -r . $out/libexec/waydroid_script
|
|
mkdir -p $out/bin
|
|
makeShellWrapper $out/libexec/waydroid_script/main.py $out/bin/waydroid_script \
|
|
--prefix PATH : "${wrappedPath}"
|
|
'';
|
|
}
|