Systemsicherheit/7-SGX_Hands-on/flake.nix
Paul Zinselmeyer 7e62822d0c
Some checks failed
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (push) Failing after 8s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (push) Failing after 7s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (push) Failing after 7s
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (pull_request) Failing after 6s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (pull_request) Failing after 7s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (pull_request) Failing after 7s
[Assignment-7] Flake + App base
- Add Assignment-7 to flake.nix
- Implement basic framework of app
- Implement proxy subcommand (mostly)
- Implement basics of intermediary subcommand
2024-07-03 16:16:24 +02:00

47 lines
1.3 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
};
outputs = { self, nixpkgs, ... }:
let
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
version = builtins.substring 0 8 lastModifiedDate;
nixpkgsFor = system: import nixpkgs { inherit system; overlays = [ self.overlay ]; };
in
{
overlay = final: prev: with final; {
signatureProxy = stdenv.mkDerivation {
pname = "SignatureProxy";
inherit version;
buildScript = ''
make
'';
installScript = ''
mkdir -p $out/bin
cp app $out/bin
cp enclave.so $out/bin
'';
nativeBuildInputs = with pkgs; [
clang
glibc
sgx-sdk
gmp.dev
openssl.dev
pkg-config
];
env = {
SGX_SDK = pkgs.sgx-sdk;
SGX_MODE = "SIM";
};
};
};
defaultPackage."x86_64-linux" = (nixpkgsFor "x86_64-linux").signatureProxy;
};
}