Skip to content

Commit

Permalink
basil: add shell and docker for tools
Browse files Browse the repository at this point in the history
at the moment, this only contains the tools accompanying BASIL.
it is simple to extend to a BASIL dev environment and then to
BASIL itself.
  • Loading branch information
katrinafyi committed Oct 1, 2024
1 parent ea48514 commit 64b8305
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
32 changes: 32 additions & 0 deletions basil-shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{ mkShell
, gcc-aarch64
, clang-aarch64
, asli
, ddisasm
, gtirb-pprinter
, gtirb-semantics
}:
let
packages = [
gcc-aarch64
clang-aarch64
asli
ddisasm
gtirb-pprinter
gtirb-semantics
];
in mkShell {
inherit packages;
inputsFrom = [ ];
shellHook = ''
echo
echo == pac-nix/BASIL tool shell ==
echo
echo 'with packages installed:'
printf ' - %s\n' ${toString (map (x: x.name) packages)}
echo
'';
meta = {
description = "shell containing tools used in the BASIL pipeline";
};
}
3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@
let drvs = onlyDerivations legacyPackages;
in drvs // { all = makeAll pkgs drvs; });

devShells = forAllSystems (pkgs: {
devShells = forAllSystems' ({ legacyPackages, pkgs, ... }: {
ocaml = pkgs.callPackage ./ocaml-shell.nix { };
basil-tools = legacyPackages.basil-tools-shell;
update = pkgs.callPackage ./update-shell.nix { };
});

Expand Down
7 changes: 7 additions & 0 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ let

update = prev.callPackage ./update.nix { };

basil-tools-shell = prev.callPackage ./basil-shell.nix { };
basil-tools-docker = prev.dockerTools.streamNixShellImage {
name = "basil-tools-docker";
tag = "latest";
drv = final.basil-tools-shell;
};

ocamlPackages_pac = final.ocaml-ng.ocamlPackages_4_14.overrideScope final.overlay_ocamlPackages
// { _overlay = final.overlay_ocamlPackages; };
ocamlPackages_pac_5 = final.ocamlPackages.overrideScope final.overlay_ocamlPackages
Expand Down

0 comments on commit 64b8305

Please sign in to comment.