-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4a9759
commit e8ca6d2
Showing
12 changed files
with
274 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ lib, fetchFromGitLab, buildDunePackage | ||
, menhirLib, menhirSdk | ||
}: | ||
|
||
buildDunePackage rec { | ||
pname = "menhir"; | ||
|
||
minimalOCamlVersion = "4.03"; | ||
|
||
inherit (menhirLib) version src; | ||
|
||
buildInputs = [ menhirLib menhirSdk ]; | ||
|
||
meta = menhirSdk.meta // { | ||
description = "A LR(1) parser generator for OCaml"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ lib, stdenv, fetchFromGitHub, ocamlPackages, pkgsHostTarget }: | ||
|
||
stdenv.mkDerivation rec { | ||
version = "0.3.3"; | ||
pname = "opaline"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "jaapb"; | ||
repo = "opaline"; | ||
rev = "v${version}"; | ||
sha256 = "sha256-6htaiFIcRMUYWn0U7zTNfCyDaTgDEvPch2q57qzvND4="; | ||
}; | ||
|
||
nativeBuildInputs = with pkgsHostTarget.ocamlPackages; [ ocaml findlib ocamlbuild ]; | ||
buildInputs = with ocamlPackages; [ opam-file-format ]; | ||
|
||
preInstall = "mkdir -p $out/bin"; | ||
|
||
installFlags = [ "PREFIX=$(out)" ]; | ||
|
||
meta = { | ||
description = "OPAm Light INstaller Engine"; | ||
license = lib.licenses.mit; | ||
maintainers = [ lib.maintainers.vbgl ]; | ||
inherit (src.meta) homepage; | ||
inherit (ocamlPackages.ocaml.meta) platforms; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ lib, stdenv, fetchFromGitHub, pkg-config, ocamlPackages, pkgsHostTarget }: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "ott"; | ||
version = "0.33"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "ott-lang"; | ||
repo = "ott"; | ||
rev = version; | ||
hash = "sha256-GzeEiok5kigcmfqf/K/UxvlKkl55zy0vOyiRZ2HyMiE="; | ||
}; | ||
|
||
strictDeps = true; | ||
|
||
nativeBuildInputs = [ pkg-config pkgsHostTarget.opaline ] ++ (with pkgsHostTarget.ocamlPackages; [ ocaml findlib ]); | ||
buildInputs = with ocamlPackages; [ ocamlgraph ]; | ||
|
||
installTargets = "ott.install"; | ||
|
||
postInstall = '' | ||
opaline -prefix $out | ||
'' | ||
# There is `emacsPackages.ott-mode` for this now. | ||
+ '' | ||
rm -r $out/share/emacs | ||
''; | ||
|
||
meta = { | ||
description = "A tool for the working semanticist"; | ||
longDescription = '' | ||
Ott is a tool for writing definitions of programming languages and | ||
calculi. It takes as input a definition of a language syntax and | ||
semantics, in a concise and readable ASCII notation that is close to | ||
what one would write in informal mathematics. It generates LaTeX to | ||
build a typeset version of the definition, and Coq, HOL, and Isabelle | ||
versions of the definition. Additionally, it can be run as a filter, | ||
taking a LaTeX/Coq/Isabelle/HOL source file with embedded (symbolic) | ||
terms of the defined language, parsing them and replacing them by | ||
target-system terms. | ||
''; | ||
homepage = "http://www.cl.cam.ac.uk/~pes20/ott"; | ||
license = lib.licenses.bsd3; | ||
maintainers = with lib.maintainers; [ jwiegley ]; | ||
platforms = lib.platforms.unix; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, capstone | ||
}: | ||
|
||
capstone.overrideAttrs { | ||
pname = "capstone-grammatech"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "GrammaTech"; | ||
repo = "capstone"; | ||
rev = "a11159a0bbd680e134c53d6a16e304b53488824b"; | ||
hash = "sha256-0aCmlXsrdWYlxqzRlXj8TNkD0s8xHMTq0YlVJ+t1fD4="; | ||
}; | ||
|
||
preConfigure = '' | ||
substituteInPlace capstone.pc.in \ | ||
--replace \''${prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ | ||
''; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, cmake | ||
, boost | ||
, lief | ||
, libehp | ||
, gtirb | ||
, gtirb-pprinter | ||
, capstone-grammatech | ||
, souffle | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "ddisasm"; | ||
version = "1.8.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "GrammaTech"; | ||
repo = "ddisasm"; | ||
rev = "v1.8.0"; | ||
hash = "sha256-jCJLqy1BARO9SjV6hzSaow/KdMLlIc+wNXC16LSLlVE="; | ||
}; | ||
|
||
buildInputs = [ cmake boost lief gtirb gtirb-pprinter libehp ]; | ||
nativeBuildInputs = [ capstone-grammatech souffle ]; | ||
|
||
cmakeFlags = [ "-DDDISASM_ENABLE_TESTS=OFF" "-DDDISASM_GENERATE_MANY=ON" ]; | ||
# enableParallelBuilding = false; | ||
|
||
preConfigure = '' | ||
export CXXFLAGS='-includeset' | ||
''; | ||
|
||
meta = { | ||
homepage = "https://github.com/grammatech/ddisasm"; | ||
description = "A fast and accurate disassembler."; | ||
maintainers = [ "Kait Lam <[email protected]>" ]; | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, cmake | ||
, python3 | ||
, boost | ||
, abseil-cpp | ||
, doxygen | ||
, gtirb | ||
, capstone-grammatech | ||
, gtest | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "gtirb-pprinter"; | ||
version = "2.1.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "GrammaTech"; | ||
repo = "gtirb-pprinter"; | ||
rev = "v2.1.0"; | ||
hash = "sha256-zgYq6FKxaJ6vLzvOTCfOU4ZUyXvMuFc3abNrqg8NADc="; | ||
}; | ||
|
||
buildInputs = [ cmake python3 gtirb boost abseil-cpp gtest ]; | ||
nativeBuildInputs = [ capstone-grammatech ]; | ||
|
||
cmakeFlags = [ "-DGTIRB_PPRINTER_ENABLE_TESTS=OFF" ]; | ||
|
||
preConfigure = '' | ||
export CXXFLAGS='-includeset -Wno-error=unused-result -Wno-error=deprecated-declarations' | ||
''; | ||
|
||
meta = { | ||
homepage = "https://github.com/grammatech/gtirb-pprinter"; | ||
description = "Pretty printer from GTIRB to assembly code."; | ||
maintainers = [ "Kait Lam <[email protected]>" ]; | ||
}; | ||
} | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitHub | ||
, cmake | ||
, python3 | ||
, boost | ||
, protobuf | ||
, doxygen | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "gtirb"; | ||
version = "2.0.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "GrammaTech"; | ||
repo = "gtirb"; | ||
rev = "v2.0.0"; | ||
hash = "sha256-ueoqxm6iXv4JgzR/xkImT+O8xx+7bA2upx1TJ828LLA="; | ||
}; | ||
|
||
buildInputs = [ cmake python3 boost doxygen ]; | ||
propagatedBuildInputs = [ protobuf ]; | ||
|
||
cmakeFlags = [ "-DGTIRB_ENABLE_TESTS=OFF" ]; | ||
|
||
preConfigure = '' | ||
export CXXFLAGS="-includeset -Wno-error=unused-result" | ||
''; | ||
|
||
meta = { | ||
homepage = "https://github.com/GrammaTech/gtirb"; | ||
description = "Intermediate Representation for Binary analysis and transformation."; | ||
maintainers = [ "Kait Lam <[email protected]>" ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ lib | ||
, stdenv | ||
, fetchFromGitLab | ||
, cmake | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "libehp"; | ||
version = "init"; | ||
|
||
src = fetchFromGitLab { | ||
owner = "opensrc"; | ||
repo = "libehp"; | ||
rev = "4d2705bcaa4f9731eabbd5d2dc30bba894432e7c"; | ||
hash = "sha256-uMKb3FO7LGneeznBknfOVkkDHWLEooxQllUjojoE4sU="; | ||
domain = "git.zephyr-software.com"; | ||
}; | ||
|
||
buildInputs = [ cmake ]; | ||
|
||
meta = { | ||
homepage = "https://git.zephyr-software.com/opensrc/libehp"; | ||
description = "Exception handling parsing support for Elf files (eh_frame, etc.)"; | ||
maintainers = [ "Kait Lam <[email protected]>" ]; | ||
}; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
final: prev: | ||
{ | ||
ddisasm = prev.callPackage ./ddisasm.nix {}; | ||
gtirb = prev.callPackage ./gtirb.nix {}; | ||
gtirb-pprinter = prev.callPackage ./gtirb-pprinter.nix {}; | ||
capstone-grammatech = prev.callPackage ./capstone.nix {}; | ||
libehp = prev.callPackage ./libehp.nix {}; | ||
|
||
gtirb-semantics = prev.callPackage ./gtirb-semantics.nix {}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters