Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2018-12-07 15:22:35 +01:00
224 changed files with 5366 additions and 4075 deletions

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }:
stdenv.mkDerivation rec {
name = "scala-2.12.7";
name = "scala-2.12.8";
src = fetchurl {
url = "https://www.scala-lang.org/files/archive/${name}.tgz";
sha256 = "116i6sviziynbm7yffakkcnzb2jmrhvjrnbqbbnhyyi806shsnyn";
sha256 = "18w0vdbsp0q5rxglgalwlgkggld926bqi1fxc598rn4gh46a03j4";
};
propagatedBuildInputs = [ jre ] ;

View File

@@ -1,9 +1,9 @@
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, z3 }:
let
version = "0.5.0";
rev = "1d4f565a64988a3400847d2655ca24f73f234bc6";
sha256 = "0phzk2whvgrrf8xpl5pz886glhd5s40y1hbbvq9q3fxf6vc3lisy";
version = "0.5.1";
rev = "c8a2cb62832afb2dc09ccee6fd42c1516dfdb981";
sha256 = "0d6mfnixlr9m5yr3r4p6cv6vwrrivcamyar5d0f9rvir9w9ypzrr";
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz;
jsoncpp = fetchzip {
url = jsoncppURL;
@@ -28,11 +28,6 @@ stdenv.mkDerivation {
echo >commit_hash.txt "${rev}"
substituteInPlace cmake/jsoncpp.cmake \
--replace "${jsoncppURL}" ${jsoncpp}
# To allow non-standard CMAKE_INSTALL_LIBDIR (fixed in upstream, not yet released)
substituteInPlace cmake/jsoncpp.cmake \
--replace "\''${CMAKE_INSTALL_LIBDIR}" "lib" \
--replace "# Build static lib but suitable to be included in a shared lib." "-DCMAKE_INSTALL_LIBDIR=lib"
'';
cmakeFlags = [
@@ -42,7 +37,7 @@ stdenv.mkDerivation {
];
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform;
checkPhase = "LD_LIBRARY_PATH=./libsolc:./libsolidity:./liblll:./libevmasm:./libdevcore:$LD_LIBRARY_PATH " +
checkPhase = "LD_LIBRARY_PATH=./libsolc:./libsolidity:./liblll:./libevmasm:./libdevcore:./libyul:./liblangutil:$LD_LIBRARY_PATH " +
"./test/soltest -p -- --no-ipc --no-smt --testpath ../test";
nativeBuildInputs = [ cmake ];
@@ -56,7 +51,7 @@ stdenv.mkDerivation {
homepage = https://github.com/ethereum/solidity;
license = licenses.gpl3;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ dbrock akru ];
maintainers = with maintainers; [ dbrock akru lionello ];
inherit version;
};
}

View File

@@ -2,11 +2,10 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0c05208f..8893648e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,20 @@ add_subdirectory(libevmasm)
@@ -48,6 +48,25 @@ add_subdirectory(libevmasm)
add_subdirectory(libsolidity)
add_subdirectory(libsolc)
+
+install(DIRECTORY libdevcore/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libdevcore
+ FILES_MATCHING PATTERN "*.h")
@@ -16,6 +15,12 @@ index 0c05208f..8893648e 100644
+install(DIRECTORY libsolidity/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libsolidity
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY libyul/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libyul
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY liblangutil/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liblangutil
+ FILES_MATCHING PATTERN "*.h")
+install(DIRECTORY liblll/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liblll
+ FILES_MATCHING PATTERN "*.h")
@@ -57,8 +62,23 @@ index 0bdec4b4..e876177e 100644
@@ -29,6 +29,7 @@ endif()
add_library(solidity ${sources} ${headers})
target_link_libraries(solidity PUBLIC evmasm devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
target_link_libraries(solidity PUBLIC yul evmasm langutil devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+install(TARGETS solidity LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
if (${Z3_FOUND})
target_link_libraries(solidity PUBLIC ${Z3_LIBRARY})
--- a/libyul/CMakeLists.txt
+++ b/libyul/CMakeLists.txt
@@ -42,3 +42,4 @@ endif()
optimiser/VarDeclPropagator.cpp
)
-target_link_libraries(yul PUBLIC devcore)
+target_link_libraries(yul PUBLIC evmasm devcore langutil)
+install(TARGETS yul LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
--- a/liblangutil/CMakeLists.txt
+++ b/liblangutil/CMakeLists.txt
@@ -11,3 +11,4 @@ endif()
add_library(langutil ${sources})
target_link_libraries(langutil PUBLIC devcore)
+install(TARGETS langutil LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@@ -93,14 +93,9 @@ self: super: {
fdo-notify = if pkgs.stdenv.isLinux then self.fdo-notify else null;
hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify;
};
esqueleto = overrideSrc (addBuildDepend (dontCheck (dontHaddock super.esqueleto)) self.unliftio) {
src = pkgs.fetchFromGitHub {
owner = "bitemyapp";
repo = "esqueleto";
rev = "b81e0d951e510ebffca03c5a58658ad884cc6fbd";
sha256 = "0lz1qxms7cfg5p3j37inlych0r2fwhm8xbarcys3df9m7jy9nixa";
};
};
# https://github.com/bitemyapp/esqueleto/issues/105
esqueleto = markBrokenVersion "2.5.3" super.esqueleto;
# Fix test trying to access /home directory
shell-conduit = overrideCabal super.shell-conduit (drv: {
@@ -948,8 +943,12 @@ self: super: {
# Tries to read a file it is not allowed to in the test suite
load-env = dontCheck super.load-env;
# https://github.com/yesodweb/Shelly.hs/issues/162
shelly = dontCheck super.shelly;
# hledger needs a newer megaparsec version than we have in LTS 12.x.
hledger-lib = super.hledger-lib.overrideScope (self: super: {
cassava-megaparsec = self.cassava-megaparsec_2_0_0;
hspec-megaparsec = self.hspec-megaparsec_2_0_0;
megaparsec = self.megaparsec_7_0_4;
});
# Copy hledger man pages from data directory into the proper place. This code
# should be moved into the cabal2nix generator.
@@ -976,7 +975,12 @@ self: super: {
mkdir -p $out/share/info
cp -v *.info* $out/share/info/
'';
}));
})).overrideScope (self: super: {
cassava-megaparsec = self.cassava-megaparsec_2_0_0;
config-ini = self.config-ini_0_2_4_0;
hspec-megaparsec = self.hspec-megaparsec_2_0_0;
megaparsec = self.megaparsec_7_0_4;
});
hledger-web = overrideCabal super.hledger-web (drv: {
postInstall = ''
for i in $(seq 1 9); do
@@ -1188,4 +1192,10 @@ self: super: {
# https://github.com/jmillikin/chell/issues/1
chell = super.chell.override { patience = self.patience_0_1_1; };
# The test suite tries to mess with ALSA, which doesn't work in the build sandbox.
xmobar = dontCheck super.xmobar;
# https://github.com/mgajda/json-autotype/issues/25
json-autotype = dontCheck super.json-autotype;
} // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super

View File

@@ -46,7 +46,7 @@ self: super: {
# LTS-12.x versions do not compile.
base-orphans = self.base-orphans_0_8;
brick = self.brick_0_41_5;
brick = self.brick_0_42_1;
cassava-megaparsec = doJailbreak super.cassava-megaparsec;
config-ini = doJailbreak super.config-ini; # https://github.com/aisamanra/config-ini/issues/18
contravariant = self.contravariant_1_5;
@@ -54,13 +54,11 @@ self: super: {
free = self.free_5_1;
haddock-library = dontCheck super.haddock-library_1_7_0;
HaTeX = doJailbreak super.HaTeX;
hledger = doJailbreak super.hledger;
hledger-lib = doJailbreak super.hledger-lib;
hledger-ui = doJailbreak super.hledger-ui;
hpack = self.hpack_0_31_1;
hslua = self.hslua_1_0_1;
hslua-module-text = self.hslua-module-text_0_2_0;
hspec = self.hspec_2_6_0;
hspec-contrib = self.hspec-contrib_0_5_1;
hspec-core = self.hspec-core_2_6_0;
hspec-discover = self.hspec-discover_2_6_0;
hspec-megaparsec = doJailbreak super.hspec-megaparsec; # newer versions need megaparsec 7.x

View File

@@ -45,7 +45,7 @@ default-package-overrides:
- base-compat-batteries ==0.10.1
# Newer versions don't work in LTS-12.x
- cassava-megaparsec < 2
# LTS Haskell 12.20
# LTS Haskell 12.21
- abstract-deque ==0.3
- abstract-deque-tests ==0.3
- abstract-par ==0.3.3
@@ -337,8 +337,8 @@ default-package-overrides:
- cabal-doctest ==1.0.6
- cabal-rpm ==0.12.6
- cache ==0.1.1.1
- cachix ==0.1.2
- cachix-api ==0.1.0.2
- cachix ==0.1.3
- cachix-api ==0.1.0.3
- cairo ==0.13.5.0
- calendar-recycling ==0.0.0.1
- call-stack ==0.1.0
@@ -361,7 +361,7 @@ default-package-overrides:
- cereal-time ==0.1.0.0
- cereal-vector ==0.2.0.1
- cfenv ==0.1.0.0
- chan ==0.0.3
- chan ==0.0.4
- ChannelT ==0.0.0.7
- charset ==0.3.7.1
- charsetdetect-ae ==1.1.0.4
@@ -433,7 +433,7 @@ default-package-overrides:
- composition-prelude ==1.5.3.1
- compressed ==3.11
- concise ==0.1.0.1
- concurrency ==1.6.1.0
- concurrency ==1.6.2.0
- concurrent-extra ==0.7.0.12
- concurrent-output ==1.10.9
- concurrent-split ==0.0.1.1
@@ -535,7 +535,7 @@ default-package-overrides:
- data-default-instances-old-locale ==0.0.1
- data-diverse ==4.6.0.0
- data-diverse-lens ==4.3.0.0
- datadog ==0.2.2.0
- datadog ==0.2.3.0
- data-dword ==0.3.1.2
- data-endian ==0.1.1
- data-fix ==0.2.0
@@ -732,8 +732,8 @@ default-package-overrides:
- fileplow ==0.1.0.0
- filter-logger ==0.6.0.0
- filtrable ==0.1.1.0
- fin ==0.0.1
- Fin ==0.2.6.0
- fin ==0.0.1
- FindBin ==0.0.5
- find-clumpiness ==0.2.3.1
- fingertree ==0.1.4.1
@@ -982,7 +982,7 @@ default-package-overrides:
- histogram-fill ==0.9.1.0
- hjsmin ==0.2.0.2
- hlibgit2 ==0.18.0.16
- hlibsass ==0.1.7.0
- hlibsass ==0.1.8.0
- hmatrix ==0.19.0.0
- hmatrix-backprop ==0.1.2.3
- hmatrix-gsl ==0.19.0.1
@@ -1097,7 +1097,7 @@ default-package-overrides:
- hw-mquery ==0.1.0.1
- hworker ==0.1.0.1
- hw-parser ==0.0.0.3
- hw-prim ==0.6.2.20
- hw-prim ==0.6.2.22
- hw-rankselect ==0.10.0.3
- hw-rankselect-base ==0.3.2.1
- hw-string-parse ==0.0.0.4
@@ -1198,7 +1198,7 @@ default-package-overrides:
- json-rpc-server ==0.2.6.0
- json-schema ==0.7.4.2
- JuicyPixels ==3.2.9.5
- JuicyPixels-blp ==0.1.0.1
- JuicyPixels-blp ==0.1.1.0
- JuicyPixels-extra ==0.3.0
- JuicyPixels-scale-dct ==0.1.2
- justified-containers ==0.3.0.0
@@ -1294,7 +1294,7 @@ default-package-overrides:
- log-postgres ==0.7.0.2
- long-double ==0.1
- loop ==0.3.0
- lrucache ==1.2.0.0
- lrucache ==1.2.0.1
- lrucaching ==0.3.3
- lucid ==2.9.11
- lucid-extras ==0.1.0.1
@@ -1785,7 +1785,7 @@ default-package-overrides:
- rvar ==0.2.0.3
- s3-signer ==0.5.0.0
- safe ==0.3.17
- safecopy ==0.9.4.1
- safecopy ==0.9.4.2
- safe-exceptions ==0.1.7.0
- safe-exceptions-checked ==0.1.0
- safe-foldable ==0.1.0.0
@@ -2130,7 +2130,7 @@ default-package-overrides:
- transformers-fix ==1.0
- transformers-lift ==0.2.0.1
- traverse-with-class ==1.0.0.0
- tree-diff ==0.0.1
- tree-diff ==0.0.2
- tree-fun ==0.8.1.0
- trifecta ==2
- triplesec ==0.1.2.0
@@ -2323,7 +2323,7 @@ default-package-overrides:
- x509-validation ==1.6.11
- Xauth ==0.1
- xdg-basedir ==0.2.2
- xeno ==0.3.4
- xeno ==0.3.5.1
- xenstore ==0.1.1
- xhtml ==3000.2.2.1
- xls ==0.1.1

File diff suppressed because it is too large Load Diff

View File

@@ -259,6 +259,9 @@ rec {
*/
buildStrictly = pkg: buildFromSdist (failOnAllWarnings pkg);
/* Disable core optimizations, significantly speeds up build time */
disableOptimization = pkg: appendConfigureFlag pkg "--disable-optimization";
/* Turn on most of the compiler warnings and fail the build if any
of them occur. */
failOnAllWarnings = drv: appendConfigureFlag drv "--ghc-option=-Wall --ghc-option=-Werror";

View File

@@ -9,8 +9,6 @@ stdenv.mkDerivation rec {
sha256 = "0lk8knip4xk6qzksdkn7085mmgm4ixfczdyyjw656c193y3rgnvc";
};
configureFlags = stdenv.lib.optionals stdenv.hostPlatform.isWindows [ "--disable-shared" "--enable-static" ];
meta = with stdenv.lib; {
description = "A C library for asynchronous DNS requests";
homepage = https://c-ares.haxx.se;

View File

@@ -5,14 +5,14 @@
stdenv.mkDerivation (rec {
name = "libgit2-${version}";
version = "0.26.8";
version = "0.26.6";
# keep the version in sync with pythonPackages.pygit2 and gnome3.libgit2-glib
src = fetchFromGitHub {
owner = "libgit2";
repo = "libgit2";
rev = "v${version}";
sha256 = "0wmjgvz8nrpk2dsn5bcc87nl0j5hb6pah2hzrj0b6jkk9mnin9fl";
sha256 = "17pjvprmdrx4h6bb1hhc98w9qi6ki7yl57f090n9kbhswxqfs7s3";
};
cmakeFlags = [ "-DTHREADSAFE=ON" ];

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
name = "libffi-3.2.1";
src = fetchurl {
url = "ftp://sourceware.org/pub/libffi/${name}.tar.gz";
url = "https://sourceware.org/pub/libffi/${name}.tar.gz";
sha256 = "0dya49bnhianl0r65m65xndz6ls2jn1xngyn72gd28ls3n7bnvnh";
};

View File

@@ -28,8 +28,11 @@ in stdenv.mkDerivation (rec {
sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabihf.h
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
'' + lib.optionalString (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isMusl) ''
ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.hostPlatform.isMusl) ''
ln -s src/syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.arm-unknown-linux-musleabihf.h
ln -s src/syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-musleabihf.h
'';
outputs = [ "out" "dev" "info" ];

View File

@@ -0,0 +1,38 @@
{ stdenv, fetchgit, autoreconfHook, autoconf-archive, pkgconfig, kmod, enable-tools ? true }:
stdenv.mkDerivation rec {
name = "libgpiod-unstable-${version}";
version = "2018-10-07";
src = fetchgit {
url = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git";
rev = "4bf402d3a49336eacd33654441d575bd267780b8";
sha256 = "01f3jzb133z189sxdiz9qiy65p0bjqhynfllidbpxdr0cxkyyc1d";
};
buildInputs = [ kmod ];
nativeBuildInputs = [
autoconf-archive
pkgconfig
autoreconfHook
];
configureFlags = [
"--enable-tools=${if enable-tools then "yes" else "no"}"
"--enable-bindings-cxx"
"--prefix=$(out)"
];
meta = with stdenv.lib; {
description = "C library and tools for interacting with the linux GPIO character device";
longDescription = ''
Since linux 4.8 the GPIO sysfs interface is deprecated. User space should use
the character device instead. This library encapsulates the ioctl calls and
data structures behind a straightforward API.
'';
homepage = https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/;
license = licenses.lgpl2;
maintainers = [ maintainers.expipiplus1 ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,28 @@
{ stdenv, fetchurl, pkgconfig, libopus }:
let
version = "0.2.1";
in
stdenv.mkDerivation rec {
name = "libopusenc-${version}";
src = fetchurl {
url = "https://archive.mozilla.org/pub/opus/libopusenc-${version}.tar.gz";
sha256 = "1ffb0vhlymlsq70pxsjj0ksz77yfm2x0a1x8q50kxmnkm1hxp642";
};
outputs = [ "out" "dev" ];
doCheck = true;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libopus ];
meta = with stdenv.lib; {
description = "Library for encoding .opus audio files and live streams";
license = licenses.bsd3;
homepage = http://www.opus-codec.org/;
platforms = platforms.unix;
maintainers = with maintainers; [ pmiddend ];
};
}

View File

@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
meta = {
description = "A C++ library to access PostgreSQL databases";
homepage = http://pqxx.org/development/libpqxx/;
license = lib.licenses.postgresql;
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.eelco ];
};

View File

@@ -3,7 +3,7 @@
}:
let
version = "1.1.10";
version = "1.1.11";
formattedVersion = lib.replaceChars ["."] ["_"] version;
# Make sure we override python, so the correct version is chosen
@@ -16,8 +16,8 @@ in stdenv.mkDerivation {
src = fetchFromGitHub {
owner = "arvidn";
repo = "libtorrent";
rev = "libtorrent-${formattedVersion}";
sha256 = "0qj1rz52jk95m43cr7l3fi9jmf4pwxncp5mq4hi2vzacfnf79yms";
rev = "libtorrent_${formattedVersion}";
sha256 = "0nwdsv6d2gkdsh7l5a46g6cqx27xwh3msify5paf02l1qzjy4s5l";
};
enableParallelBuilding = true;

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, hunspell, pkgconfig, perl }:
{ stdenv, fetchurl, hunspell, ncurses, pkgconfig, perl }:
stdenv.mkDerivation rec {
name = "mythes-1.2.4";
@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [ hunspell ];
nativeBuildInputs = [ pkgconfig perl ];
nativeBuildInputs = [ ncurses pkgconfig perl ];
meta = {
homepage = http://hunspell.sourceforge.net/;

View File

@@ -4,6 +4,7 @@
, mouseSupport ? false
, unicode ? true
, enableStatic ? stdenv.hostPlatform.useAndroidPrebuilt
, enableShared ? !enableStatic
, withCxx ? !stdenv.hostPlatform.useAndroidPrebuilt
, gpm
@@ -29,7 +30,7 @@ stdenv.mkDerivation rec {
setOutputFlags = false; # some aren't supported
configureFlags = [
"--with-shared"
(lib.withFeature enableShared "shared")
"--without-debug"
"--enable-pc-files"
"--enable-symlinks"

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, qtbase, qtquick1, qmake, qtmultimedia }:
{ stdenv, fetchFromGitHub, qtbase, qtquick1, qmake, qtmultimedia, utmp }:
stdenv.mkDerivation rec {
version = "0.1.0";
@@ -11,7 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "0ca500mzcqglkj0i6km0z512y3a025dbm24605xyv18l6y0l2ny3";
};
buildInputs = [ qtbase qtquick1 qtmultimedia ];
buildInputs = [ qtbase qtquick1 qtmultimedia ]
++ stdenv.lib.optional stdenv.isDarwin utmp;
nativeBuildInputs = [ qmake ];
patchPhase = ''
@@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
description = "A QML port of qtermwidget";
homepage = https://github.com/Swordfish90/qmltermwidget;
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
platforms = with stdenv.lib.platforms; linux ++ darwin;
maintainers = with stdenv.lib.maintainers; [ skeidel ];
};
}

View File

@@ -1,6 +1,7 @@
{ stdenv
, fetchurl
, static ? false
, static ? true
, shared ? true
}:
stdenv.mkDerivation (rec {
@@ -24,13 +25,15 @@ stdenv.mkDerivation (rec {
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
'';
outputs = [ "out" "dev" "static" ];
outputs = [ "out" "dev" ]
++ stdenv.lib.optional (shared && static) "static";
setOutputFlags = false;
outputDoc = "dev"; # single tiny man3 page
configureFlags = stdenv.lib.optional (!static) "--shared";
configureFlags = stdenv.lib.optional shared "--shared"
++ stdenv.lib.optional (static && !shared) "--static";
postInstall = ''
postInstall = stdenv.lib.optionalString (shared && static) ''
moveToOutput lib/libz.a "$static"
''
# jww (2015-01-06): Sometimes this library install as a .so, even on
@@ -64,7 +67,7 @@ stdenv.mkDerivation (rec {
"PREFIX=${stdenv.cc.targetPrefix}"
] ++ stdenv.lib.optionals (stdenv.hostPlatform.libc == "msvcrt") [
"-f" "win32/Makefile.gcc"
] ++ stdenv.lib.optionals (!static) [
] ++ stdenv.lib.optionals shared [
"SHARED_MODE=1"
];

View File

@@ -0,0 +1,25 @@
args @ { fetchurl, ... }:
rec {
baseName = ''cl-jpeg'';
version = ''20170630-git'';
description = ''A self-contained baseline JPEG codec implementation'';
deps = [ ];
src = fetchurl {
url = ''http://beta.quicklisp.org/archive/cl-jpeg/2017-06-30/cl-jpeg-20170630-git.tgz'';
sha256 = ''1wwzn2valhh5ka7qkmab59pb1ijagcj296553fp8z03migl0sil0'';
};
packageName = "cl-jpeg";
asdFilesToKeep = ["cl-jpeg.asd"];
overrides = x: x;
}
/* (SYSTEM cl-jpeg DESCRIPTION
A self-contained baseline JPEG codec implementation SHA256
1wwzn2valhh5ka7qkmab59pb1ijagcj296553fp8z03migl0sil0 URL
http://beta.quicklisp.org/archive/cl-jpeg/2017-06-30/cl-jpeg-20170630-git.tgz
MD5 b6eb4ca5d893f428b5bbe46cd49f76ad NAME cl-jpeg FILENAME cl-jpeg DEPS NIL
DEPENDENCIES NIL VERSION 20170630-git SIBLINGS NIL PARASITES NIL) */

View File

@@ -0,0 +1,27 @@
args @ { fetchurl, ... }:
rec {
baseName = ''cl-pdf'';
version = ''20170830-git'';
description = ''Common Lisp PDF Generation Library'';
deps = [ args."iterate" args."uiop" args."zpb-ttf" ];
src = fetchurl {
url = ''http://beta.quicklisp.org/archive/cl-pdf/2017-08-30/cl-pdf-20170830-git.tgz'';
sha256 = ''1x4zk6l635f121p1anfd7d807iglyrlhsnmygydw5l49m3h6n08s'';
};
packageName = "cl-pdf";
asdFilesToKeep = ["cl-pdf.asd"];
overrides = x: x;
}
/* (SYSTEM cl-pdf DESCRIPTION Common Lisp PDF Generation Library SHA256
1x4zk6l635f121p1anfd7d807iglyrlhsnmygydw5l49m3h6n08s URL
http://beta.quicklisp.org/archive/cl-pdf/2017-08-30/cl-pdf-20170830-git.tgz
MD5 f865503aff50c0a4732a7a4597bdcc25 NAME cl-pdf FILENAME cl-pdf DEPS
((NAME iterate FILENAME iterate) (NAME uiop FILENAME uiop)
(NAME zpb-ttf FILENAME zpb-ttf))
DEPENDENCIES (iterate uiop zpb-ttf) VERSION 20170830-git SIBLINGS
(cl-pdf-parser) PARASITES NIL) */

View File

@@ -0,0 +1,28 @@
args @ { fetchurl, ... }:
rec {
baseName = ''cl-typesetting'';
version = ''20170830-git'';
description = ''Common Lisp Typesetting system'';
deps = [ args."cl-pdf" args."iterate" args."zpb-ttf" ];
src = fetchurl {
url = ''http://beta.quicklisp.org/archive/cl-typesetting/2017-08-30/cl-typesetting-20170830-git.tgz'';
sha256 = ''1mkdr02qikzij3jiyrqy0dldzy8wsnvgcpznfha6x8p2xap586z3'';
};
packageName = "cl-typesetting";
asdFilesToKeep = ["cl-typesetting.asd"];
overrides = x: x;
}
/* (SYSTEM cl-typesetting DESCRIPTION Common Lisp Typesetting system SHA256
1mkdr02qikzij3jiyrqy0dldzy8wsnvgcpznfha6x8p2xap586z3 URL
http://beta.quicklisp.org/archive/cl-typesetting/2017-08-30/cl-typesetting-20170830-git.tgz
MD5 e12b9f249c60c220c5dc4a0939eb3343 NAME cl-typesetting FILENAME
cl-typesetting DEPS
((NAME cl-pdf FILENAME cl-pdf) (NAME iterate FILENAME iterate)
(NAME zpb-ttf FILENAME zpb-ttf))
DEPENDENCIES (cl-pdf iterate zpb-ttf) VERSION 20170830-git SIBLINGS
(xml-render cl-pdf-doc) PARASITES NIL) */

View File

@@ -28,12 +28,14 @@ cl-fuse
cl-fuse-meta-fs
cl-html-parse
cl-html5-parser
cl-jpeg
cl-json
cl-l10n
cl-libuv
cl-mysql
closer-mop
closure-html
cl-pdf
cl-ppcre
cl-ppcre-template
cl-ppcre-unicode
@@ -50,6 +52,7 @@ cl-syntax-annot
cl-syntax-anonfun
cl-syntax-markup
cl-test-more
cl-typesetting
cl-unicode
cl-unification
cl-utilities

View File

@@ -278,14 +278,6 @@ let quicklisp-to-nix-packages = rec {
}));
"zpb-ttf" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."zpb-ttf" or (x: {}))
(import ./quicklisp-to-nix-output/zpb-ttf.nix {
inherit fetchurl;
}));
"cl-store" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."cl-store" or (x: {}))
@@ -359,6 +351,14 @@ let quicklisp-to-nix-packages = rec {
"cl-ppcre-test" = quicklisp-to-nix-packages."cl-ppcre";
"zpb-ttf" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."zpb-ttf" or (x: {}))
(import ./quicklisp-to-nix-output/zpb-ttf.nix {
inherit fetchurl;
}));
"puri" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."puri" or (x: {}))
@@ -1907,6 +1907,17 @@ let quicklisp-to-nix-packages = rec {
}));
"cl-typesetting" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."cl-typesetting" or (x: {}))
(import ./quicklisp-to-nix-output/cl-typesetting.nix {
inherit fetchurl;
"cl-pdf" = quicklisp-to-nix-packages."cl-pdf";
"iterate" = quicklisp-to-nix-packages."iterate";
"zpb-ttf" = quicklisp-to-nix-packages."zpb-ttf";
}));
"cl-test-more" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."cl-test-more" or (x: {}))
@@ -2103,6 +2114,17 @@ let quicklisp-to-nix-packages = rec {
}));
"cl-pdf" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."cl-pdf" or (x: {}))
(import ./quicklisp-to-nix-output/cl-pdf.nix {
inherit fetchurl;
"iterate" = quicklisp-to-nix-packages."iterate";
"uiop" = quicklisp-to-nix-packages."uiop";
"zpb-ttf" = quicklisp-to-nix-packages."zpb-ttf";
}));
"closure-html" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."closure-html" or (x: {}))
@@ -2190,6 +2212,14 @@ let quicklisp-to-nix-packages = rec {
}));
"cl-jpeg" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."cl-jpeg" or (x: {}))
(import ./quicklisp-to-nix-output/cl-jpeg.nix {
inherit fetchurl;
}));
"cl-html5-parser" = buildLispPackage
((f: x: (x // (f x)))
(qlOverrides."cl-html5-parser" or (x: {}))

View File

@@ -1,17 +1,17 @@
{ stdenv, fetchzip, buildDunePackage, configurator, cppo, lablgtk }:
{ lib, fetchzip, buildDunePackage, configurator, cppo, lablgtk }:
buildDunePackage rec {
pname = "camlimages";
version = "5.0.0";
version = "5.0.1";
src = fetchzip {
url = "https://bitbucket.org/camlspotter/${pname}/get/${version}.tar.gz";
sha256 = "00qvwxkfnhv93yi1iq7vy3p5lxyi9xigxcq464s4ii6bmp32d998";
sha256 = "1figrgzsdrrxzfza0bhz0225g1rwawdf5x2m9lw2kzrdb815khs5";
};
buildInputs = [ configurator cppo lablgtk ];
meta = with stdenv.lib; {
meta = with lib; {
branch = "5.0";
homepage = https://bitbucket.org/camlspotter/camlimages;
description = "OCaml image processing library";

View File

@@ -1,37 +1,38 @@
{ lib, buildOcaml, fetchurl, ocaml }:
{ stdenv, lib, fetchurl, fetchpatch, fetchFromGitHub, ocaml, findlib }:
if lib.versionAtLeast ocaml.version "4.06"
then throw "FrontC is not available for OCaml ${ocaml.version}"
else
let
meta_file = fetchurl {
url = https://raw.githubusercontent.com/ocaml/opam-repository/3c191ae9356ca7b3b628f2707cfcb863db42480f/packages/FrontC/FrontC.3.4.1/files/META;
sha256 = "0s2wsinycldk8y5p09xd0hsgbhckhy7bkghzl63bph6mwv64kq2d";
};
in
buildOcaml rec {
name = "FrontC";
version = "3.4";
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-FrontC-${version}";
version = "3.4.1";
src = fetchurl {
url = "http://www.irit.fr/recherches/ARCHI/MARCH/frontc/Frontc-${version}.tgz";
sha256 = "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g";
src = fetchFromGitHub {
owner = "BinaryAnalysisPlatform";
repo = "FrontC";
rev = "V_3_4_1";
sha256 = "1dq5nks0c9gsbr1m8k39m1bniawr5hqcy1r8x5px7naa95ch06ak";
};
buildInputs = [ ocaml findlib ];
meta = with lib; {
homepage = https://www.irit.fr/recherches/ARCHI/MARCH/rubrique.php3?id_rubrique=61;
inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
description = "C Parsing Library";
license = licenses.lgpl21;
maintainers = [ maintainers.maurer ];
};
meta_file = fetchurl {
url = https://raw.githubusercontent.com/ocaml/opam-repository/0f0e610f6499bdf0151e4170411b4f05e4d076d4/packages/FrontC/FrontC.3.4/files/META;
sha256 = "1flhvwr01crn7d094kby0418s1m4198np85ymjp3b4maz0n7m2mx";
};
opam_patch = fetchurl {
url = https://raw.githubusercontent.com/ocaml/opam-repository/0f0e610f6499bdf0151e4170411b4f05e4d076d4/packages/FrontC/FrontC.3.4/files/opam.patch;
sha256 = "0xf83ixx0mf3mznwpwp2mjflii0njdzikhhfxpnms7vhnnmlfzy5";
};
patches = [ opam_patch ];
patchFlags = "-p4";
patches = [ (fetchpatch {
url = https://raw.githubusercontent.com/ocaml/opam-repository/3c191ae9356ca7b3b628f2707cfcb863db42480f/packages/FrontC/FrontC.3.4.1/files/opam.patch;
sha256 = "0v4f6740jbj1kxg1y03dzfa3x3gsrhv06wpzdj30gl4ki5fvj4hs";
})
];
makeFlags = "PREFIX=$(out) OCAML_SITE=$(OCAMLFIND_DESTDIR)";

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, which, ocaml, findlib, camlp4
{ stdenv, fetchzip, which, ocaml, findlib, camlp4
, camlzip, camomile, extlib
}:
@@ -8,15 +8,14 @@ else
let
pname = "javalib";
webpage = "http://sawja.inria.fr/";
in
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-${pname}-${version}";
version = "2.3.5";
version = "3.0";
src = fetchurl {
url = "https://gforge.inria.fr/frs/download.php/file/37655/javalib-2.3.5.tar.bz2";
sha256 = "1gks12ghcmv9lm8j4diw8bvjqxfl7xwk0sxbi227saxg9irpwwkd";
src = fetchzip {
url = "https://github.com/javalib-team/javalib/archive/v${version}.tar.gz";
sha256 = "02zgn1z1wj3rbg9xqmbagys91bnsy27iwrngkivzhlykyaw9vf6n";
};
buildInputs = [ which ocaml findlib camlp4 ];
@@ -30,17 +29,11 @@ stdenv.mkDerivation rec {
configureScript = "./configure.sh";
dontAddPrefix = "true";
preBuild = ''
make ptrees;
make installptrees;
export OCAMLPATH=$out/lib/ocaml/${ocaml.version}/site-lib/:$OCAMLPATH;
'';
propagatedBuildInputs = [ camlzip camomile extlib ];
meta = with stdenv.lib; {
description = "A library that parses Java .class files into OCaml data structures";
homepage = "${webpage}";
homepage = https://javalib-team.github.io/javalib/;
license = licenses.lgpl3;
maintainers = [ maintainers.vbgl ];
platforms = ocaml.meta.platforms or [];

View File

@@ -4,7 +4,7 @@ assert stdenv.lib.versionAtLeast (stdenv.lib.getVersion ocaml) "3.12";
let
pname = "sawja";
version = "1.5.3";
version = "1.5.6";
webpage = "http://sawja.inria.fr/";
in
stdenv.mkDerivation rec {
@@ -12,8 +12,8 @@ stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-${pname}-${version}";
src = fetchurl {
url = https://gforge.inria.fr/frs/download.php/file/37403/sawja-1.5.3.tar.bz2;
sha256 = "17vfknr126vfhpmr14j75sg8r47xz7pw7fba4nsdw3k7rq43vcn2";
url = https://gforge.inria.fr/frs/download.php/file/37819/sawja-1.5.6.tar.bz2;
sha256 = "0dkfdc8h94r7kj4p8q57fz7fssypgmjrix8xff0va7x1nya5sdp3";
};
buildInputs = [ which perl ocaml findlib camlp4 ];

View File

@@ -1,9 +1,16 @@
{ stdenv, fetchFromGitHub, buildDunePackage, czmq, stdint }:
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, czmq, stdint }:
buildDunePackage rec {
pname = "zmq";
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "zmq is not available for OCaml ${ocaml.version}"
else
let __dune = dune; in
let dune = __dune.override { ocamlPackages = { inherit ocaml findlib; }; };
in
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-zmq-${version}";
version = "20180726";
src = fetchFromGitHub {
owner = "issuu";
repo = "ocaml-zmq";
@@ -15,13 +22,19 @@ buildDunePackage rec {
./ocaml-zmq-issue43.patch
];
buildInputs = [ czmq ];
buildInputs = [ ocaml findlib dune czmq ];
propagatedBuildInputs = [ stdint ];
buildPhase = "dune build -p zmq";
inherit (dune) installPhase;
meta = with stdenv.lib; {
description = "ZeroMQ bindings for OCaml";
license = licenses.mit;
maintainers = with maintainers; [ akavel ];
inherit (src.meta) homepage;
inherit (ocaml.meta) platforms;
};
}

View File

@@ -1,13 +1,12 @@
{ gui ? true,
buildPythonPackage, fetchFromGitHub, lib,
sphinx_1_2, lxml, isodate, numpy, pytest,
tkinter ? null, py3to2, isPy3k,
sphinx, lxml, isodate, numpy, pytest, openpyxl,
tkinter ? null, py3to2, isPy3k, python,
... }:
buildPythonPackage rec {
pname = "arelle-${version}${lib.optionalString (!gui) "-headless"}";
version = "2017-08-24";
name = pname + "-" + version;
pname = "arelle${lib.optionalString (!gui) "-headless"}";
version = "18.3";
disabled = !isPy3k;
@@ -16,8 +15,8 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "Arelle";
repo = "Arelle";
rev = "cb24e35d57b562a864ae3dd4542c4d9fcf3865fe";
sha256 = "1sbvhb3xlfnyvf1xj9dxwpcrfiaf7ikkdwvvap7aaxfxgiz85ip2";
rev = "edgr${version}";
sha256 = "12a94ipdp6xalqyds7rcp6cjwps6fbj3byigzfy403hlqc9n1g33";
};
outputs = ["out" "doc"];
patches = [
@@ -25,7 +24,7 @@ buildPythonPackage rec {
];
postPatch = "rm testParser2.py";
buildInputs = [
sphinx_1_2
sphinx
pytest
py3to2
];
@@ -33,6 +32,7 @@ buildPythonPackage rec {
lxml
isodate
numpy
openpyxl
] ++ lib.optional gui [
tkinter
];
@@ -40,6 +40,12 @@ buildPythonPackage rec {
# arelle-gui is useless without gui dependencies, so delete it when !gui.
postInstall = lib.optionalString (!gui) ''
find $out/bin -name "*arelle-gui*" -delete
'' +
# By default, not the entirety of the src dir is copied. This means we don't
# copy the `images` dir, which is needed for the gui version.
lib.optionalString (gui) ''
targetDir=$out/${python.sitePackages}
cp -vr $src/arelle $targetDir
'';
# Documentation
@@ -49,11 +55,14 @@ buildPythonPackage rec {
doCheck = if gui then true else false;
meta = {
description = "An open source facility for XBRL, the eXtensible Business Reporting Language supporting various standards, exposed through a python or REST API" + lib.optionalString gui " and a graphical user interface";
meta = with lib; {
description = ''
An open source facility for XBRL, the eXtensible Business Reporting
Language supporting various standards, exposed through a Python or
REST API'' + lib.optionalString gui " and a graphical user interface";
homepage = http://arelle.org/;
license = lib.licenses.asl20;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ roberth ];
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ roberth ];
};
}

View File

@@ -3,7 +3,7 @@ index a64bb1b..dc0299d 100644
--- c/arelle/CntlrProfiler.py
+++ i/arelle/CntlrProfiler.py
@@ -1,5 +1,6 @@
-import Cntlr, ModelManager, FileSource, time
+from arelle import Cntlr, ModelManager, FileSource
+import time
@@ -12,21 +12,3 @@ index a64bb1b..dc0299d 100644
import gettext
diff --git c/arelle/ValidateFilingText.py i/arelle/ValidateFilingText.py
index 12dbbbb..c0e98c3 100644
--- c/arelle/ValidateFilingText.py
+++ i/arelle/ValidateFilingText.py
@@ -16,7 +16,7 @@ XMLdeclaration = re.compile(r"<\?xml.*\?>", re.DOTALL)
XMLpattern = re.compile(r".*(<|&lt;|&#x3C;|&#60;)[A-Za-z_]+[A-Za-z0-9_:]*[^>]*(/>|>|&gt;|/&gt;).*", re.DOTALL)
CDATApattern = re.compile(r"<!\[CDATA\[(.+)\]\]")
#EFM table 5-1 and all &xxx; patterns
-docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\\:;\"'<>,_?/=\t\n\r\m\f]") # won't match &#nnn;
+docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\\:;\"'<>,_?/=\t\n\r\f]") # won't match &#nnn;
namedEntityPattern = re.compile("&[_A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]"
r"[_\-\.:"
"\xB7A-Za-z0-9\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u0300-\u036F\u203F-\u2040]*;")
@@ -904,4 +904,4 @@ def referencedFiles(modelXbrl, localFilesOnly=True):
# footnote or other elements
for elt in modelXbrl.modelDocument.xmlRootElement.iter("{http://www.w3.org/1999/xhtml}a", "{http://www.w3.org/1999/xhtml}img"):
addReferencedFile(elt, elt)
- return referencedFiles
\ No newline at end of file
+ return referencedFiles

View File

@@ -5,13 +5,13 @@
buildPythonPackage rec {
pname = "astroid";
version = "2.0.4";
version = "2.1.0";
disabled = pythonOlder "3.4";
src = fetchPypi {
inherit pname version;
sha256 = "c7013d119ec95eb626f7a2011f0b63d0c9a095df9ad06d8507b37084eada1a8d";
sha256 = "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m";
};
# From astroid/__pkginfo__.py

View File

@@ -1,18 +1,28 @@
{ stdenv, buildPythonPackage, fetchPypi, isPy3k
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, fetchpatch
, cairocffi, cssselect2, defusedxml, pillow, tinycss2
, pytestrunner, pytestcov, pytest-flake8, pytest-isort }:
buildPythonPackage rec {
pname = "CairoSVG";
version = "2.1.3";
version = "2.2.1";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "e512f555f576b6462b04b585c4ba4c09a43f3a8fec907b60ead21d7d00c550e9";
sha256 = "93c5b3204478c4e20c4baeb33807db5311b4420c21db2f21034a6deda998cb14";
};
patches = [
# Fix tests. Remove with the next release
(fetchpatch {
url = https://github.com/Kozea/CairoSVG/commit/1f403ad229f0e2782d6427a79f0fbeb6b76148b6.patch;
sha256 = "1dxpj5zh8wmx9f8pj11hrixd5jlaqq5xlcdnbl462bh29zj18l26";
})
];
LC_ALL="en_US.UTF-8";
propagatedBuildInputs = [ cairocffi cssselect2 defusedxml pillow tinycss2 ];
checkInputs = [ pytestrunner pytestcov pytest-flake8 pytest-isort ];

View File

@@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, blessings, mock, nose, pyte, wcwidth, typing }:
{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder, blessings, mock, nose, pyte, wcwidth, typing }:
buildPythonPackage rec {
pname = "curtsies";
@@ -8,7 +8,16 @@ buildPythonPackage rec {
sha256 = "89c802ec051d01dec6fc983e9856a3706e4ea8265d2940b1f6d504a9e26ed3a9";
};
propagatedBuildInputs = [ blessings wcwidth typing ];
patches = [
# Fix dependency on typing. Remove with the next release
(fetchpatch {
url = https://github.com/bpython/curtsies/commit/217b4f83e954837f8adc4c549c1f2f9f2bb272a7.patch;
sha256 = "1d3zwx9c7i0drb4nvydalm9mr83jrvdm75ffgisri89h337hiffs";
})
];
propagatedBuildInputs = [ blessings wcwidth ]
++ stdenv.lib.optionals (pythonOlder "3.5") [ typing ];
checkInputs = [ mock pyte nose ];
@@ -18,7 +27,7 @@ buildPythonPackage rec {
meta = with stdenv.lib; {
description = "Curses-like terminal wrapper, with colored strings!";
homepage = https://pypi.python.org/pypi/curtsies;
homepage = https://github.com/bpython/curtsies;
license = licenses.mit;
maintainers = with maintainers; [ flokli ];
};

View File

@@ -1,14 +0,0 @@
--- a/setup.py 2014-02-04 16:12:37.021993713 +0100
+++ b/setup.py 2014-02-04 16:11:42.653995607 +0100
@@ -13,8 +13,8 @@
package_dir = {'': 'src'},
packages = ['fedpkg'],
scripts = ['src/bin/fedpkg'],
- data_files = [('/etc/bash_completion.d', ['src/fedpkg.bash']),
- ('/etc/rpkg', ['src/fedpkg.conf']),
- ('/usr/libexec/', ['src/fedpkg-fixbranches.py']),
+ data_files = [('etc/bash_completion.d', ['src/fedpkg.bash']),
+ ('etc/rpkg', ['src/fedpkg.conf']),
+ ('libexec/', ['src/fedpkg-fixbranches.py']),
]
)

View File

@@ -1,26 +0,0 @@
{ stdenv, buildPythonPackage, isPy3k, fetchurl, rpkg, offtrac, urlgrabber }:
buildPythonPackage rec {
pname = "fedpkg";
version = "1.29";
name = "${pname}-${version}";
disabled = isPy3k;
src = fetchurl {
url = "https://releases.pagure.org/fedpkg/${name}.tar.bz2";
sha256 = "1cpy5p1rp7w52ighz3ynvhyw04z86y8phq3n8563lj6ayr8pw631";
};
#patches = [ ../development/python-modules/fedpkg-buildfix.diff ];
propagatedBuildInputs = [ rpkg offtrac urlgrabber ];
doCheck = false; # requires fedora_cert which isn't used anymore
meta = with stdenv.lib; {
description = "Subclass of the rpkg project for dealing with rpm packaging";
homepage = https://pagure.io/fedpkg;
license = licenses.gpl2;
maintainers = with maintainers; [ ];
};
}

View File

@@ -1,4 +1,4 @@
{ lib, fetchFromGitHub, buildPythonPackage, flake8, six }:
{ lib, fetchFromGitHub, buildPythonPackage, fetchpatch, flake8, six }:
buildPythonPackage rec {
pname = "flake8-future-import";
@@ -12,6 +12,14 @@ buildPythonPackage rec {
sha256 = "00fpxa6g8cabybnciwnpsbg60zhgydc966jgwyyggw1pcg0frdqr";
};
patches = [
# Add Python 3.7 support. Remove with the next release
(fetchpatch {
url = https://github.com/xZise/flake8-future-import/commit/cace194a44d3b95c9c1ed96640bae49183acca04.patch;
sha256 = "17pkqnh035j5s5c53afs8bk49bq7lnmdwqp5k7izx7sw80z73p9r";
})
];
propagatedBuildInputs = [ flake8 six ];
meta = {

View File

@@ -1,15 +1,13 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, pythonAtLeast
{ stdenv, buildPythonPackage, fetchPypi, pythonAtLeast
, flask, blinker, nose, mock, semantic-version }:
buildPythonPackage rec {
pname = "Flask-Login";
version = "0.4.1";
src = fetchFromGitHub {
owner = "maxcountryman";
repo = "flask-login";
rev = version;
sha256 = "1rj0qwyxapxnp84fi4lhmvh3d91fdiwz7hibw77x3d5i72knqaa9";
src = fetchPypi {
inherit pname version;
sha256 = "1v2j8zd558xfmgn3rfbw0xz4vizjcnk8kqw52q4f4d9ygfnc25f8";
};
checkInputs = [ nose mock semantic-version ];

View File

@@ -1,22 +1,21 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, fetchPypi
, nose
, six
}:
buildPythonPackage rec {
version = "0.7.0";
version = "0.8.1";
pname = "parsimonious";
src = fetchFromGitHub {
repo = "parsimonious";
owner = "erikrose";
rev = version;
sha256 = "087npc8ccryrxabmqifcz56w4wd0hzmv0mc91wrbhc1sil196j0a";
src = fetchPypi {
inherit pname version;
sha256 = "3add338892d580e0cb3b1a39e4a1b427ff9f687858fdd61097053742391a9f6b";
};
propagatedBuildInputs = [ nose six ];
checkInputs = [ nose ];
propagatedBuildInputs = [ six ];
meta = with stdenv.lib; {
homepage = "https://github.com/erikrose/parsimonious";

View File

@@ -13,8 +13,18 @@ buildPythonPackage rec {
buildInputs = [ doctest-ignore-unicode mock nose ];
propagatedBuildInputs = [ graphviz pkgconfig ];
# the tests are currently failing:
# check status of pygraphviz/pygraphviz#129
patches = [
# pygraphviz depends on graphviz being in PATH. This patch always prepends
# graphviz to PATH.
./graphviz-path.patch
];
postPatch = ''
substituteInPlace pygraphviz/agraph.py --subst-var-by graphvizPath '${graphviz}/bin'
'';
# The tests are currently failing because of a bug in graphviz 2.40.1.
# Upstream does not want to skip the relevant tests:
# https://github.com/pygraphviz/pygraphviz/pull/129
doCheck = false;
meta = with stdenv.lib; {

View File

@@ -0,0 +1,13 @@
diff --git a/pygraphviz/agraph.py b/pygraphviz/agraph.py
index 8f72024..2d8358e 100644
--- a/pygraphviz/agraph.py
+++ b/pygraphviz/agraph.py
@@ -1557,7 +1557,7 @@ class AGraph(object):
import os
import glob
- paths = os.environ["PATH"]
+ paths = '@graphvizPath@:' + os.environ["PATH"]
if os.name == "nt":
exe = ".exe"
else:

View File

@@ -3,13 +3,13 @@
buildPythonPackage rec {
pname = "pylint";
version = "2.1.1";
version = "2.2.2";
disabled = pythonOlder "3.4";
src = fetchPypi {
inherit pname version;
sha256 = "31142f764d2a7cd41df5196f9933b12b7ee55e73ef12204b648ad7e556c119fb";
sha256 = "14klyan9lqanyi8qhrbn65k7bgv9p7i7ply662r2lr27wydf57b8";
};
checkInputs = [ pytest pytestrunner pyenchant ];

View File

@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, fontconfig, python, freefont_ttf, makeFontsConf }:
{ lib, buildPythonPackage, fetchPypi, fontconfig, python, cython, freefont_ttf, makeFontsConf }:
let
fontsConf = makeFontsConf {
@@ -14,6 +14,11 @@ in buildPythonPackage rec {
};
buildInputs = [ fontconfig ];
nativeBuildInputs = [ cython ];
preBuild = ''
${python.interpreter} setup.py build_ext -i
'';
checkPhase = ''
export FONTCONFIG_FILE=${fontsConf};

View File

@@ -1,50 +1,57 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, libxml2
, m2crypto, ply, pyyaml, six
, httpretty, lxml, mock, pytest, requests
{ lib, buildPythonPackage, fetchPypi, libxml2
, m2crypto, ply, pyyaml, six, pbr, pythonOlder, isPy37, python
, httpretty, lxml, mock, pytest, requests, decorator, unittest2
}:
buildPythonPackage rec {
pname = "pywbem";
version = "0.10.0";
version = "0.12.6";
src = fetchFromGitHub {
owner = "pywbem";
repo = "pywbem";
rev = "v${version}";
sha256 = "0jcwklip03xcni0dvsk9va8ilqz21g4fxwqd5kzvv91slaadfcym";
# Support added in master https://github.com/pywbem/pywbem/commit/b2f2f1a151a30355bbc6652dca69a7b30bfe941e awaiting release
disabled = isPy37;
src = fetchPypi {
inherit pname version;
sha256 = "1dc6b745rrys600n05apdf6lb2vv5arlcwv7aiz9whgkbcd9qhki";
};
patches = [
# fix timezone handling so the tests pass again. Can go when 0.10.1 is released
# https://github.com/pywbem/pywbem/issues/755#issuecomment-327508681
./make_cimdatetime_timezone_aware.patch
propagatedBuildInputs = [
mock
pbr
ply
pyyaml
six
] ++ lib.optionals (pythonOlder "3.0") [ m2crypto ];
checkInputs = [
decorator
httpretty
libxml2
lxml
pytest
requests
unittest2
];
propagatedBuildInputs = [ m2crypto ply pyyaml six ];
postPatch = ''
# Uses deprecated library yamlordereddictloader
rm testsuite/test_client.py
checkInputs = [ httpretty lxml mock pytest requests ];
# 1 test fails because it doesn't like running in our sandbox. Deleting the
# whole file is admittedly a little heavy-handed but at least the vast
# majority of tests are run.
checkPhase = ''
rm testsuite/testclient/networkerror.yaml
substituteInPlace makefile \
--replace "PYTHONPATH=." "" \
--replace '--cov $(package_name) --cov-config coveragerc' ""
for f in testsuite/test_cim_xml.py testsuite/validate.py ; do
substituteInPlace $f --replace "'xmllint" "'${stdenv.lib.getBin libxml2}/bin/xmllint"
done
make PATH=$PATH:${stdenv.lib.getBin libxml2}/bin test
# Wants `wbemcli` in PATH
rm testsuite/test_wbemcli.py
# Disables tests that use testfixtures which is currently broken by nonbuilding zope_component
rm testsuite/{test_logging,test_recorder,test_wbemconnection_mock}.*
'';
meta = with stdenv.lib; {
description = "Support for the WBEM standard for systems management.";
homepage = http://pywbem.github.io/pywbem/;
license = licenses.gpl2;
checkPhase = ''
pytest testsuite/
'';
meta = with lib; {
description = "Support for the WBEM standard for systems management";
homepage = https://pywbem.github.io;
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ peterhoeg ];
};
}

View File

@@ -1,491 +0,0 @@
From bb7fa19d636d999bf844d80939e155b8f212ef3e Mon Sep 17 00:00:00 2001
From: Andreas Maier <maiera@de.ibm.com>
Date: Fri, 23 Jun 2017 19:13:51 +0200
Subject: [PATCH] Made CIMDateTime always timezone-aware, re-enabled
test_cim_types.py
Details:
- Ensured that 'CIMDateTime' objects for point in time values are
timezone-aware when supplied with a timezone-naive 'datetime'
object. This does not change the behavior, but increases code
clarity.
- Clarified that in the documentation of 'CIMDateTime'.
- Added testcases for CIMDateTime.
- Re-enabled the testing of test_cim_types.py. Since its change
to using pytest it was not run because the test methods were
all static methods which apparently does not work. Not sure
this ever worked.
Signed-off-by: Andreas Maier <maiera@de.ibm.com>
---
docs/changes.rst | 5 +
pywbem/cim_types.py | 22 +--
testsuite/test_cim_types.py | 369 +++++++++++++++++++++++---------------------
3 files changed, 207 insertions(+), 189 deletions(-)
diff --git a/docs/changes.rst b/docs/changes.rst
index 272ed30d..6fdfbcf4 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -72,6 +72,11 @@ Enhancements
* Added unit test for recorder. See issue #676
+* Ensured that `CIMDateTime` objects for point in time values are
+ timezone-aware when supplied with a timezone-naive `datetime` object.
+ This does not change the behavior, but increases code clarity.
+ Clarified that in the documentation of `CIMDateTime`. See issue #698.
+
Bug fixes
^^^^^^^^^
diff --git a/pywbem/cim_types.py b/pywbem/cim_types.py
index 6d1f140c..5ecc7707 100644
--- a/pywbem/cim_types.py
+++ b/pywbem/cim_types.py
@@ -74,6 +74,7 @@
import re
import warnings
import six
+import copy
from . import config
@@ -294,9 +295,11 @@ def __init__(self, dtarg):
* A :term:`string` object will be
interpreted as CIM datetime format (see :term:`DSP0004`) and
will result in a point in time or a time interval.
- * A :class:`py:datetime.datetime` object must be timezone-aware
- (see :class:`~pywbem.MinutesFromUTC`) and will result in a point
- in time.
+ * A :class:`py:datetime.datetime` object will result in a point
+ in time. If the :class:`py:datetime.datetime` object is
+ timezone-aware (see :class:`~pywbem.MinutesFromUTC`), the
+ specified timezone will be used. Otherwise, a default timezone
+ of UTC will be assumed.
* A :class:`py:datetime.timedelta` object will result in a time
interval.
* Another :class:`~pywbem.CIMDateTime` object will be copied.
@@ -342,14 +345,15 @@ def __init__(self, dtarg):
raise ValueError('dtarg argument "%s" has an invalid CIM '
'datetime format' % dtarg)
elif isinstance(dtarg, datetime):
- self.__datetime = dtarg
+ if dtarg.tzinfo is None:
+ self.__datetime = dtarg.replace(tzinfo=MinutesFromUTC(0))
+ else:
+ self.__datetime = copy.copy(dtarg)
elif isinstance(dtarg, timedelta):
- self.__timedelta = dtarg
+ self.__timedelta = copy.copy(dtarg)
elif isinstance(dtarg, CIMDateTime):
- # pylint: disable=protected-access
- self.__datetime = dtarg.__datetime
- # pylint: disable=protected-access
- self.__timedelta = dtarg.__timedelta
+ self.__datetime = copy.copy(dtarg.datetime)
+ self.__timedelta = copy.copy(dtarg.timedelta)
else:
raise TypeError('dtarg argument "%s" has an invalid type: %s '
'(expected datetime, timedelta, string, or '
diff --git a/testsuite/test_cim_types.py b/testsuite/test_cim_types.py
index 4ae354d3..b1f54d06 100755
--- a/testsuite/test_cim_types.py
+++ b/testsuite/test_cim_types.py
@@ -43,105 +43,99 @@ def integer_tuple(request):
return request.param
-class TestIntegers:
- """
- Test CIM integer data type classes.
- """
-
- @staticmethod
- def test_class_attrs_class(integer_tuple):
- """Test class attrs via class level"""
- obj_type, exp_cimtype, exp_minvalue, exp_maxvalue = integer_tuple
- assert obj_type.cimtype == exp_cimtype
- assert obj_type.minvalue == exp_minvalue
- assert obj_type.maxvalue == exp_maxvalue
-
- @staticmethod
- def test_class_attrs_inst(integer_tuple):
- """Test class attrs via instance level"""
- obj_type, exp_cimtype, exp_minvalue, exp_maxvalue = integer_tuple
- obj = obj_type(42)
- assert obj.cimtype == exp_cimtype
- assert obj.minvalue == exp_minvalue
- assert obj.maxvalue == exp_maxvalue
-
- @staticmethod
- def test_inheritance(integer_tuple):
- """Test inheritance"""
- obj_type = integer_tuple[0]
- obj = obj_type(42)
- assert isinstance(obj, obj_type)
- assert isinstance(obj, CIMType)
- assert isinstance(obj, CIMInt)
- assert not isinstance(obj, CIMFloat)
-
- @staticmethod
- def test_init_int(integer_tuple):
- """Test initialization from integer value"""
- obj_type = integer_tuple[0]
- obj = obj_type(42)
- assert obj == 42
-
- @staticmethod
- def test_init_str(integer_tuple):
- """Test initialization from string value"""
- obj_type = integer_tuple[0]
- obj = obj_type('42')
- assert obj == 42
-
- @staticmethod
- def test_init_str_base10(integer_tuple):
- """Test initialization from string value with base 10"""
- obj_type = integer_tuple[0]
- obj = obj_type('42', 10)
- assert obj == 42
-
- @staticmethod
- def test_init_str_base16(integer_tuple):
- """Test initialization from string value with base 16"""
- obj_type = integer_tuple[0]
- obj = obj_type('2A', 16)
- assert obj == 42
-
- @staticmethod
- def test_init_minimum(integer_tuple):
- """Test initialization from integer value at minimum"""
- obj_type = integer_tuple[0]
- exp_minvalue = integer_tuple[2]
- obj = obj_type(exp_minvalue)
- assert obj == exp_minvalue
-
- @staticmethod
- def test_init_maximum(integer_tuple):
- """Test initialization from integer value at maximum"""
- obj_type = integer_tuple[0]
- exp_maxvalue = integer_tuple[3]
- obj = obj_type(exp_maxvalue)
- assert obj == exp_maxvalue
-
- @staticmethod
- def test_init_too_low(integer_tuple):
- """Test initialization from integer value below minimum"""
- obj_type = integer_tuple[0]
- exp_minvalue = integer_tuple[2]
- try:
- obj_type(exp_minvalue - 1)
- except ValueError:
- pass
- else:
- raise AssertionError("ValueError was not raised.")
-
- @staticmethod
- def test_init_too_high(integer_tuple):
- """Test initialization from integer value above maximum"""
- obj_type = integer_tuple[0]
- exp_maxvalue = integer_tuple[3]
- try:
- obj_type(exp_maxvalue + 1)
- except ValueError:
- pass
- else:
- raise AssertionError("ValueError was not raised.")
+def test_integer_class_attrs_class(integer_tuple):
+ """Test class attrs via class level"""
+ obj_type, exp_cimtype, exp_minvalue, exp_maxvalue = integer_tuple
+ assert obj_type.cimtype == exp_cimtype
+ assert obj_type.minvalue == exp_minvalue
+ assert obj_type.maxvalue == exp_maxvalue
+
+
+def test_integer_class_attrs_inst(integer_tuple):
+ """Test class attrs via instance level"""
+ obj_type, exp_cimtype, exp_minvalue, exp_maxvalue = integer_tuple
+ obj = obj_type(42)
+ assert obj.cimtype == exp_cimtype
+ assert obj.minvalue == exp_minvalue
+ assert obj.maxvalue == exp_maxvalue
+
+
+def test_integer_inheritance(integer_tuple):
+ """Test inheritance"""
+ obj_type = integer_tuple[0]
+ obj = obj_type(42)
+ assert isinstance(obj, obj_type)
+ assert isinstance(obj, CIMType)
+ assert isinstance(obj, CIMInt)
+ assert not isinstance(obj, CIMFloat)
+
+
+def test_integer_init_int(integer_tuple):
+ """Test initialization from integer value"""
+ obj_type = integer_tuple[0]
+ obj = obj_type(42)
+ assert obj == 42
+
+
+def test_integer_init_str(integer_tuple):
+ """Test initialization from string value"""
+ obj_type = integer_tuple[0]
+ obj = obj_type('42')
+ assert obj == 42
+
+
+def test_integer_init_str_base10(integer_tuple):
+ """Test initialization from string value with base 10"""
+ obj_type = integer_tuple[0]
+ obj = obj_type('42', 10)
+ assert obj == 42
+
+
+def test_integer_init_str_base16(integer_tuple):
+ """Test initialization from string value with base 16"""
+ obj_type = integer_tuple[0]
+ obj = obj_type('2A', 16)
+ assert obj == 42
+
+
+def test_integer_init_minimum(integer_tuple):
+ """Test initialization from integer value at minimum"""
+ obj_type = integer_tuple[0]
+ exp_minvalue = integer_tuple[2]
+ obj = obj_type(exp_minvalue)
+ assert obj == exp_minvalue
+
+
+def test_integer_init_maximum(integer_tuple):
+ """Test initialization from integer value at maximum"""
+ obj_type = integer_tuple[0]
+ exp_maxvalue = integer_tuple[3]
+ obj = obj_type(exp_maxvalue)
+ assert obj == exp_maxvalue
+
+
+def test_integer_init_too_low(integer_tuple):
+ """Test initialization from integer value below minimum"""
+ obj_type = integer_tuple[0]
+ exp_minvalue = integer_tuple[2]
+ try:
+ obj_type(exp_minvalue - 1)
+ except ValueError:
+ pass
+ else:
+ raise AssertionError("ValueError was not raised.")
+
+
+def test_integer_init_too_high(integer_tuple):
+ """Test initialization from integer value above maximum"""
+ obj_type = integer_tuple[0]
+ exp_maxvalue = integer_tuple[3]
+ try:
+ obj_type(exp_maxvalue + 1)
+ except ValueError:
+ pass
+ else:
+ raise AssertionError("ValueError was not raised.")
#
@@ -164,47 +158,41 @@ def real_tuple(request):
return request.param
-class TestReals:
- """
- Test CIM real data type classes.
- """
-
- @staticmethod
- def test_class_attrs_class(real_tuple):
- """Test class attrs via class level"""
- obj_type, exp_cimtype = real_tuple
- assert obj_type.cimtype == exp_cimtype
-
- @staticmethod
- def test_class_attrs_inst(real_tuple):
- """Test class attrs via instance level"""
- obj_type, exp_cimtype = real_tuple
- obj = obj_type(42)
- assert obj.cimtype == exp_cimtype
-
- @staticmethod
- def test_inheritance(real_tuple):
- """Test inheritance"""
- obj_type = real_tuple[0]
- obj = obj_type(42)
- assert isinstance(obj, obj_type)
- assert isinstance(obj, CIMType)
- assert isinstance(obj, CIMFloat)
- assert not isinstance(obj, CIMInt)
-
- @staticmethod
- def test_init_float(real_tuple):
- """Test initialization from floating point value"""
- obj_type = real_tuple[0]
- obj = obj_type(42.0)
- assert obj == 42.0
-
- @staticmethod
- def test_init_str(real_tuple):
- """Test initialization from string value"""
- obj_type = real_tuple[0]
- obj = obj_type('42.0')
- assert obj == 42.0
+def test_real_class_attrs_class(real_tuple):
+ """Test class attrs via class level"""
+ obj_type, exp_cimtype = real_tuple
+ assert obj_type.cimtype == exp_cimtype
+
+
+def test_real_class_attrs_inst(real_tuple):
+ """Test class attrs via instance level"""
+ obj_type, exp_cimtype = real_tuple
+ obj = obj_type(42)
+ assert obj.cimtype == exp_cimtype
+
+
+def test_real_inheritance(real_tuple):
+ """Test inheritance"""
+ obj_type = real_tuple[0]
+ obj = obj_type(42)
+ assert isinstance(obj, obj_type)
+ assert isinstance(obj, CIMType)
+ assert isinstance(obj, CIMFloat)
+ assert not isinstance(obj, CIMInt)
+
+
+def test_real_init_float(real_tuple):
+ """Test initialization from floating point value"""
+ obj_type = real_tuple[0]
+ obj = obj_type(42.0)
+ assert obj == 42.0
+
+
+def test_real_init_str(real_tuple):
+ """Test initialization from string value"""
+ obj_type = real_tuple[0]
+ obj = obj_type('42.0')
+ assert obj == 42.0
#
@@ -271,6 +259,26 @@ def test_init_str(real_tuple):
'20140924193040.654321+120'
),
(
+ datetime(year=2014, month=9, day=24, hour=19, minute=30, second=40,
+ microsecond=654321, tzinfo=MinutesFromUTC(0)),
+ 'timestamp',
+ datetime(year=2014, month=9, day=24, hour=19, minute=30, second=40,
+ microsecond=654321, tzinfo=MinutesFromUTC(0)),
+ None,
+ 0,
+ '20140924193040.654321+000'
+ ),
+ (
+ datetime(year=2014, month=9, day=24, hour=19, minute=30, second=40,
+ microsecond=654321),
+ 'timestamp',
+ datetime(year=2014, month=9, day=24, hour=19, minute=30, second=40,
+ microsecond=654321, tzinfo=MinutesFromUTC(0)),
+ None,
+ 0,
+ '20140924193040.654321+000'
+ ),
+ (
'20140924193040.654321+120',
'timestamp',
datetime(year=2014, month=9, day=24, hour=19, minute=30, second=40,
@@ -325,46 +333,47 @@ def datetime_init_tuple(request):
return request.param
-class TestDatetime:
- """
- Test CIM real data type classes.
- """
-
- @staticmethod
- def test_class_attrs_class():
- """Test class attrs via class level"""
- assert CIMDateTime.cimtype == 'datetime'
-
- @staticmethod
- def test_class_attrs_inst():
- """Test class attrs via instance level"""
- obj = CIMDateTime('00000000000000.000000:000')
- assert obj.cimtype == 'datetime'
-
- @staticmethod
- def test_inheritance():
- """Test inheritance"""
- obj = CIMDateTime('00000000000000.000000:000')
- assert isinstance(obj, CIMDateTime)
- assert isinstance(obj, CIMType)
- assert not isinstance(obj, CIMFloat)
- assert not isinstance(obj, CIMInt)
-
- @staticmethod
- def test_init(datetime_init_tuple):
- """Test initialization from all input types"""
- (dtarg, exp_kind, exp_datetime, exp_timedelta, exp_minutesfromutc,
- exp_str) = datetime_init_tuple
- try:
- obj = CIMDateTime(dtarg)
- except Exception as exc:
- assert isinstance(exc, exp_kind)
- else:
- assert obj.is_interval == (exp_kind == 'interval')
- assert obj.datetime == exp_datetime
- assert obj.timedelta == exp_timedelta
- assert obj.minutes_from_utc == exp_minutesfromutc
- assert str(obj) == exp_str
+def test_datetime_class_attrs_class():
+ """Test class attrs via class level"""
+ assert CIMDateTime.cimtype == 'datetime'
+
+
+def test_datetime_class_attrs_inst():
+ """Test class attrs via instance level"""
+ obj = CIMDateTime('00000000000000.000000:000')
+ assert obj.cimtype == 'datetime'
+
+
+def test_datetime_inheritance():
+ """Test inheritance"""
+ obj = CIMDateTime('00000000000000.000000:000')
+ assert isinstance(obj, CIMDateTime)
+ assert isinstance(obj, CIMType)
+ assert not isinstance(obj, CIMFloat)
+ assert not isinstance(obj, CIMInt)
+
+
+def test_datetime_init(datetime_init_tuple):
+ """Test initialization from all input types"""
+ (dtarg, exp_kind, exp_datetime, exp_timedelta, exp_minutesfromutc,
+ exp_str) = datetime_init_tuple
+ try:
+ obj = CIMDateTime(dtarg)
+ except Exception as exc:
+ assert isinstance(exc, exp_kind)
+ else:
+ assert obj.is_interval == (exp_kind == 'interval')
+ assert obj.datetime == exp_datetime
+ if obj.datetime is not None:
+ assert isinstance(obj.datetime, datetime)
+ # We ensure that the datetime is always timezone-aware:
+ assert obj.datetime.tzinfo is not None
+ assert obj.timedelta == exp_timedelta
+ if obj.timedelta is not None:
+ assert isinstance(obj.timedelta, timedelta)
+ assert obj.minutes_from_utc == exp_minutesfromutc
+ assert str(obj) == exp_str
+
# TODO: Add testcases for get_local_utcoffset()
# TODO: Add testcases for now()

View File

@@ -36,6 +36,8 @@ buildPythonPackage rec {
${python.interpreter} tests/launch_tests.py
'';
LC_ALL="en_US.UTF-8";
meta = {
description = "A Python module to visualise quantum circuit";
homepage = https://github.com/nelimeee/qasm2image;

View File

@@ -3,23 +3,30 @@
, fetchPypi
, setuptools
, pyparsing
, pytest
}:
buildPythonPackage rec {
pname = "svgwrite";
version = "1.1.6";
version = "1.2.1";
src = fetchPypi {
inherit pname version;
sha256 = "1f018813072aa4d7e95e58f133acb3f68fa7de0a0d89ec9402cc38406a0ec5b8";
extension = "zip";
sha256 = "72ef66c9fe367989823cb237ab7f012ac809dd3ba76c1b5ebd9aa61580e2e75e";
};
buildInputs = [ setuptools ];
propagatedBuildInputs = [ pyparsing ];
checkInputs = [ pytest ];
checkPhase = ''
pytest
'';
meta = with stdenv.lib; {
description = "A Python library to create SVG drawings";
homepage = https://bitbucket.org/mozman/svgwrite;
homepage = https://github.com/mozman/svgwrite;
license = licenses.mit;
};

View File

@@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, six }:
{ stdenv, buildPythonPackage, fetchPypi, mock, six }:
buildPythonPackage rec {
pname = "whisper";
@@ -10,6 +10,7 @@ buildPythonPackage rec {
};
propagatedBuildInputs = [ six ];
checkInputs = [ mock ];
meta = with stdenv.lib; {
homepage = http://graphite.wikidot.com/;

View File

@@ -950,6 +950,18 @@ let
preConfigure = "patchShebangs configure";
});
littler = old.littler.overrideAttrs (attrs: with pkgs; {
buildInputs = [ pcre lzma zlib bzip2 icu which ] ++ attrs.buildInputs;
postInstall = ''
install -d $out/bin $out/share/man/man1
ln -s ../library/littler/bin/r $out/bin/r
ln -s ../library/littler/bin/r $out/bin/lr
ln -s ../../../library/littler/man-page/r.1 $out/share/man/man1
# these won't run without special provisions, so better remove them
rm -r $out/library/littler/script-tests
'';
});
};
in
self

View File

@@ -1,15 +1,15 @@
{ stdenv, R, rstudio, makeWrapper, recommendedPackages, packages, qtbase }:
{ lib, runCommand, R, rstudio, makeWrapper, recommendedPackages, packages, qtbase }:
let
qtVersion = with stdenv.lib.versions; "${major qtbase.version}.${minor qtbase.version}";
qtVersion = with lib.versions; "${major qtbase.version}.${minor qtbase.version}";
in
stdenv.mkDerivation rec {
runCommand (rstudio.name + "-wrapper") {
preferLocalBuild = true;
allowSubstitutes = false;
name = rstudio.name + "-wrapper";
nativeBuildInputs = [makeWrapper];
buildInputs = [makeWrapper R rstudio] ++ recommendedPackages ++ packages;
unpackPhase = ":";
buildInputs = [R rstudio] ++ recommendedPackages ++ packages;
# rWrapper points R to a specific set of packages by using a wrapper
# (as in https://nixos.org/nixpkgs/manual/#r-packages) which sets
@@ -20,18 +20,14 @@ stdenv.mkDerivation rec {
# into an R file (fixLibsR) which achieves the same effect, then
# uses R_PROFILE_USER to load this code at startup in RStudio.
fixLibsR = "fix_libs.R";
installPhase = ''
mkdir $out
echo "# Autogenerated by wrapper-rstudio.nix from R_LIBS_SITE" > $out/${fixLibsR}
echo -n ".libPaths(c(.libPaths(), \"" >> $out/${fixLibsR}
echo -n $R_LIBS_SITE | sed -e 's/:/", "/g' >> $out/${fixLibsR}
echo -n "\"))" >> $out/${fixLibsR}
echo >> $out/${fixLibsR}
makeWrapper ${rstudio}/bin/rstudio $out/bin/rstudio --set R_PROFILE_USER $out/${fixLibsR} \
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins
'';
meta = {
platforms = stdenv.lib.platforms.unix;
};
}
''
mkdir $out
echo "# Autogenerated by wrapper-rstudio.nix from R_LIBS_SITE" > $out/$fixLibsR
echo -n ".libPaths(c(.libPaths(), \"" >> $out/$fixLibsR
echo -n $R_LIBS_SITE | sed -e 's/:/", "/g' >> $out/$fixLibsR
echo -n "\"))" >> $out/$fixLibsR
echo >> $out/$fixLibsR
makeWrapper ${rstudio}/bin/rstudio $out/bin/rstudio --set R_PROFILE_USER $out/$fixLibsR \
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-${qtVersion}/plugins
''

View File

@@ -1,25 +1,21 @@
{ stdenv, R, makeWrapper, recommendedPackages, packages }:
{ runCommand, R, makeWrapper, recommendedPackages, packages }:
stdenv.mkDerivation {
name = R.name + "-wrapper";
runCommand (R.name + "-wrapper") {
preferLocalBuild = true;
allowSubstitutes = false;
buildInputs = [makeWrapper R] ++ recommendedPackages ++ packages;
buildInputs = [R] ++ recommendedPackages ++ packages;
nativeBuildInputs = [makeWrapper];
# Make the list of recommended R packages accessible to other packages such as rpy2
passthru.recommendedPackages = recommendedPackages;
unpackPhase = ":";
installPhase = ''
mkdir -p $out/bin
cd ${R}/bin
for exe in *; do
makeWrapper ${R}/bin/$exe $out/bin/$exe \
--prefix "R_LIBS_SITE" ":" "$R_LIBS_SITE"
done
'';
meta = {
platforms = stdenv.lib.platforms.unix;
};
passthru = { inherit recommendedPackages; };
}
''
mkdir -p $out/bin
cd ${R}/bin
for exe in *; do
makeWrapper ${R}/bin/$exe $out/bin/$exe \
--prefix "R_LIBS_SITE" ":" "$R_LIBS_SITE"
done
''

View File

@@ -1,14 +1,14 @@
{ stdenv, fetchFromGitHub, ocamlPackages, cf-private, CoreServices }:
stdenv.mkDerivation rec {
version = "0.86.0";
version = "0.87.0";
name = "flow-${version}";
src = fetchFromGitHub {
owner = "facebook";
repo = "flow";
rev = "refs/tags/v${version}";
sha256 = "0sxg066bfkgqyq2fcjkff4jbhpxrzsqgz53h2b4wscxr076r9bjp";
sha256 = "10f7rwkgh40wl8z3wgcsvyzm65zsf3zd143q4nv6q6g3m9izh40k";
};
installPhase = ''

View File

@@ -1,38 +0,0 @@
{stdenv, fetchurl, pkgconfig, libusb, readline, lua, perl,
gtk2 ? null, vte ? null, gtkdialog ? null,
python ? null,
ruby ? null,
useX11, rubyBindings, pythonBindings, luaBindings}:
assert useX11 -> (gtk2 != null && vte != null && gtkdialog != null);
assert rubyBindings -> ruby != null;
assert pythonBindings -> python != null;
let
inherit (stdenv.lib) optional;
in
stdenv.mkDerivation rec {
name = "radare-1.5.2";
src = fetchurl {
url = "https://radare.org/get/${name}.tar.gz";
sha256 = "1qdrmcnzfvfvqb27c7pknwm8jl2hqa6c4l66wzyddwlb8yjm46hd";
};
hardeningDisable = [ "format" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ readline libusb perl]
++ optional useX11 [gtkdialog vte gtk2]
++ optional rubyBindings [ruby]
++ optional pythonBindings [python]
++ optional luaBindings [lua];
meta = {
description = "Free advanced command line hexadecimal editor";
homepage = http://radare.org/;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
}

View File

@@ -1,22 +0,0 @@
{stdenv, fetchurl}:
stdenv.mkDerivation rec {
name = "ired-0.4";
src = fetchurl {
url = "https://radare.org/get/${name}.tar.gz";
sha256 = "0wya1ylc6adqg4qw5fi8aspc5d1yr27x9r2vpy133qxzia9qv3mm";
};
installPhase = ''
make install PREFIX=$out
'';
meta = {
description = "Interactive Raw Editor";
homepage = http://radare.org/;
license = stdenv.lib.licenses.gpl2Plus;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; all;
};
}

View File

@@ -90,17 +90,17 @@ in {
#<generated>
# DO NOT EDIT! Automatically generated by ./update.py
radare2 = generic {
version_commit = "20285";
gittap = "3.1.1";
gittip = "b143e1b1b5622ef2f41a90f4c0f7ed4c477caf40";
rev = "3.1.1";
version = "3.1.1";
sha256 = "09kn25ijqhk3x9f3k6mw1g0wvwym8ys6qz53ybx3qizy4fzln0hw";
version_commit = "20315";
gittap = "3.1.3";
gittip = "57dd0b4e7ec70cc95f859651b1b63b076b8df7a7";
rev = "3.1.3";
version = "3.1.3";
sha256 = "17bd7i9lbr0nxa3llw354mppx44xi7bjwif7g7wxw0zcjlfxnk5d";
cs_tip = "f01c267f889e932b069a559ce0c604c1ae986c0a";
cs_sha256 = "15ifnql2gi2f9g8j60hc4hbxbvi2qn1r110ry32qmlz55svxh67y";
};
r2-for-cutter = generic {
version_commit = "20285";
version_commit = "20315";
gittap = "2.9.0-310-gcb62c376b";
gittip = "cb62c376bef6c7427019a7c28910c33c364436dd";
rev = "cb62c376bef6c7427019a7c28910c33c364436dd";

View File

@@ -2,7 +2,7 @@
let
baseName = "bloop";
version = "1.0.0";
version = "1.1.1";
deps = stdenv.mkDerivation {
name = "${baseName}-deps-${version}";
buildCommand = ''
@@ -16,12 +16,12 @@ let
'';
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "0dgllwv9rjvpzvlbwwiynmfp15j2x48al7cb5rlmhq0an3q81hbh";
outputHash = "0w2gk9ladkzm3mx3qsmjqjakj94g7s4s3xfzl6yny1h4dg1456n6";
};
in
stdenv.mkDerivation rec {
name = "${baseName}-${version}";
nailgunCommit = "0c8b937b";
nailgunCommit = "6992a3bf";
buildInputs = [ jdk makeWrapper deps ];

View File

@@ -24,11 +24,14 @@ stdenv.mkDerivation rec {
buildInputs = [ makeWrapper ];
propagatedBuildInputs = [ jdk ];
# the jar is not in share/java, because it's a standalone jar and should
# never be picked up by set-java-classpath.sh
installPhase = ''
mkdir -p $out/bin $out/share/java
mkdir -p $out/bin $out/share
cp -v $src $out/bin/lein
cp -v $jarsrc $out/share/java/$JARNAME
cp -v $jarsrc $out/share/$JARNAME
'';
fixupPhase = ''
@@ -36,7 +39,7 @@ stdenv.mkDerivation rec {
patchShebangs $out/bin/lein
substituteInPlace $out/bin/lein \
--replace 'LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar' "LEIN_JAR=$out/share/java/$JARNAME"
--replace 'LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar' "LEIN_JAR=$out/share/$JARNAME"
wrapProgram $out/bin/lein \
--prefix PATH ":" "${stdenv.lib.makeBinPath [ rlwrap coreutils ]}" \

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "jenkins-${version}";
version = "2.138.3";
version = "2.150.1";
src = fetchurl {
url = "http://mirrors.jenkins.io/war-stable/${version}/jenkins.war";
sha256 = "0z8yfnqg43vqhhnp27wb28686zq9kqkyicqn0162hr9h5pd4sglm";
sha256 = "0sb6mzynw1vg6s43mpd7b0dz1clbf8akga09i14q66isb9nmhf3s";
};
buildCommand = ''

View File

@@ -0,0 +1,35 @@
{ stdenv, buildPythonApplication, buildPythonPackage, isPy3k, fetchurl, rpkg, offtrac, urlgrabber, pyopenssl, python_fedora }:
let
fedora_cert = buildPythonPackage rec {
name = "fedora-cert";
version = "0.6.0.2";
format = "other";
src = fetchurl {
url = "https://releases.pagure.org/fedora-packager/fedora-packager-${version}.tar.bz2";
sha256 = "02f22072wx1zg3rhyfw6gbxryzcbh66s92nb98mb9kdhxixv6p0z";
};
propagatedBuildInputs = [ python_fedora pyopenssl ];
doCheck = false;
};
in buildPythonApplication rec {
pname = "fedpkg";
version = "1.29";
disabled = isPy3k;
src = fetchurl {
url = "https://releases.pagure.org/fedpkg/${pname}-${version}.tar.bz2";
sha256 = "1cpy5p1rp7w52ighz3ynvhyw04z86y8phq3n8563lj6ayr8pw631";
};
patches = [ ./fix-paths.patch ];
propagatedBuildInputs = [ rpkg offtrac urlgrabber fedora_cert ];
meta = with stdenv.lib; {
description = "Subclass of the rpkg project for dealing with rpm packaging";
homepage = https://pagure.io/fedpkg;
license = licenses.gpl2;
maintainers = with maintainers; [ ];
};
}

View File

@@ -0,0 +1,16 @@
--- orig/setup.py
+++ new/setup.py
@@ -27,10 +27,10 @@
'bin/fedpkg',
'bin/fedpkg-stage',
],
- data_files=[(bash_completion_dir(), ['conf/bash-completion/fedpkg.bash']),
- ('/etc/rpkg', ['conf/etc/rpkg/fedpkg.conf',
+ data_files=[('share/bash-completion/completions', ['conf/bash-completion/fedpkg.bash']),
+ ('etc/rpkg', ['conf/etc/rpkg/fedpkg.conf',
'conf/etc/rpkg/fedpkg-stage.conf']),
- ('/usr/share/zsh/site-functions', ['conf/zsh-completion/_fedpkg']),
+ ('share/zsh/site-functions', ['conf/zsh-completion/_fedpkg']),
],
tests_require=['nose', 'mock'],

View File

@@ -2,15 +2,15 @@
buildGoPackage rec {
name = "govers-${version}";
version = "20150109-${stdenv.lib.strings.substring 0 7 rev}";
rev = "3b5f175f65d601d06f48d78fcbdb0add633565b9";
version = "20160623-${stdenv.lib.strings.substring 0 7 rev}";
rev = "77fd787551fc5e7ae30696e009e334d52d2d3a43";
goPackagePath = "github.com/rogpeppe/govers";
src = fetchgit {
inherit rev;
url = "https://github.com/rogpeppe/govers";
sha256 = "0din5a7nff6hpc4wg0yad2nwbgy4q1qaazxl8ni49lkkr4hyp8pc";
sha256 = "12w83vyi8mgn48fwdm2js693qcydimxapg8rk0yf01w0ab03r5wn";
};
dontRenameImports = true;

View File

@@ -2,15 +2,15 @@
buildGoPackage rec {
name = "gox-${version}";
version = "0.4.0";
version = "20181025";
goPackagePath = "github.com/mitchellh/gox";
src = fetchFromGitHub {
owner = "mitchellh";
repo = "gox";
rev = "v${version}";
sha256 = "1q4fdkw904mrmh1q5z8pfd3r0gcn5dm776kldqawddy93iiwnp8r";
rev = "9cc487598128d0963ff9dcc51176e722788ec645";
sha256 = "18indkdwq2m1wy95d71lgbf46jxxrfc5km1fys5laapz993h77v6";
};
goDeps = ./deps.nix;

View File

@@ -0,0 +1,65 @@
{ stdenv, fetchFromGitHub, autoreconfHook, coreutils, pkgconfig
# pyflame needs one python version per ABI
# are currently supported
# * 2.6 or 2.7 for 2.x ABI
# * 3.4 or 3.5 for 3.{4,5} ABI
# * 3.6 for 3.6+ ABI
# if you want to disable support for some ABI, make the corresponding argument null
, python2, python35, python36, python3
}:
stdenv.mkDerivation rec {
pname = "pyflame";
version = "1.6.7";
src = fetchFromGitHub {
owner = "uber";
repo = "pyflame";
rev = "v${version}";
sha256 = "0hz1ryimh0w8zyxx4y8chcn54d6b02spflj5k9rcg26an2chkg2w";
};
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ python36 python2 python35 ];
postPatch = ''
patchShebangs .
# some tests will fail in the sandbox
substituteInPlace tests/test_end_to_end.py \
--replace 'skipif(IS_DOCKER' 'skipif(True'
# don't use patchShebangs here to be explicit about the python version
substituteInPlace utils/flame-chart-json \
--replace '#!usr/bin/env python' '#!${python3.interpreter}'
'';
postInstall = ''
install -D utils/flame-chart-json $out/bin/flame-chart-json
'';
doCheck = true;
# reproduces the logic of their test script, but without downloading pytest
# from the internet with pip
checkPhase = with stdenv.lib; concatMapStringsSep "\n" (python: ''
set -x
PYMAJORVERSION=${head (strings.stringToCharacters python.version)} \
PATH=${makeBinPath [ coreutils ]}\
PYTHONPATH= \
${python.pkgs.pytest}/bin/pytest tests/
set +x
'') (filter (x: x!=null) buildInputs);
meta = with stdenv.lib; {
description = "A ptracing profiler for Python ";
longDescription = ''
Pyflame is a high performance profiling tool that generates flame graphs for
Python. Pyflame uses the Linux ptrace(2) system call to collect profiling
information. It can take snapshots of the Python call stack without
explicit instrumentation, meaning you can profile a program without
modifying its source code.
'';
homepage = https://github.com/uber/pyflame;
license = licenses.asl20;
maintainers = [ maintainers.symphorien ];
# arm: https://github.com/uber/pyflame/issues/136
platforms = [ "i686-linux" "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,12 @@
diff a/config.h b/config.h
--- a/config.h
+++ b/config.h
@@ -124,6 +124,8 @@
#define CONFIG_CPU "__ppc64__"
#elif defined(__ARM__)
#define CONFIG_CPU "__ARM__"
+#elif defined(__aarch64__)
+#define CONFIG_CPU "__aarch64__"
#else
/* let it go */
#endif

View File

@@ -11,7 +11,10 @@ stdenv.mkDerivation {
# tradcpp only comes with BSD-make Makefile; the patch adds configure support
buildInputs = [ autoconf ];
preConfigure = "autoconf";
patches = [ ./tradcpp-configure.patch ];
patches = [
./tradcpp-configure.patch
./aarch64.patch
];
meta = with stdenv.lib; {
description = "A traditional (K&R-style) C macro preprocessor";