uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
57
pkgs/tools/misc/gringo/default.nix
Normal file
57
pkgs/tools/misc/gringo/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ lib, stdenv, fetchurl,
|
||||
bison, re2c, sconsPackages,
|
||||
libcxx
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gringo";
|
||||
version = "4.5.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/potassco/gringo/${version}/gringo-${version}-source.tar.gz";
|
||||
sha256 = "16k4pkwyr2mh5w8j91vhxh9aff7f4y31npwf09w6f8q63fxvpy41";
|
||||
};
|
||||
|
||||
buildInputs = [ bison re2c sconsPackages.scons_3_1_2 ];
|
||||
|
||||
patches = [
|
||||
./gringo-4.5.4-cmath.patch
|
||||
./gringo-4.5.4-to_string.patch
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace ./SConstruct \
|
||||
--replace \
|
||||
"env['CXX'] = 'g++'" \
|
||||
"env['CXX'] = '$CXX'"
|
||||
|
||||
substituteInPlace ./SConstruct \
|
||||
--replace \
|
||||
"env['CPPPATH'] = []" \
|
||||
"env['CPPPATH'] = ['${lib.getDev libcxx}/include/c++/v1']"
|
||||
|
||||
substituteInPlace ./SConstruct \
|
||||
--replace \
|
||||
"env['LIBPATH'] = []" \
|
||||
"env['LIBPATH'] = ['${lib.getLib libcxx}/lib']"
|
||||
'' + ''
|
||||
sed '1i#include <limits>' -i libgringo/gringo/{control,term}.hh
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
scons WITH_PYTHON= --build-dir=release
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp build/release/gringo $out/bin/gringo
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Converts input programs with first-order variables to equivalent ground programs";
|
||||
homepage = "http://potassco.sourceforge.net/";
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.hakuch ];
|
||||
license = licenses.gpl3Plus;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue