-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dependencies installed using Nix if possible
All development dependencies should be managed using Nix to ensure reproducibility. For ease of use, the Nix dependencies are implicitly used by all scripts. This may cause a noticeable performance hit if Nix is installed. The dependencies are assumed to be correctly installed if the environment variable `IN_MINILUA_NIX_SHELL` is set to a non-empty value (`nix-shell` exports this automatically). Hence, it's recommended to use the default Nix workflow of developing inside a `nix-shell` to eliminate this performance overhead. Note that `shell.nix` was reformatted using `alejandra` (an uncompromising Nix formatter) to adhere to standard Nix conventions (e.g. spaces instead of tabs).
- Loading branch information
Showing
11 changed files
with
52 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
source "$(dirname "${BASH_SOURCE[0]}")/_env.sh" | ||
|
||
# common variables used by multiple scripts | ||
FILES=$(find \( -path './build*' -prune -false \) -or \( -path './extern*' -prune -false \) -or -name '*.cpp' -or -name '*.hpp') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
export MAKEFLAGS=-j4 | ||
|
||
# Install dependencies using Nix, if installed. | ||
if command -v nix >/dev/null && [ -n "IN_MINILUA_NIX_SHELL" ] | ||
then | ||
. <(nix print-dev-env -f "$(dirname "${BASH_SOURCE[0]}")/../shell.nix") | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
#!/usr/bin/env nix-shell | ||
#!nix-shell -i bash --pure ../shell.nix | ||
#!/usr/bin/env bash | ||
|
||
set -evx | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
source "$(dirname "${BASH_SOURCE[0]}")/_env.sh" | ||
|
||
pushd build | ||
make MiniLua-bin | ||
popd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
source "$(dirname "${BASH_SOURCE[0]}")/_env.sh" | ||
|
||
mkdir -pv build | ||
pushd build | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
source "$(dirname "${BASH_SOURCE[0]}")/_env.sh" | ||
|
||
file="$1" | ||
|
||
cmd=build/bin/MiniLua-bin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
source "$(dirname "${BASH_SOURCE[0]}")/_env.sh" | ||
|
||
pushd build | ||
bash <(curl -s https://codecov.io/bash) -f coverage.info.cleaned | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
{ | ||
sources ? import ./nix/sources.nix, | ||
system ? builtins.currentSystem, | ||
pkgs ? | ||
import sources.nixpkgs { | ||
overlays = []; | ||
config = {}; | ||
inherit system; | ||
}, | ||
sources ? import ./nix/sources.nix, | ||
system ? builtins.currentSystem, | ||
pkgs ? | ||
import sources.nixpkgs { | ||
overlays = []; | ||
config = {}; | ||
inherit system; | ||
}, | ||
}: | ||
pkgs.mkShell { | ||
nativeBuildInputs = with pkgs; [ | ||
niv | ||
clang-tools | ||
python3 | ||
]; | ||
nativeBuildInputs = with pkgs; [ | ||
# Build tools | ||
niv | ||
git | ||
cmake | ||
|
||
# Dependencies | ||
boost | ||
qt5.qtbase | ||
qt5.qmake | ||
|
||
# Tools | ||
clang-tools | ||
python3 | ||
lcov | ||
gcovr | ||
doxygen | ||
which | ||
curl | ||
]; | ||
|
||
IN_MINILUA_NIX_SHELL = true; | ||
} |