forked from aws/aws-lc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
46 lines (41 loc) · 1.29 KB
/
flake.nix
File metadata and controls
46 lines (41 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
description = "AWS-LC is a general-purpose cryptographic library";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
aws-lc = pkgs.stdenv.mkDerivation {
# See https://github.com/NixOS/nixpkgs/issues/18995
hardeningDisable = [ "all" ];
src = self;
name = "aws-lc";
inherit system;
nativeBuildInputs = [ pkgs.ninja pkgs.cmake pkgs.perl pkgs.go ];
# Workaround builds trying to write to $HOME: https://github.com/NixOS/nix/issues/670
preBuild = ''
export HOME=$PWD
'';
cmakeFlags = [
"-GNinja"
"-DBUILD_SHARED_LIBS=ON"
"-DCMAKE_BUILD_TYPE=RelWithDebInfo"
];
checkPhase = ''
ninja run_minimal_tests
'';
};
shells = import ./nix/devshell.nix {
inherit pkgs;
inherit aws-lc;
};
in rec {
packages.aws-lc = aws-lc;
formatter = pkgs.nixfmt;
packages.default = packages.aws-lc;
devShells.default = shells;
});
}