diff --git a/.build.yml b/.build.yml index fd526949..ce37a4b1 100644 --- a/.build.yml +++ b/.build.yml @@ -6,9 +6,9 @@ sources: - https://github.com/carp-lang/Carp tasks: - carp-build: | - cd Carp + cd Carp stack build stack test - carp-test: | cd Carp - bash ./run_carp_tests.sh --no_sdl + scripts/run_carp_tests.sh --no_sdl diff --git a/.travis.yml b/.travis.yml index 02c95f63..c76f543b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,5 +32,4 @@ script: - travis_wait stack setup --no-terminal - travis_wait stack build --no-terminal - travis_wait stack test --no-terminal - - travis_wait ./run_carp_tests.sh --no_sdl - + - travis_wait scripts/run_carp_tests.sh --no_sdl diff --git a/default.nix b/default.nix index 8df63de8..c9b01899 100644 --- a/default.nix +++ b/default.nix @@ -19,12 +19,11 @@ let , darwin, glfw3, SDL2, SDL2_image, SDL2_gfx, SDL2_mixer, SDL2_ttf , ghc-prof-flamegraph , clang , makeWrapper - , libXext, libXcursor, libXinerama, libXi, libXrandr, libXScrnSaver, libXxf86vm, libpthreadstubs, libXdmcp, libGL }: mkDerivation { pname = "CarpHask"; - version = "0.3.0.0"; + version = "dev"; src = ./.; inherit doCheck doBenchmark; isLibrary = false; @@ -49,14 +48,17 @@ let Carbon Cocoa IOKit CoreFoundation CoreVideo IOKit ForceFeedback ]; buildDepends = [ makeWrapper ]; + postPatch = '' + patchShebangs . + ''; postInstall = '' - wrapProgram $out/bin/carp --set CARP_DIR $src --prefix PATH : ${clang}/bin - wrapProgram $out/bin/carp-header-parse --set CARP_DIR $src --prefix PATH : ${clang}/bin + wrapProgram $out/bin/carp --set CARP_DIR $src --prefix PATH : ${clang}/bin + wrapProgram $out/bin/carp-header-parse --set CARP_DIR $src --prefix PATH : ${clang}/bin ''; testHaskellDepends = [ base containers HUnit ]; testTarget = "CarpHask-test"; postCheck = '' - env CARP=dist/build/carp/carp ./run_carp_tests.sh + env CARP=dist/build/carp/carp scripts/run_carp_tests.sh ''; enableParallelBuilding = true; homepage = "https://github.com/eriksvedang/Carp"; diff --git a/scripts/benchmarks.sh b/scripts/benchmarks.sh index 43252a87..b79262b5 100755 --- a/scripts/benchmarks.sh +++ b/scripts/benchmarks.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh set -e; # will make the script stop if there are any errors diff --git a/scripts/build.sh b/scripts/build.sh index ffc440b1..e25d5b76 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh if [ -z "$CARP" ] then if [ -z "$NIX_CC" ] diff --git a/scripts/carp.sh b/scripts/carp.sh index 5c4cd9f1..446cfaa4 100755 --- a/scripts/carp.sh +++ b/scripts/carp.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh if [ -z "$CARP" ] then if [ -z "$NIX_CC" ] diff --git a/scripts/flamegraph.sh b/scripts/flamegraph.sh index 28cbef1f..68c55086 100755 --- a/scripts/flamegraph.sh +++ b/scripts/flamegraph.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # To enable the required permissions, execute the following sequence as root: # $ chown root:wheel /proc/modules # $ chown root:wheel /proc/kallsyms diff --git a/scripts/haskell-flamegraph.sh b/scripts/haskell-flamegraph.sh index a40a34b6..3a437a9d 100755 --- a/scripts/haskell-flamegraph.sh +++ b/scripts/haskell-flamegraph.sh @@ -1,4 +1,4 @@ -#! /usr/bin/env bash +#! /usr/bin/env sh # Usage: # # ./haskell-flamegraph diff --git a/scripts/release.sh b/scripts/release.sh index e905e39e..b0a912ce 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh set -e; name=$1 diff --git a/scripts/run_carp_tests.sh b/scripts/run_carp_tests.sh index 533927f7..b2a4dfd7 100755 --- a/scripts/run_carp_tests.sh +++ b/scripts/run_carp_tests.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh set -e; # will make the script stop if there are any errors set -u; # will make the script stop if there is use of undefined diff --git a/test/check.sh b/test/check.sh index f3a0d0ab..e9c275c9 100755 --- a/test/check.sh +++ b/test/check.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # Checks the code (using --check) and compares the output to the .expected file ./scripts/carp.sh $1 --log-memory --check > test/output/$1.output.actual 2>&1 diff --git a/test/execute.sh b/test/execute.sh index 0ebe26af..1b97cfee 100755 --- a/test/execute.sh +++ b/test/execute.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # Runs the executable and compares its output to the .expected file ./scripts/carp.sh $1 --log-memory -b && \ diff --git a/test/record.sh b/test/record.sh index 52499fa4..7a62e54a 100755 --- a/test/record.sh +++ b/test/record.sh @@ -1,3 +1,3 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh carp $1 --log-memory -x > test/output/$1.output.expected 2>&1