sgx-sdk, sgx-psw: add `debug` argument

main
Vincent Haupert 3 years ago
parent dd79220bca
commit 92c24a12a7
  1. 7
      pkgs/os-specific/linux/sgx/psw/default.nix
  2. 8
      pkgs/os-specific/linux/sgx/sdk/default.nix

@ -14,6 +14,7 @@
, systemd
, util-linux
, which
, debug ? false
}:
stdenv.mkDerivation rec {
inherit (sgx-sdk) version versionTag src;
@ -57,6 +58,10 @@ stdenv.mkDerivation rec {
protobuf
];
hardeningDisable = lib.optionals debug [
"fortify"
];
postPatch = ''
# https://github.com/intel/linux-sgx/pull/730
substituteInPlace buildenv.mk --replace '/bin/cp' 'cp'
@ -84,6 +89,8 @@ stdenv.mkDerivation rec {
buildFlags = [
"psw_install_pkg"
] ++ lib.optionals debug [
"DEBUG=1"
];
installFlags = [

@ -21,13 +21,13 @@
, validatePkgConfig
, writeShellScript
, writeText
, debug ? false
}:
with lib;
stdenv.mkDerivation rec {
pname = "sgx-sdk";
version = "2.14.100.2";
versionTag = concatStringsSep "." (take 2 (splitVersion version));
versionTag = lib.concatStringsSep "." (lib.take 2 (lib.splitVersion version));
src = fetchFromGitHub {
owner = "intel";
@ -140,6 +140,8 @@ stdenv.mkDerivation rec {
buildFlags = [
"sdk_install_pkg"
] ++ lib.optionals debug [
"DEBUG=1"
];
enableParallelBuilding = true;
@ -264,7 +266,7 @@ stdenv.mkDerivation rec {
passthru.tests = callPackage ./samples.nix { };
meta = {
meta = with lib; {
description = "Intel SGX SDK for Linux built with IPP Crypto Library";
homepage = "https://github.com/intel/linux-sgx";
maintainers = with maintainers; [ sbellem arturcygan veehaitch ];

Loading…
Cancel
Save