auditor

An aarch64 constant-time memory access auditing tool.
git clone git://git.ppad.tech/auditor.git
Log | Files | Refs | README | LICENSE

flake.nix (1440B)


      1 {
      2   description = "AArch64 constant-time memory access auditor";
      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         lib = "ppad-auditor";
     18 
     19         pkgs  = import nixpkgs { inherit system; };
     20         hlib  = pkgs.haskell.lib;
     21         llvm  = pkgs.llvmPackages_19.llvm;
     22 
     23         hpkgs = pkgs.haskell.packages.ghc910.extend (new: old: {
     24           ${lib} = old.callCabal2nixWithOptions lib ./. "--enable-profiling" {};
     25         });
     26 
     27         cc    = pkgs.stdenv.cc;
     28         ghc   = hpkgs.ghc;
     29         cabal = hpkgs.cabal-install;
     30       in
     31         {
     32           packages.default = hpkgs.${lib};
     33 
     34           packages.haddock = hpkgs.${lib}.doc;
     35 
     36           devShells.default = hpkgs.shellFor {
     37             packages = p: [
     38               p.${lib}
     39             ];
     40 
     41             buildInputs = [
     42               cabal
     43               cc
     44               llvm
     45             ];
     46 
     47             shellHook = ''
     48               PS1="[${lib}] \w$ "
     49               echo "entering ${system} shell, using"
     50               echo "ghc:   $(${ghc}/bin/ghc --version)"
     51               echo "cabal: $(${cabal}/bin/cabal --version)"
     52             '';
     53           };
     54         }
     55       );
     56 }