diff options
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/libraries/freeimage/default.nix | 67 | ||||
-rw-r--r-- | pkgs/development/libraries/freeimage/dylib.patch | 16 | ||||
-rw-r--r-- | pkgs/development/misc/rappel/default.nix | 38 | ||||
-rw-r--r-- | pkgs/development/python-modules/XlsxWriter/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/python-modules/can/default.nix | 24 | ||||
-rw-r--r-- | pkgs/development/python-modules/pvlib/default.nix | 23 |
6 files changed, 104 insertions, 68 deletions
diff --git a/pkgs/development/libraries/freeimage/default.nix b/pkgs/development/libraries/freeimage/default.nix index b2c66ad346d0..188543bf7bf7 100644 --- a/pkgs/development/libraries/freeimage/default.nix +++ b/pkgs/development/libraries/freeimage/default.nix @@ -1,65 +1,46 @@ -{ stdenv, fetchurl, unzip, darwin }: +{ lib, stdenv, fetchurl, unzip, darwin }: stdenv.mkDerivation { - name = "freeimage-3.17.0"; + name = "freeimage-3.18.0"; src = fetchurl { - url = mirror://sourceforge/freeimage/FreeImage3170.zip; - sha256 = "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v"; + url = mirror://sourceforge/freeimage/FreeImage3180.zip; + sha256 = "1z9qwi9mlq69d5jipr3v2jika2g0kszqdzilggm99nls5xl7j4zl"; }; - patches = let - patchURL = https://anonscm.debian.org/cgit/debian-science/packages/freeimage.git/plain/debian/patches; - in [ - (fetchurl { - url = patchURL + "/Fix-CVE-2015-0852.patch"; - sha256 = "1vxdck4i5qi5j6i3cjja0gfy79mmbf0lq2qdrnqdsl4kclbvw2c8"; - }) - (fetchurl { - url = patchURL + "/Fix-CVE-2016-5684.patch"; - sha256 = "14ffgqbnwg28r6sjvm3z89zbnnm9ghbc81hdhrzxlyk3vwvd6cw3"; - }) - (fetchurl { - url = https://raw.githubusercontent.com/buildroot/buildroot/2018.05/package/libfreeimage/0005-Manage-powf64-with-glibc.patch; - sha256 = "1lis479ad5cfkhqm044nk4x97wfwm3hry3bvij1w5xkndnlfppc2"; - }) - ]; + patches = lib.optional stdenv.isDarwin ./dylib.patch; - buildInputs = [ unzip ] ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools; + buildInputs = [ unzip ] ++ lib.optional stdenv.isDarwin darwin.cctools; - prePatch = if stdenv.isDarwin - then '' - sed -e 's/gcc-4.0/clang/g' \ - -e 's/g++-4.0/clang++/g' \ - -e 's/COMPILERFLAGS = -Os -fexceptions -fvisibility=hidden -DNO_LCMS/COMPILERFLAGS = -Os -fexceptions -fvisibility=hidden -DNO_LCMS -D__ANSI__/' \ + prePatch = if stdenv.isDarwin then '' + sed -e 's/$(shell xcrun -find clang)/clang/g' \ + -e 's/$(shell xcrun -find clang++)/clang++/g' \ -e "s|PREFIX = /usr/local|PREFIX = $out|" \ - -e 's|-Wl,-syslibroot /Developer/SDKs/MacOSX10.5.sdk||g' \ - -e 's|-Wl,-syslibroot /Developer/SDKs/MacOSX10.6.sdk||g' \ - -e 's|-isysroot /Developer/SDKs/MacOSX10.6.sdk||g' \ - -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||g' \ - -e 's| $(STATICLIB)-ppc $(STATICLIB)-i386||g' \ - -e 's| $(SHAREDLIB)-ppc $(SHAREDLIB)-i386||g' \ + -e 's|-Wl,-syslibroot $(MACOSX_SYSROOT)||g' \ + -e 's|-isysroot $(MACOSX_SYSROOT)||g' \ -e 's| install -d -m 755 -o root -g wheel $(INCDIR) $(INSTALLDIR)||' \ -e 's| -m 644 -o root -g wheel||g' \ -i ./Makefile.osx # Fix LibJXR performance timers sed 's|^SRCS = \(.*\)$|SRCS = \1 Source/LibJXR/image/sys/perfTimerANSI.c|' -i ./Makefile.srcs - '' - else '' + '' else '' sed -e s@/usr/@$out/@ \ -e 's@-o root -g root@@' \ -e 's@ldconfig@echo not running ldconfig@' \ -i Makefile.gnu Makefile.fip - # Fix gcc 5.1 macro problems - # https://chromium.googlesource.com/webm/libwebp/+/eebaf97f5a1cb713d81d311308d8a48c124e5aef%5E!/ - sed -i -e 's/"\(#[^"]*\)"/" \1 "/g' Source/LibWebP/src/dsp/* ''; - postBuild = stdenv.lib.optionalString (!stdenv.isDarwin) "make -f Makefile.fip"; - preInstall = "mkdir -p $out/include $out/lib"; - postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) "make -f Makefile.fip install"; + postBuild = lib.optionalString (!stdenv.isDarwin) '' + make -f Makefile.fip + ''; + + preInstall = '' + mkdir -p $out/include $out/lib + ''; - NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + postInstall = lib.optionalString (!stdenv.isDarwin) '' + make -f Makefile.fip install + ''; enableParallelBuilding = true; @@ -67,7 +48,7 @@ stdenv.mkDerivation { description = "Open Source library for accessing popular graphics image file formats"; homepage = http://freeimage.sourceforge.net/; license = "GPL"; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; unix; + maintainers = with lib.maintainers; [viric]; + platforms = with lib.platforms; unix; }; } diff --git a/pkgs/development/libraries/freeimage/dylib.patch b/pkgs/development/libraries/freeimage/dylib.patch new file mode 100644 index 000000000000..0d8188aca707 --- /dev/null +++ b/pkgs/development/libraries/freeimage/dylib.patch @@ -0,0 +1,16 @@ +--- a/Makefile.osx ++++ b/Makefile.osx +@@ -60,1 +60,1 @@ +-FreeImage: $(STATICLIB) ++FreeImage: $(STATICLIB) $(SHAREDLIB) +@@ -87,7 +87,7 @@ +-$(SHAREDLIB): $(SHAREDLIB)-i386 $(SHAREDLIB)-x86_64 +- $(LIPO) -create $(SHAREDLIB)-i386 $(SHAREDLIB)-x86_64 -output $(SHAREDLIB) ++#$(SHAREDLIB): $(SHAREDLIB)-i386 $(SHAREDLIB)-x86_64 ++# $(LIPO) -create $(SHAREDLIB)-i386 $(SHAREDLIB)-x86_64 -output $(SHAREDLIB) + + $(SHAREDLIB)-i386: $(MODULES_I386) + $(CPP_I386) -arch i386 -dynamiclib $(LIBRARIES_I386) -o $@ $(MODULES_I386) + +-$(SHAREDLIB)-x86_64: $(MODULES_X86_64) ++$(SHAREDLIB): $(MODULES_X86_64) diff --git a/pkgs/development/misc/rappel/default.nix b/pkgs/development/misc/rappel/default.nix new file mode 100644 index 000000000000..02c31fd4d690 --- /dev/null +++ b/pkgs/development/misc/rappel/default.nix @@ -0,0 +1,38 @@ +{ fetchFromGitHub +, libedit +, makeWrapper +, nasm +, stdenv +}: + +stdenv.mkDerivation rec { + pname = "rappel"; + version = "unstable-2019-07-08"; + + src = fetchFromGitHub { + owner = "yrp604"; + repo = "rappel"; + rev = "95a776f850cf6a7c21923a2100b605408ef038de"; + sha256 = "0fmd15xa6hswh3x48av4g1sf6rncbiinbj7gbw1ffvqsbcfnsgcr"; + }; + + buildInputs = [ libedit ]; + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + + install -Dm755 -t $out/bin bin/rappel + wrapProgram $out/bin/rappel --prefix PATH : "${nasm}/bin" + + runHook postInstall + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/yrp604/rappel"; + description = "A pretty janky assembly REPL"; + license = licenses.bsdOriginal; + maintainers = [ maintainers.pamplemousse ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/python-modules/XlsxWriter/default.nix b/pkgs/development/python-modules/XlsxWriter/default.nix index 678141f394f9..b524cb0c6b3c 100644 --- a/pkgs/development/python-modules/XlsxWriter/default.nix +++ b/pkgs/development/python-modules/XlsxWriter/default.nix @@ -3,7 +3,7 @@ buildPythonPackage rec { pname = "XlsxWriter"; - version = "1.1.8"; + version = "1.2.0"; # PyPI release tarball doesn't contain tests so let's use GitHub. See: # https://github.com/jmcnamara/XlsxWriter/issues/327 @@ -11,7 +11,7 @@ buildPythonPackage rec { owner = "jmcnamara"; repo = pname; rev = "RELEASE_${version}"; - sha256 = "19qhdcycaiamd3bp8v2z9rpirxsr4c29fgs219k2766fpmfrgx40"; + sha256 = "0w9ggzi887w4z6i5mz24kcy7qbkd4d7gycqi0dhqgaj9lzxh7jjh"; }; meta = { diff --git a/pkgs/development/python-modules/can/default.nix b/pkgs/development/python-modules/can/default.nix index 8e6c90441211..b87e526dc452 100644 --- a/pkgs/development/python-modules/can/default.nix +++ b/pkgs/development/python-modules/can/default.nix @@ -1,7 +1,9 @@ { lib , buildPythonPackage -, fetchFromGitHub +, fetchPypi , pythonOlder +, isPy27 +, aenum , wrapt , typing , pyserial @@ -14,21 +16,21 @@ buildPythonPackage rec { pname = "python-can"; - version = "3.1.0"; + version = "3.3.1"; - # PyPI tarball is missing some tests and is missing __init__.py in test - # directory causing the tests to fail. See: - # https://github.com/hardbyte/python-can/issues/518 - src = fetchFromGitHub { - repo = pname; - owner = "hardbyte"; - rev = "v${version}"; - sha256 = "01lfsh7drm4qvv909x9i0vnhskdh27mcb5xa86sv9m3zfpq8cjis"; + src = fetchPypi { + inherit pname version; + sha256 = "1giv9s6w90lalxsijgnxzynygkckcfyaxnxsldbwv0784vwy1jcd"; }; - propagatedBuildInputs = [ wrapt pyserial ] ++ lib.optional (pythonOlder "3.5") typing; + propagatedBuildInputs = [ wrapt pyserial aenum ] ++ lib.optional (pythonOlder "3.5") typing; checkInputs = [ nose mock pytest pytest-timeout hypothesis future ]; + # Tests won't work with hypothesis 4.7.3 under Python 2. So skip the tests in + # that case. This clause can be removed once hypothesis has been upgraded in + # nixpkgs. + doCheck = !(isPy27 && (hypothesis.version == "4.7.3")); + # Add the scripts to PATH checkPhase = '' PATH=$out/bin:$PATH pytest -c /dev/null diff --git a/pkgs/development/python-modules/pvlib/default.nix b/pkgs/development/python-modules/pvlib/default.nix index 91af07b49be3..cdd6011aba2e 100644 --- a/pkgs/development/python-modules/pvlib/default.nix +++ b/pkgs/development/python-modules/pvlib/default.nix @@ -1,27 +1,26 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, pandas, pytz, six -, pytest, mock, pytest-mock }: +{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, numpy, pandas, pytz, six +, pytest, mock, pytest-mock, requests }: buildPythonPackage rec { pname = "pvlib"; - version = "0.6.1"; + version = "0.6.3"; - # Use GitHub because PyPI release tarball doesn't contain the tests. See: - # https://github.com/pvlib/pvlib-python/issues/473 - src = fetchFromGitHub{ - owner = "pvlib"; - repo = "pvlib-python"; - rev = "v${version}"; - sha256 = "17h7vz9s829qxnl4byr8458gzgiismrbrn5gl0klhfhwvc5kkdfh"; + # Support for Python <3.5 dropped in 0.6.3 on June 1, 2019. + disabled = pythonOlder "3.5"; + + src = fetchPypi{ + inherit pname version; + sha256 = "03nvgpmnscd7rh9jwm2h579zvriq5lva6rsdhb6jckpra5wjkn69"; }; checkInputs = [ pytest mock pytest-mock ]; - propagatedBuildInputs = [ numpy pandas pytz six ]; + propagatedBuildInputs = [ numpy pandas pytz six requests ]; # Skip a few tests that try to access some URLs checkPhase = '' runHook preCheck pushd pvlib/test - pytest . -k "not test_read_srml_dt_index and not test_read_srml_month_from_solardata" + pytest . -k "not test_read_srml_dt_index and not test_read_srml_month_from_solardata and not test_get_psm3" popd runHook postCheck ''; |