Apply suggestions from code review that use patchShebangs instead of sed

Co-authored-by: Franz Pletz <fpletz@fnordicwalking.de>
This commit is contained in:
uima 2024-10-10 21:54:38 +08:00 committed by GitHub
parent daafc70f71
commit 484832887e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -224,10 +224,9 @@ in rec {
sha256 = "sha256-kIhJKgo1BDTeFyAPa//f/TrhPfV9Rfk9y4qMhIpCydk=";
};
nativeBuildInputs = [ pkgs.makeWrapper ];
buildInputs = [ pkgs.python3 ];
postInstall = ''
for f in extrakto.py extrakto_plugin.py; do
sed -i -e 's|#!/usr/bin/env python3|#!${pkgs.python3}/bin/python3|g' $target/$f
done
patchShebangs extrakto.py extrakto_plugin.py
wrapProgram $target/scripts/open.sh \
--prefix PATH : ${ with pkgs; lib.makeBinPath