Skip to content

Commit f7bff16

Browse files
authored
fix: If src is a dir, assume the lean file has the full path (leanprover#2465)
It seems that before, if `$src` isn’t a file, but a directory, that it would contain `Bar.lean` directly, and not `Foo/Bar.lean`. This seemd odd and would not allow dependencies to be included easily.
1 parent 7ee7595 commit f7bff16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nix/buildLeanPackage.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ with builtins; let
158158
buildCommand = ''
159159
dir=$(dirname $relpath)
160160
mkdir -p $dir $out/$dir $ilean/$dir $c/$dir
161-
if [ -d $src ]; then cp -r $src/. $dir/; else cp $src $leanPath; fi
161+
if [ -d $src ]; then cp -r $src/. .; else cp $src $leanPath; fi
162162
lean -o $out/$oleanPath -i $ilean/$ileanPath -c $c/$cPath $leanPath $leanFlags $leanPluginFlags $leanLoadDynlibFlags
163163
'';
164164
}) // {

0 commit comments

Comments
 (0)