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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,33 @@
{ fetchurl, python, xar, cpio, cctools, insert_dylib }:
assert python.pkgs.isPy27 && python.ucsEncoding == 2;
python.pkgs.buildPythonPackage
{ pname = "gurobipy";
version = "7.5.2";
src = fetchurl
{ url = "http://packages.gurobi.com/7.5/gurobi7.5.2_mac64.pkg";
sha256 = "10zgn8741x48xjdiknj59x66mwj1azhihi1j5a1ajxi2n5fsak2h";
};
buildInputs = [ xar cpio cctools insert_dylib ];
unpackPhase =
''
xar -xf $src
zcat gurobi*mac64tar.pkg/Payload | cpio -i
tar xf gurobi*_mac64.tar.gz
sourceRoot=$(echo gurobi*/*64)
runHook postUnpack
'';
patches = [ ./no-clever-setup.patch ];
postInstall = "mv lib/lib*.so $out/lib";
postFixup =
''
install_name_tool -change \
/System/Library/Frameworks/Python.framework/Versions/2.7/Python \
${python}/lib/libpython2.7.dylib \
$out/lib/python2.7/site-packages/gurobipy/gurobipy.so
install_name_tool -change /Library/gurobi752/mac64/lib/libgurobi75.so \
$out/lib/libgurobi75.so \
$out/lib/python2.7/site-packages/gurobipy/gurobipy.so
insert_dylib --inplace $out/lib/libaes75.so \
$out/lib/python2.7/site-packages/gurobipy/gurobipy.so
'';
}

View file

@ -0,0 +1,28 @@
{ lib, buildPythonPackage, python, gurobi }:
buildPythonPackage {
pname = "gurobipy";
version = "9.1.2";
src = gurobi.src;
setSourceRoot = "sourceRoot=$(echo gurobi*/*64)";
patches = [ ./no-clever-setup.patch ];
postInstall = ''
mv lib/libgurobi*.so* $out/lib
'';
postFixup = ''
patchelf --set-rpath $out/lib \
$out/lib/${python.libPrefix}/site-packages/gurobipy/gurobipy.so
'';
meta = with lib; {
description = "The Gurobi Python interface";
homepage = "https://www.gurobi.com";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,41 @@
diff -Naur a/setup.py b/setup.py
--- a/setup.py 2021-04-24 12:53:18.300255006 -0500
+++ b/setup.py 2021-04-24 12:47:51.619052574 -0500
@@ -15,29 +15,6 @@
from distutils.command.install import install
import os,sys,shutil
-class GurobiClean(Command):
- description = "remove the build directory"
- user_options = []
- def initialize_options(self):
- self.cwd = None
- def finalize_options(self):
- self.cwd = os.path.dirname(os.path.realpath(__file__))
- def run(self):
- build_dir = os.path.join(os.getcwd(), "build")
- if os.path.exists(build_dir):
- print('removing %s' % build_dir)
- shutil.rmtree(build_dir)
-
-class GurobiInstall(install):
-
- # Calls the default run command, then deletes the build area
- # (equivalent to "setup clean --all").
- def run(self):
- install.run(self)
- c = GurobiClean(self.distribution)
- c.finalize_options()
- c.run()
-
License = """
This software is covered by the Gurobi End User License Agreement.
By completing the Gurobi installation process and using the software,
@@ -78,7 +55,5 @@
packages = ['gurobipy'],
package_dir={'gurobipy' : srcpath },
package_data = {'gurobipy' : [srcfile] },
- cmdclass={'install' : GurobiInstall,
- 'clean' : GurobiClean }
)