mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
boolector: patch usage of ar and ranlib for cross
eep.
This commit is contained in:
parent
9138d055bf
commit
46cbded0de
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, writeShellScriptBin }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "boolector-${version}";
|
||||
|
@ -8,8 +8,22 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0mdf7hwix237pvknvrpazcx6s3ininj5k7vhysqjqgxa7lxgq045";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
sed -i -e 's@mv lingeling\* lingeling@\0 \&\& sed -i -e "1i#include <stdint.h>" lingeling/lglib.h@' makefile
|
||||
prePatch =
|
||||
let
|
||||
lingelingPatch = writeShellScriptBin "lingeling-patch" ''
|
||||
sed -i -e "1i#include <stdint.h>" lingeling/lglib.h
|
||||
|
||||
${crossFix}/bin/crossFix lingeling
|
||||
'';
|
||||
crossFix = writeShellScriptBin "crossFix" ''
|
||||
# substituteInPlace not available here
|
||||
sed -i $1/makefile.in \
|
||||
-e 's@ar rc@$(AR) rc@' \
|
||||
-e 's@ranlib@$(RANLIB)@'
|
||||
'';
|
||||
in ''
|
||||
sed -i -e 's@mv lingeling\* lingeling@\0 \&\& ${lingelingPatch}/bin/lingeling-patch@' makefile
|
||||
sed -i -e 's@mv boolector\* boolector@\0 \&\& ${crossFix}/bin/crossFix boolector@' makefile
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
|
Loading…
Reference in a new issue