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
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

View File

@ -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

View File

@ -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";

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

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
if [ -z "$CARP" ]
then
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:
# $ chown root:wheel /proc/modules
# $ chown root:wheel /proc/kallsyms

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh
set -e;
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 -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
./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
./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