-
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.
fix ambiguous naming of bap packages (closes #1).
- now, bap is provided by bap-aslp and bap-uq-pac has been renamed to bap-primus. - also fixes bap-mc executables.
- Loading branch information
1 parent
d424e74
commit 89557ef
Showing
10 changed files
with
113 additions
and
64 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
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
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 |
---|---|---|
@@ -1,21 +1,31 @@ | ||
{ symlinkJoin, ocamlPackages, makeWrapper, plugins ? []}: | ||
symlinkJoin { | ||
name = "bap-plugins"; | ||
version = ocamlPackages.bap.version; | ||
|
||
paths = [ ocamlPackages.bap ]; | ||
buildInputs = [ makeWrapper ]; | ||
postBuild = '' | ||
for x in ${toString plugins}; do | ||
if ! [[ -d "$x/lib/bap" ]]; then | ||
echo "$x/lib/bap" plugin path does not exist >&2 | ||
false | ||
fi | ||
done | ||
for b in $out/bin/*; do | ||
wrapProgram $b \ | ||
{ stdenv, ocamlPackages, makeBinaryWrapper, suffix ? "", plugins ? [] }: | ||
let bap = ocamlPackages.bap; | ||
in stdenv.mkDerivation { | ||
pname = "bap-plugins"; | ||
version = bap.version; | ||
unpackPhase = ":"; | ||
propagatedBuildInputs = plugins; | ||
buildInputs = [ makeBinaryWrapper bap ]; | ||
postBuild = '' | ||
for x in ${toString plugins}; do | ||
if ! [[ -d "$x/lib/bap" ]]; then | ||
echo "$x/lib/bap" plugin path does not exist >&2 | ||
false | ||
fi | ||
done | ||
mkdir -p $out/bin | ||
cd ${bap}/bin | ||
for b in *; do | ||
if ! [[ -f $b ]]; then | ||
continue | ||
fi | ||
if [[ $b != bap ]]; then | ||
makeBinaryWrapper "$(pwd)/$b" $out/bin/$b${suffix} | ||
else | ||
makeBinaryWrapper "$(pwd)/$b" $out/bin/$b${suffix} \ | ||
--append-flags "${toString (map (x: "-L ${x + "/lib/bap"}") plugins)}" | ||
done | ||
''; | ||
} | ||
fi | ||
done | ||
''; | ||
} |
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,34 @@ | ||
{ stdenv, testers, fetchFromGitHub, ocamlPackages, makeBinaryWrapper, bap-primus }: | ||
let | ||
_bap = ocamlPackages.bap.overrideAttrs (final: prev: { | ||
version = "unstable-2022-11-22"; | ||
src = fetchFromGitHub { | ||
owner = "UQ-PAC"; | ||
repo = "bap"; | ||
rev = "acfdc1067afa847fa1eadac9700eae349434dc3b"; | ||
sha256 = "sha256-FkfwMTbA9QS3vy4rs5Ua4egZg6/gQy3YzUG8xEyFo4A="; | ||
}; | ||
}); | ||
in stdenv.mkDerivation { | ||
pname = "bap-primus"; | ||
version = _bap.version; | ||
buildInputs = [ _bap ]; | ||
nativeBuildInputs = [ makeBinaryWrapper ]; | ||
unpackPhase = ":"; | ||
installPhase = '' | ||
mkdir -p $out/bin | ||
cd ${_bap}/bin | ||
for b in *; do | ||
makeBinaryWrapper "$(pwd)/$b" $out/bin/$b-primus | ||
done | ||
''; | ||
|
||
passthru.tests.no-asli = testers.testBuildFailure ( | ||
testers.testVersion { | ||
package = bap-primus; | ||
command = "bap-primus --help | grep asli"; | ||
version = "asli-specs"; | ||
} | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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