Skip to content

Commit

Permalink
chore: add flake.nix to v1.36.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dougch committed Oct 4, 2024
1 parent 8b2ebfc commit aaeeff4
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 aaeeff4

Please sign in to comment.