slightly restructure flake
This commit is contained in:
69
flake.nix
69
flake.nix
@ -328,12 +328,40 @@ rec {
|
||||
# - Setup hooks, for example makeWrapper/autoPatchelfHook
|
||||
# - Interpreters needed by patchShebangs for build scripts (with the --build flag), which can be the case for e.g. perl
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
just
|
||||
xxd
|
||||
wabt
|
||||
grub2
|
||||
xorriso
|
||||
mariadb.client
|
||||
iwasm
|
||||
wamrc
|
||||
fail-bin
|
||||
|
||||
# Don't install to not pollute our PATH. Just export as environment variable.
|
||||
# wasi-sdk
|
||||
# libiwasm_debug
|
||||
# libiwasm_release
|
||||
];
|
||||
|
||||
# Add dependencies to buildInputs if they will end up copied or linked into the final output or otherwise used at runtime:
|
||||
# - Libraries used by compilers, for example zlib
|
||||
# - Interpreters needed by patchShebangs for scripts which are installed, which can be the case for e.g. perl
|
||||
buildInputs = with pkgs; [];
|
||||
|
||||
# ===========================================================================================
|
||||
# Define buildable + installable packages
|
||||
# ===========================================================================================
|
||||
|
||||
fail-bin = stdenv.mkDerivation {
|
||||
pname = "fail";
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
# FAIL runtime dependencies
|
||||
python # bochs-experiment-runner.py, resultbrowser.py
|
||||
@ -351,16 +379,6 @@ rec {
|
||||
libz # libz.so.1
|
||||
];
|
||||
|
||||
# ===========================================================================================
|
||||
# Define buildable + installable packages
|
||||
# ===========================================================================================
|
||||
|
||||
fail-bin = stdenv.mkDerivation {
|
||||
inherit nativeBuildInputs buildInputs;
|
||||
pname = "fail";
|
||||
version = "1.0.0";
|
||||
src = ./.;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@ -375,35 +393,28 @@ rec {
|
||||
# Provide package for "nix build"
|
||||
packages = {
|
||||
default = fail-bin;
|
||||
fail = fail-bin;
|
||||
wasi-sdk = wasi-sdk;
|
||||
iwasm = iwasm;
|
||||
wamrc = wamrc;
|
||||
libiwasm = libiwasm_release;
|
||||
};
|
||||
apps = {
|
||||
default = flake-utils.lib.mkApp {drv = fail-bin;};
|
||||
fail = fail-bin;
|
||||
wasi-sdk = wasi-sdk;
|
||||
iwasm = iwasm;
|
||||
wamrc = wamrc;
|
||||
libiwasm = libiwasm_release;
|
||||
};
|
||||
|
||||
devShells = {
|
||||
# Provide default environment for "nix develop".
|
||||
# Other environments can be added below.
|
||||
default = pkgs.mkShell {
|
||||
inherit shellHook;
|
||||
inherit nativeBuildInputs buildInputs shellHook;
|
||||
name = description;
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
just
|
||||
xxd
|
||||
wabt
|
||||
grub2
|
||||
xorriso
|
||||
mariadb.client
|
||||
iwasm
|
||||
wamrc
|
||||
fail-bin
|
||||
|
||||
# Don't install to not pollute our PATH. Just export as environment variable.
|
||||
# wasi-sdk
|
||||
# libiwasm_debug
|
||||
# libiwasm_release
|
||||
];
|
||||
|
||||
# =========================================================================================
|
||||
# Define environment variables
|
||||
# =========================================================================================
|
||||
|
||||
Reference in New Issue
Block a user