Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ fix ] make buildIdris nix function still work when there are more than one app directories in the build output #3385

Merged
merged 1 commit into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions nix/buildIdris.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ in rec {
# ^ remove after Idris2 0.8.0 is released. will be superfluous:
# https://github.com/idris-lang/Idris2/pull/3189
else
executable="$(idris2 --dump-ipkg-json ${ipkgFileName} | jq -r '.executable').so"
bin_name="$(idris2 --dump-ipkg-json ${ipkgFileName} | jq -r '.executable')"

cd build/exec/*_app
cd build/exec/''${bin_name}_app

rm -f ./libidris2_support.{so,dylib}

bin_name="''${executable%.so}"
executable="''${bin_name}.so"
mv -- "$executable" "$out/bin/$bin_name"

# remaining .so or .dylib files can be moved to lib directory
Expand Down
Loading