From aaeeff4a13257608028da3ede046d9571c57257a Mon Sep 17 00:00:00 2001 From: DougCh Date: Fri, 4 Oct 2024 19:22:29 +0000 Subject: [PATCH] chore: add flake.nix to v1.36.1 --- flake.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000000..76c818f77bd --- /dev/null +++ b/flake.nix @@ -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; + }); + }); +} +