Commit 840a40fb authored by Florian Franzen's avatar Florian Franzen
Browse files

polkadot-spec: move flake into repo

parent 17c5376f
......@@ -52,22 +52,6 @@
"type": "github"
}
},
"polkadot-spec": {
"flake": false,
"locked": {
"lastModified": 1615895893,
"narHash": "sha256-rfgkMeepZsW3U8eRl7WVeruTge0T/jxFujGhdR2mE7s=",
"owner": "w3f",
"repo": "polkadot-spec",
"rev": "7361c46a17946ae3f00eb891eb164201783bfc4e",
"type": "github"
},
"original": {
"owner": "w3f",
"repo": "polkadot-spec",
"type": "github"
}
},
"polkadot-tests": {
"flake": false,
"locked": {
......@@ -89,7 +73,6 @@
"mozilla": "mozilla",
"naersk": "naersk",
"nixpkgs": "nixpkgs",
"polkadot-spec": "polkadot-spec",
"polkadot-tests": "polkadot-tests",
"utils": "utils"
}
......
......@@ -17,8 +17,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# Polkadot specification and testsuite repo
polkadot-spec = { url = "github:w3f/polkadot-spec"; flake = false; };
# Polkadot testsuite repo
polkadot-tests = { url = "github:w3f/polkadot-tests"; flake = false; };
};
......@@ -46,12 +45,12 @@
};
};
packages = pkgs.implementations // pkgs.specifications;
packages = pkgs.implementations // pkgs.testsuite // pkgs.dependencies;
}
) // {
checks.x86_64-linux = self.packages.x86_64-linux;
overlay = import ./overlay.nix { inherit (sources) polkadot-spec polkadot-tests; };
overlay = import ./overlay.nix { inherit (sources) polkadot-tests; };
};
}
{ polkadot-spec, polkadot-tests }:
{ polkadot-tests }:
# Web3 Specification Team Nix Overlay
......@@ -21,13 +21,6 @@ let
rustc = rustWasm;
cargo = rustWasm;
};
# Custom texlive environment
texlive-spec = callPackage ./support/texlive.nix {
extraTexPackages = {
inherit (texlive) latexmk algorithms algorithmicx luacode;
};
};
};
# Dependency derivations (buildable)
......@@ -68,9 +61,7 @@ let
};
# Specification Testsuite binaries (buildable)
specifications = with final; {
inherit polkadot-spec;
testsuite = with final; {
# Turn source in derivation including submodules
polkadot-tests = builtins.fetchGit {
url = "git://github.com/w3f/polkadot-tests";
......@@ -79,10 +70,6 @@ let
submodules = true;
};
# Publications
polkadot-host-spec = callPackage ./spec/host.nix {};
polkadot-runtime-spec = callPackage ./spec/runtime.nix {};
# Adapters
substrate-adapter = callPackage ./adapters/substrate.nix {};
kagome-adapter = callPackage ./adapters/kagome.nix {};
......@@ -107,8 +94,8 @@ let
# Export some of the package sets as subset.
virtual = {
inherit implementations specifications environments;
inherit implementations testsuite dependencies environments;
};
in
support // dependencies // implementations // specifications // virtual
support // dependencies // implementations // testsuite // virtual
{ polkadot-spec, stdenv, texmacs, xvfb_run }:
stdenv.mkDerivation rec {
name = "polkadot-host-spec-${version}.pdf";
version = builtins.substring 0 7 polkadot-spec.rev;
src = polkadot-spec;
sourceRoot = "source/host-spec";
nativeBuildInputs = [
texmacs
xvfb_run
];
phases = [ "unpackPhase" "convertPhase" ];
convertPhase = ''
export HOME=$(mktemp -d)
xvfb-run texmacs -b host-spec.scm -x '(convert-updated "$PWD/host-spec.tm" "$out")' --quit
'';
}
{ polkadot-spec, stdenv, texlive-spec, plantuml, graphviz }:
stdenv.mkDerivation rec {
name = "polkadot-runtime-spec-${version}.pdf";
version = builtins.substring 0 7 polkadot-spec.rev;
src = polkadot-spec;
sourceRoot = "source/runtime-spec";
nativeBuildInputs = [
texlive-spec
plantuml
graphviz
];
PLANTUML_JAR = "${plantuml}/lib/plantuml.jar";
buildPhase = ''
export HOME=$(mktemp -d)
latexmk -pdflua runtime-spec.tex
'';
installPhase = ''
cp runtime-spec.pdf $out
'';
}
# Generated with tex2nix 0.0.0
{ texlive, extraTexPackages ? {} }:
(texlive.combine ({
inherit (texlive) scheme-small;
"kvoptions" = texlive."kvoptions";
"intcalc" = texlive."intcalc";
"atveryend" = texlive."atveryend";
"xkeyval" = texlive."xkeyval";
"xargs" = texlive."xargs";
"graphics" = texlive."graphics";
"hyperref" = texlive."hyperref";
"hycolor" = texlive."hycolor";
"rerunfilecheck" = texlive."rerunfilecheck";
"amsmath" = texlive."amsmath";
"refcount" = texlive."refcount";
"pdftexcmds" = texlive."pdftexcmds";
"geometry" = texlive."geometry";
"bitset" = texlive."bitset";
"minitoc" = texlive."minitoc";
"gettitlestring" = texlive."gettitlestring";
"infwarerr" = texlive."infwarerr";
"collectbox" = texlive."collectbox";
"xcolor" = texlive."xcolor";
"kvsetkeys" = texlive."kvsetkeys";
"iftex" = texlive."iftex";
"adjustbox" = texlive."adjustbox";
"fancyvrb" = texlive."fancyvrb";
"pdfescape" = texlive."pdfescape";
"atbegshi" = texlive."atbegshi";
"plantuml" = texlive."plantuml";
"kvdefinekeys" = texlive."kvdefinekeys";
"url" = texlive."url";
"ltxcmds" = texlive."ltxcmds";
"letltxmacro" = texlive."letltxmacro";
"auxhook" = texlive."auxhook";
"capt-of" = texlive."capt-of";
"pgf" = texlive."pgf";
"etexcmds" = texlive."etexcmds";
"uniquecounter" = texlive."uniquecounter";
} // extraTexPackages))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment