From 5160f287283297f7482ea6f99670cdd8be4617d2 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 4 May 2018 11:41:44 -0400 Subject: [PATCH] ofborg: stub in foo-bar and foo_bar commands --- default.nix | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 7a26556..53ac7a6 100644 --- a/default.nix +++ b/default.nix @@ -20,7 +20,30 @@ in { }; }; }; - in stripDeps build; + in pkgs.runCommand "ofborg-rs-symlink-compat" { + src = stripDeps build; + } '' + + set -x + + mkdir -p $out/bin + for f in $(find $src -type f); do + bn=$(basename "$f") + ln -s "$f" "$out/bin/$bn" + + # Rust 1.n? or Cargo starting outputting bins with dashes + # instead of underscores ... breaking all the callers. + if echo "$bn" | grep -q "-"; then + ln -s "$f" "$out/bin/$(echo "$bn" | tr '-' '_')" + fi + done + + test -e $out/bin/builder + test -e $out/bin/github_comment_filter + test -e $out/bin/github_comment_poster + test -e $out/bin/log_message_collector + test -e $out/bin/evaluation_filter + ''; ircbot = stripDeps ((pkgs.callPackage ./nix/ircbot-carnix.nix {}).ircbot {});