Fix nixpkgs build.

This commit is contained in:
Jorge Acereda 2020-11-14 15:28:17 +01:00
parent 3e7adb66e9
commit 46a0abe897
13 changed files with 20 additions and 19 deletions

View File

@ -6,9 +6,9 @@ sources:
- https://github.com/carp-lang/Carp - https://github.com/carp-lang/Carp
tasks: tasks:
- carp-build: | - carp-build: |
cd Carp cd Carp
stack build stack build
stack test stack test
- carp-test: | - carp-test: |
cd Carp cd Carp
bash ./run_carp_tests.sh --no_sdl scripts/run_carp_tests.sh --no_sdl

View File

@ -32,5 +32,4 @@ script:
- travis_wait stack setup --no-terminal - travis_wait stack setup --no-terminal
- travis_wait stack build --no-terminal - travis_wait stack build --no-terminal
- travis_wait stack test --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

View File

@ -19,12 +19,11 @@ let
, darwin, glfw3, SDL2, SDL2_image, SDL2_gfx, SDL2_mixer, SDL2_ttf , darwin, glfw3, SDL2, SDL2_image, SDL2_gfx, SDL2_mixer, SDL2_ttf
, ghc-prof-flamegraph , ghc-prof-flamegraph
, clang , makeWrapper , clang , makeWrapper
, libXext, libXcursor, libXinerama, libXi, libXrandr, libXScrnSaver, libXxf86vm, libpthreadstubs, libXdmcp, libGL , libXext, libXcursor, libXinerama, libXi, libXrandr, libXScrnSaver, libXxf86vm, libpthreadstubs, libXdmcp, libGL
}: }:
mkDerivation { mkDerivation {
pname = "CarpHask"; pname = "CarpHask";
version = "0.3.0.0"; version = "dev";
src = ./.; src = ./.;
inherit doCheck doBenchmark; inherit doCheck doBenchmark;
isLibrary = false; isLibrary = false;
@ -49,14 +48,17 @@ let
Carbon Cocoa IOKit CoreFoundation CoreVideo IOKit ForceFeedback Carbon Cocoa IOKit CoreFoundation CoreVideo IOKit ForceFeedback
]; ];
buildDepends = [ makeWrapper ]; buildDepends = [ makeWrapper ];
postPatch = ''
patchShebangs .
'';
postInstall = '' postInstall = ''
wrapProgram $out/bin/carp --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 wrapProgram $out/bin/carp-header-parse --set CARP_DIR $src --prefix PATH : ${clang}/bin
''; '';
testHaskellDepends = [ base containers HUnit ]; testHaskellDepends = [ base containers HUnit ];
testTarget = "CarpHask-test"; testTarget = "CarpHask-test";
postCheck = '' postCheck = ''
env CARP=dist/build/carp/carp ./run_carp_tests.sh env CARP=dist/build/carp/carp scripts/run_carp_tests.sh
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;
homepage = "https://github.com/eriksvedang/Carp"; homepage = "https://github.com/eriksvedang/Carp";

View File

@ -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 -e; # will make the script stop if there are any errors

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
if [ -z "$CARP" ] if [ -z "$CARP" ]
then then
if [ -z "$NIX_CC" ] if [ -z "$NIX_CC" ]

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
if [ -z "$CARP" ] if [ -z "$CARP" ]
then then
if [ -z "$NIX_CC" ] if [ -z "$NIX_CC" ]

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
# To enable the required permissions, execute the following sequence as root: # To enable the required permissions, execute the following sequence as root:
# $ chown root:wheel /proc/modules # $ chown root:wheel /proc/modules
# $ chown root:wheel /proc/kallsyms # $ chown root:wheel /proc/kallsyms

View File

@ -1,4 +1,4 @@
#! /usr/bin/env bash #! /usr/bin/env sh
# Usage: # Usage:
# #
# ./haskell-flamegraph <carp options> # ./haskell-flamegraph <carp options>

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
set -e; set -e;
name=$1 name=$1

View File

@ -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 -e; # will make the script stop if there are any errors
set -u; # will make the script stop if there is use of undefined set -u; # will make the script stop if there is use of undefined

View File

@ -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 # 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 ./scripts/carp.sh $1 --log-memory --check > test/output/$1.output.actual 2>&1

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/usr/bin/env sh
# Runs the executable and compares its output to the .expected file # Runs the executable and compares its output to the .expected file
./scripts/carp.sh $1 --log-memory -b && \ ./scripts/carp.sh $1 --log-memory -b && \

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env sh
carp $1 --log-memory -x > test/output/$1.output.expected 2>&1 carp $1 --log-memory -x > test/output/$1.output.expected 2>&1