-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.nix
40 lines (39 loc) · 1.16 KB
/
build.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ inputs, lib, ... }: {
perSystem = { config, system, pkgs, ... }:
let
rustFlake =
inputs.flake-lang.lib.${system}.rustFlake {
src = ./.;
version = "3";
crateName = "plutus-ledger-api";
devShellHook = config.settings.shell.hook;
cargoNextestExtraArgs = "--all-features";
extraSourceFilters = [
(path: _type: builtins.match ".*golden$" path != null)
];
extraSources = [
config.packages.is-plutus-data-derive-rust-src
];
};
plutus-ledger-api-rust-github-pages = pkgs.stdenv.mkDerivation {
name = "plutus-ledger-api-github-pages";
src = rustFlake.packages.plutus-ledger-api-rust-doc;
buildPhase = ''
mkdir $out
cp -r -L -v $src/share/doc/* $out/
echo '<meta http-equiv="refresh" content="0; url=plutus_ledger_api">' > $out/index.html
'';
};
in
lib.mkMerge
[
{
inherit (rustFlake) packages checks devShells;
}
{
packages = {
inherit plutus-ledger-api-rust-github-pages;
};
}
];
}