-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb80828
commit 0119cf3
Showing
3 changed files
with
50 additions
and
86 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,26 +1,54 @@ | ||
{ | ||
dpdk-sys, | ||
buildPkgs ? (import ./outside.nix {}).muslEnv, | ||
toolPkgs ? import <nixpkgs> {}, | ||
pkgs ? import <nixpkgs> { }, | ||
}: rec { | ||
|
||
inherit buildPkgs; | ||
|
||
project-name = "hedgehog-dataplane"; | ||
|
||
toolchain = toolPkgs.buildEnv { | ||
name = "${project-name}-toolchain"; | ||
paths = toolchainPackages { pkgs = toolPkgs; }; | ||
pathsToLink = [ "/" ]; | ||
}; | ||
inherit pkgs; | ||
|
||
mdbook-citeproc = import ./nix/mdbook-citeproc.nix (with pkgs; { | ||
inherit lib stdenv fetchFromGitHub rustPlatform CoreServices; | ||
}); | ||
|
||
mdbook-alerts = import ./nix/mdbook-alerts.nix (with pkgs; { | ||
inherit lib stdenv fetchFromGitHub rustPlatform CoreServices; | ||
}); | ||
|
||
buildDeps = pkgs: (with pkgs; [ | ||
bash | ||
bash-completion | ||
coreutils | ||
git | ||
mdbook | ||
mdbook-admonish | ||
mdbook-katex | ||
mdbook-mermaid | ||
mdbook-plantuml | ||
pandoc # needed for mdbook-citeproc to work (runtime exe dep) | ||
plantuml # needed for mdbook-plantuml to work (runtime exe dep) | ||
]) ++ [ | ||
mdbook-citeproc | ||
mdbook-alerts | ||
]; | ||
|
||
shell = toolPkgs.mkShell { | ||
shell = pkgs.buildFHSUserEnv { | ||
name = "${project-name}-shell"; | ||
packages = (toolchainPackages toolPkgs); | ||
shellHook = '' | ||
export PS1="\[\e[1;32m\][${project-name}]\[\e[0m\] $PS1" | ||
export LIBCLANG_PATH=${toolPkgs.llvmPackages.libclang.lib}/lib | ||
export LD_LIBRARY_PATH=$LIBCLANG_PATH:$LD_LIBRARY_PATH | ||
targetPkgs = buildDeps; | ||
}; | ||
|
||
design-docs = pkgs.stdenv.mkDerivation { | ||
name = "${project-name}-design-docs"; | ||
src = ./design-docs/src/mdbook; | ||
buildInputs = buildDeps pkgs; | ||
buildPhase = '' | ||
set -euo pipefail; | ||
rm --force --recursive book; | ||
mdbook build; | ||
''; | ||
installPhase = '' | ||
set -euo pipefail; | ||
cp -a book $out; | ||
''; | ||
}; | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
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