Skip to content

Commit

Permalink
python.buildEnv: only wrap executables
Browse files Browse the repository at this point in the history
  • Loading branch information
globin committed Aug 9, 2017
1 parent f4ca991 commit 4495bfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions pkgs/applications/virtualization/xen/packages.nix
Expand Up @@ -10,8 +10,6 @@ rec {
xen_4_5-vanilla = callPackage ./4.5.nix {
# At the very least included seabios and etherboot need gcc49,
# so we have to build all of it with gcc49.
stdenv = overrideCC stdenv gcc49;

meta = {
description = "vanilla";
longDescription = ''
Expand Down Expand Up @@ -60,8 +58,6 @@ rec {
xen_4_8-vanilla = callPackage ./4.8.nix {
# At the very least included seabios and etherboot need gcc49,
# so we have to build all of it with gcc49.
stdenv = overrideCC stdenv gcc49;

meta = {
description = "vanilla";
longDescription = ''
Expand Down
4 changes: 3 additions & 1 deletion pkgs/development/interpreters/python/wrapper.nix
Expand Up @@ -28,7 +28,9 @@ let
for prg in *; do
if [ -f "$prg" ]; then
rm -f "$out/bin/$prg"
makeWrapper "$path/bin/$prg" "$out/bin/$prg" --set PYTHONHOME "$out" --set PYTHONNOUSERSITE "true"
if [ -x "$prg" ]; then
makeWrapper "$path/bin/$prg" "$out/bin/$prg" --set PYTHONHOME "$out" --set PYTHONNOUSERSITE "true"
fi
fi
done
fi
Expand Down

4 comments on commit 4495bfe

@FRidh
Copy link
Member

@FRidh FRidh commented on 4495bfe Aug 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note the Xen changes in this commit. (No need to reply)

@globin
Copy link
Member Author

@globin globin commented on 4495bfe Aug 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah damn, those should not be there.. reverting.. Thanks for noticing :)

@globin
Copy link
Member Author

@globin globin commented on 4495bfe Aug 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FRidh
Copy link
Member

@FRidh FRidh commented on 4495bfe Aug 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking again I think the rm -f "$out/bin/$prg" should be inside the if. Now something can disappear from /bin. Then again, if its not executable then its a bug already. Which makes me wonder what makeWrapper encountered that it failed.

Please sign in to comment.