Skip to content

Commit

Permalink
feat: pulling in flake.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
dougch committed Aug 20, 2024
1 parent 0574778 commit 6451503
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
description = "AWS-LC is a general-purpose cryptographic library";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";

outputs = { self, nix, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in rec {
packages.aws-lc = pkgs.stdenv.mkDerivation {
src = self;
name = "aws-lc";
inherit system;
nativeBuildInputs = [ pkgs.ninja pkgs.cmake pkgs.perl ];
cmakeFlags = [ "-GNinja" "-DDISABLE_GO=ON" ];
checkPhase = ''
ninja run_minimal_tests
'';
};
formatter = pkgs.nixfmt;
packages.default = packages.aws-lc;
packages.aws-lc-test = packages.aws-lc.overrideAttrs
(finalAttrs: previousAttrs: {
doCheck = true;
});
});
}

0 comments on commit 6451503

Please sign in to comment.