Skip to content

Commit

Permalink
CI: improve Nix flake
Browse files Browse the repository at this point in the history
prepare for Nix benches
  • Loading branch information
Antonin Reitz committed Oct 10, 2023
1 parent c84db8a commit 65a5087
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,25 @@
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
inherit (pkgs) lib;
z3 = fstar-src.packages.${system}.z3;
fstar = fstar-src.packages.${system}.fstar;
steel = steel-src.packages.${system}.steel;
karamel = krml-src.packages.${system}.karamel.home;

# allocator derivation
starmalloc = pkgs.stdenv.mkDerivation {
name = "steel-experiments";
src = ./.;
src = lib.sourceByRegex ./. [
"lib_avl_common(/.*)?"
"lib_avl_mono(/.*)?"
"lib_bitmap(/.*)?"
"lib_list(/.*)?"
"lib_misc(/.*)?"
"src(/.*)?"
"Makefile.include"
"Makefile"
];
enableParallelBuilding = true;
buildInputs = [ fstar steel karamel pkgs.removeReferencesTo ];
FSTAR_HOME = fstar;
Expand All @@ -42,20 +54,12 @@
postInstall = ''
find dist -type f -name "*" -exec remove-references-to -t ${karamel} {} \;
'';
#buildPhase = ''
## echo "${fstar}"
## echo "${karamel}"
#make lib -j 1
#'';
};
in
{
packages.${system} = {
inherit starmalloc;
default=starmalloc;
};
#checks.${system} = {
# inherit steel-experiments;
#};
};
}

0 comments on commit 65a5087

Please sign in to comment.