Open nzhang-zh opened 5 years ago
Start with providing minimum bindings to reproduce the hello_world.py with haskell.
Have a look at the Haskell BPF paper. I have that on my desk.
A side note on adding bcc dependency into cabal2nix --hpack
based Haskell environment on nix.
Turns out bcc is accessible from nix-shell if it is directly added to package.yaml
via extra-libraries
.
Something like
library:
source-dirs: src
exposed-modules:
- Lib
extra-libraries:
bcc
The cabal.nix
generated will then have bcc
in its arguments set.
{ mkDerivation, base, bcc, c2hs, hpack, stdenv }:
mkDerivation {
...
}
And bcc need to be explicitly specified in default.nix when calling.
drv = haskellPackages.callPackage (import ./cabal.nix) { bcc=linuxPackages_4_18.bcc; };
I've mentioned this in the Haskell-Demo issues.
On 8 November 2018 13:25:29 GMT+11:00, n-zhang-hp notifications@github.com wrote:
A side note on adding bcc dependency into
cabal2nix --hpack
based Haskell environment on nix. Turns out bcc is accessible from nix-shell if it is directly added topackage.yaml
viaextra-libraries
.Something like
library: source-dirs: src exposed-modules: - Lib extra-libraries: bcc
The
cabal.nix
generated will then havebcc
in its arguments set.{ mkDerivation, base, bcc, c2hs, hpack, stdenv }: mkDerivation { ... }
And bcc need to be explicitly specified in default.nix when calling.
drv = haskellPackages.callPackage (import ./cabal.nix) { bcc=linuxPackages_4_18.bcc; };
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/MatrixAI/Overwatch/issues/17#issuecomment-436850593
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Start creating Haskell bindings for creating bpf module, loading function, clean up etc against bcc.