haskellPackages.shelly: fix test script execution

Due to the lack of /usr/bin/env we need to make the script executable
and throw patchShebangs against it /before/ tests are executed.
This commit is contained in:
sternenseemann 2023-07-11 18:56:03 +02:00
parent 58296ad355
commit fc97e60a59

View file

@ -341,6 +341,14 @@ self: super: builtins.intersectAttrs super {
gtksourceview2 = addPkgconfigDepend pkgs.gtk2 super.gtksourceview2;
gtk-traymanager = addPkgconfigDepend pkgs.gtk3 super.gtk-traymanager;
shelly = overrideCabal (drv: {
# /usr/bin/env is unavailable in the sandbox
preCheck = drv.preCheck or "" + ''
chmod +x ./test/data/*.sh
patchShebangs --build test/data
'';
}) super.shelly;
# Add necessary reference to gtk3 package
gi-dbusmenugtk3 = addPkgconfigDepend pkgs.gtk3 super.gi-dbusmenugtk3;