tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
boolector: patch usage of ar and ranlib for cross
eep.
Will Dietz
8 years ago
46cbded0
9138d055
+17
-3
1 changed file
expand all
collapse all
unified
split
pkgs
applications
science
logic
boolector
default.nix
+17
-3
pkgs/applications/science/logic/boolector/default.nix
···
1
-
{ stdenv, fetchurl }:
2
3
stdenv.mkDerivation rec {
4
name = "boolector-${version}";
···
8
sha256 = "0mdf7hwix237pvknvrpazcx6s3ininj5k7vhysqjqgxa7lxgq045";
9
};
10
11
-
prePatch = ''
12
-
sed -i -e 's@mv lingeling\* lingeling@\0 \&\& sed -i -e "1i#include <stdint.h>" lingeling/lglib.h@' makefile
0
0
0
0
0
0
0
0
0
0
0
0
0
0
13
'';
14
15
installPhase = ''
···
1
+
{ stdenv, fetchurl, writeShellScriptBin }:
2
3
stdenv.mkDerivation rec {
4
name = "boolector-${version}";
···
8
sha256 = "0mdf7hwix237pvknvrpazcx6s3ininj5k7vhysqjqgxa7lxgq045";
9
};
10
11
+
prePatch =
12
+
let
13
+
lingelingPatch = writeShellScriptBin "lingeling-patch" ''
14
+
sed -i -e "1i#include <stdint.h>" lingeling/lglib.h
15
+
16
+
${crossFix}/bin/crossFix lingeling
17
+
'';
18
+
crossFix = writeShellScriptBin "crossFix" ''
19
+
# substituteInPlace not available here
20
+
sed -i $1/makefile.in \
21
+
-e 's@ar rc@$(AR) rc@' \
22
+
-e 's@ranlib@$(RANLIB)@'
23
+
'';
24
+
in ''
25
+
sed -i -e 's@mv lingeling\* lingeling@\0 \&\& ${lingelingPatch}/bin/lingeling-patch@' makefile
26
+
sed -i -e 's@mv boolector\* boolector@\0 \&\& ${crossFix}/bin/crossFix boolector@' makefile
27
'';
28
29
installPhase = ''