vestigia

Detect where execution depends on secrets.
git clone git://git.ppad.tech/vestigia.git
Log | Files | Refs | README | LICENSE

flake.nix (1822B)


      1 {
      2   description = "Where an execution depended on a secret.";
      3 
      4   inputs = {
      5     ppad-nixpkgs = {
      6       type = "git";
      7       url  = "git://git.ppad.tech/nixpkgs.git";
      8       ref  = "master";
      9     };
     10     flake-utils.follows = "ppad-nixpkgs/flake-utils";
     11     nixpkgs.follows = "ppad-nixpkgs/nixpkgs";
     12   };
     13 
     14   outputs = { self, nixpkgs, flake-utils, ppad-nixpkgs }:
     15     flake-utils.lib.eachDefaultSystem (system:
     16       let
     17         pkgs = import nixpkgs { inherit system; };
     18         lib = pkgs.lib;
     19         v = import ./nix/lib.nix { inherit pkgs; src = ./.; };
     20         hpkgs = v.hpkgs;
     21         linux = pkgs.stdenv.hostPlatform.isLinux;
     22       in
     23         {
     24           packages = {
     25             default = v.vestigia;
     26             include = v.include;
     27           }
     28           # the plugin and the QEMU it loads run Linux guests' user
     29           # mode, which exists on Linux alone
     30           // lib.optionalAttrs linux {
     31             plugin = v.plugin;
     32           };
     33 
     34           lib = {
     35             inherit (v) traceOf diffOf valgrindDev version;
     36           };
     37 
     38           checks = {
     39             default = hpkgs.vestigia;
     40           }
     41           # both instruments run Linux programs
     42           // lib.optionalAttrs linux {
     43             probe = import ./nix/probe.nix { inherit pkgs; vestigia = v; };
     44           };
     45 
     46           devShells.default = hpkgs.shellFor {
     47             packages = p: [ p.vestigia ];
     48             buildInputs = [
     49               hpkgs.cabal-install
     50               pkgs.stdenv.cc
     51             ] ++ lib.optional linux pkgs.valgrind;
     52 
     53             shellHook = ''
     54               PS1="[vestigia] \w$ "
     55               echo "entering ${system} shell, using"
     56               echo "ghc:   $(${hpkgs.ghc}/bin/ghc --version)"
     57               echo "cabal: $(${hpkgs.cabal-install}/bin/cabal --version)"
     58             '';
     59           };
     60         }
     61       );
     62 }