Merge branch 'master' into staging

Fixed conflicts:
- lib/systems/for-meta.nix: in favor of staging
- pkgs/os-specific/darwin/xcode/default.nix: in favor of master
This commit is contained in:
Jan Malakhovski
2018-05-26 00:20:17 +00:00
116 changed files with 1596 additions and 521 deletions

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "colm-${version}";
version = "0.13.0.5";
version = "0.13.0.6";
src = fetchurl {
url = "http://www.colm.net/files/colm/${name}.tar.gz";
sha256 = "1320bx96ycd1xwww137cixrb983838wnrgkfsym8x5bnf5kj9rik";
sha256 = "0jd3qmqdm8yszy0yysbp3syk7pcbxvwzv9mibdwz7v9bv1nrai26";
};
nativeBuildInputs = [ makeWrapper asciidoc ];

View File

@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "fstar-${version}";
version = "0.9.5.0";
version = "0.9.6.0";
src = fetchFromGitHub {
owner = "FStarLang";
repo = "FStar";
rev = "v${version}";
sha256 = "1pi2ny3kpmvm85x8w98anhjf0hp0wccc51m7v697qypn5cl4ydqk";
sha256 = "0wix7l229afkn6c6sk4nwkfq0nznsiqdkds4ixi2yyf72immwmmb";
};
nativeBuildInputs = [ makeWrapper ];
@@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
buildInputs = with ocamlPackages; [
z3 ocaml findlib batteries menhir stdint
zarith camlp4 yojson pprint
ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild
];
makeFlags = [ "PREFIX=$(out)" ];
@@ -26,8 +27,10 @@ stdenv.mkDerivation rec {
'';
buildFlags = "-C src/ocaml-output";
preInstall = ''
mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstarlib
'';
installFlags = "-C src/ocaml-output";
postInstall = ''
wrapProgram $out/bin/fstar.exe --prefix PATH ":" "${z3}/bin"
'';

View File

@@ -24,6 +24,10 @@
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? true
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
@@ -42,11 +46,14 @@ let
};
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
'' + stdenv.lib.optionalString enableIntegerSimple ''
INTEGER_LIBRARY = integer-simple
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
BuildFlavour = perf-cross
Stage1Only = YES
HADDOCK_DOCS = NO
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
@@ -68,7 +75,6 @@ let
targetCC = builtins.head toolsForTarget;
in
stdenv.mkDerivation rec {
version = "7.10.3";
name = "${targetPrefix}ghc-${version}";
@@ -87,6 +93,8 @@ stdenv.mkDerivation rec {
./relocation.patch
];
postPatch = "patchShebangs .";
# GHC is a bit confused on its cross terminology.
preConfigure = ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
@@ -103,6 +111,7 @@ stdenv.mkDerivation rec {
export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
@@ -133,7 +142,8 @@ stdenv.mkDerivation rec {
strictDeps = true;
nativeBuildInputs = [
ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour
perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42
ghc hscolour
];
# For building runtime libs

View File

@@ -23,6 +23,10 @@
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? true
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
@@ -36,11 +40,14 @@ let
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
'' + stdenv.lib.optionalString enableIntegerSimple ''
INTEGER_LIBRARY = integer-simple
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
BuildFlavour = perf-cross
Stage1Only = YES
HADDOCK_DOCS = NO
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
@@ -87,6 +94,8 @@ stdenv.mkDerivation rec {
++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch
++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
postPatch = "patchShebangs .";
# GHC is a bit confused on its cross terminology.
preConfigure = ''
for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
@@ -103,6 +112,7 @@ stdenv.mkDerivation rec {
export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
echo -n "${buildMK}" > mk/build.mk
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
@@ -132,7 +142,10 @@ stdenv.mkDerivation rec {
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [ ghc perl hscolour sphinx ];
nativeBuildInputs = [
perl sphinx
ghc hscolour
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
@@ -149,10 +162,11 @@ stdenv.mkDerivation rec {
# that in turn causes GHCi to abort
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
# zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
# treat that as a unary `{x,y,z,..}` repetition.
postInstall = ''
paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
for bin in "$out"/lib/${name}/bin/*; do
isELF "$bin" || continue
paxmark m "$bin"
done
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc

View File

@@ -23,10 +23,11 @@
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ?
!(targetPlatform.isDarwin
# On iOS, dynamic linking is not supported
&& (targetPlatform.isAarch64 || targetPlatform.isAarch32))
enableShared ? true
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
, # Whether to backport https://phabricator.haskell.org/D4388 for
# deterministic profiling symbol names, at the cost of a slightly
# non-standard GHC API
@@ -44,11 +45,14 @@ let
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
'' + stdenv.lib.optionalString enableIntegerSimple ''
INTEGER_LIBRARY = integer-simple
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
BuildFlavour = perf-cross
Stage1Only = YES
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
@@ -151,7 +155,10 @@ stdenv.mkDerivation rec {
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [ alex autoconf autoreconfHook automake ghc happy hscolour perl python3 sphinx ];
nativeBuildInputs = [
autoconf autoreconfHook automake perl python3 sphinx
ghc alex happy hscolour
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
@@ -173,10 +180,11 @@ stdenv.mkDerivation rec {
hardeningDisable = [ "format" ];
# zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
# treat that as a unary `{x,y,z,..}` repetition.
postInstall = ''
paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
for bin in "$out"/lib/${name}/bin/*; do
isELF "$bin" || continue
paxmark m "$bin"
done
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc

View File

@@ -3,7 +3,7 @@
# build-tools
, bootPkgs, alex, happy
, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3
, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4
, libffi, libiconv ? null, ncurses
@@ -15,16 +15,21 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? false, gmp ? null, m4
enableIntegerSimple ? false, gmp ? null
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !targetPlatform.useAndroidPrebuilt
enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt
, version ? "8.4.2"
, # Whetherto build terminfo.
enableTerminfo ? !targetPlatform.isWindows
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
@@ -38,11 +43,14 @@ let
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
'' + stdenv.lib.optionalString enableIntegerSimple ''
INTEGER_LIBRARY = integer-simple
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
BuildFlavour = perf-cross
Stage1Only = YES
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
@@ -55,9 +63,9 @@ let
'';
# Splicer will pull out correct variations
libDeps = platform: [ ncurses ]
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
toolsForTarget =
if hostPlatform == buildPlatform then
@@ -69,7 +77,7 @@ let
in
stdenv.mkDerivation rec {
inherit version;
version = "8.4.2";
name = "${targetPrefix}ghc-${version}";
src = fetchurl {
@@ -126,7 +134,7 @@ stdenv.mkDerivation rec {
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
@@ -142,7 +150,10 @@ stdenv.mkDerivation rec {
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [ ghc perl autoconf automake m4 happy alex python3 ];
nativeBuildInputs = [
perl autoconf automake m4 python3
ghc alex happy
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
@@ -161,10 +172,11 @@ stdenv.mkDerivation rec {
checkTarget = "test";
# zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
# treat that as a unary `{x,y,z,..}` repetition.
postInstall = ''
paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
for bin in "$out"/lib/${name}/bin/*; do
isELF "$bin" || continue
paxmark m "$bin"
done
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc

View File

@@ -3,7 +3,7 @@
# build-tools
, bootPkgs, alex, happy
, autoconf, automake, coreutils, fetchgit, perl, python3
, autoconf, automake, coreutils, fetchgit, perl, python3, m4
, libffi, libiconv ? null, ncurses
@@ -22,9 +22,15 @@
, # Whether to build dynamic libs for the standard library (on the target
# platform). Static libs are always built.
enableShared ? !targetPlatform.useAndroidPrebuilt
enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt
, # Whetherto build terminfo.
enableTerminfo ? !targetPlatform.isWindows
, version ? "8.5.20180118"
, # What flavour to build. An empty string indicates no
# specific flavour and falls back to ghc default values.
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
@@ -38,11 +44,14 @@ let
"${targetPlatform.config}-";
buildMK = ''
BuildFlavour = ${ghcFlavour}
ifneq \"\$(BuildFlavour)\" \"\"
include mk/flavours/\$(BuildFlavour).mk
endif
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
'' + stdenv.lib.optionalString enableIntegerSimple ''
INTEGER_LIBRARY = integer-simple
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
BuildFlavour = perf-cross
Stage1Only = YES
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
@@ -55,9 +64,9 @@ let
'';
# Splicer will pull out correct variations
libDeps = platform: [ ncurses ]
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
++ stdenv.lib.optional (!enableIntegerSimple) gmp
++ stdenv.lib.optional (platform.libc != "glibc") libiconv;
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
toolsForTarget =
if hostPlatform == buildPlatform then
@@ -123,7 +132,7 @@ stdenv.mkDerivation rec {
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && ! enableIntegerSimple) [
"--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib"
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc") [
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
"--enable-bootstrap-with-devel-snapshot"
@@ -139,7 +148,10 @@ stdenv.mkDerivation rec {
# Make sure we never relax`$PATH` and hooks support for compatability.
strictDeps = true;
nativeBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
nativeBuildInputs = [
perl autoconf automake m4 python3
ghc alex happy
];
# For building runtime libs
depsBuildTarget = toolsForTarget;
@@ -158,10 +170,11 @@ stdenv.mkDerivation rec {
checkTarget = "test";
# zsh and other shells are smart about `{ghc}` but bash isn't, and doesn't
# treat that as a unary `{x,y,z,..}` repetition.
postInstall = ''
paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"}
for bin in "$out"/lib/${name}/bin/*; do
isELF "$bin" || continue
paxmark m "$bin"
done
# Install the bash completion file.
install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc

View File

@@ -128,7 +128,7 @@ self: super: builtins.intersectAttrs super {
# Prevents needing to add security_tool as a build tool to all of x509-system's
# dependencies.
x509-system = if pkgs.stdenv.isDarwin && !pkgs.stdenv.cc.nativeLibc
x509-system = if pkgs.stdenv.targetPlatform.isDarwin && !pkgs.stdenv.cc.nativeLibc
then let inherit (pkgs.darwin) security_tool;
in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: {
postPatch = (drv.postPatch or "") + ''

View File

@@ -19,6 +19,7 @@ in
, buildTarget ? ""
, buildTools ? [], libraryToolDepends ? [], executableToolDepends ? [], testToolDepends ? [], benchmarkToolDepends ? []
, configureFlags ? []
, buildFlags ? []
, description ? ""
, doCheck ? !isCross && stdenv.lib.versionOlder "7.4" ghc.version
, doBenchmark ? false
@@ -31,7 +32,7 @@ in
, enableSharedExecutables ? false
, enableSharedLibraries ? ((ghc.isGhcjs or false) || stdenv.lib.versionOlder "7.7" ghc.version)
, enableDeadCodeElimination ? (!stdenv.isDarwin) # TODO: use -dead_strip for darwin
, enableStaticLibraries ? true
, enableStaticLibraries ? !hostPlatform.isWindows
, enableHsc2hsViaAsm ? hostPlatform.isWindows && stdenv.lib.versionAtLeast ghc.version "8.4"
, extraLibraries ? [], librarySystemDepends ? [], executableSystemDepends ? []
, homepage ? "http://hackage.haskell.org/package/${pname}"
@@ -68,6 +69,10 @@ in
assert editedCabalFile != null -> revision != null;
# --enable-static does not work on windows. This is a bug in GHC.
# --enable-static will pass -staticlib to ghc, which only works for mach-o and elf.
assert hostPlatform.isWindows -> enableStaticLibraries == false;
let
inherit (stdenv.lib) optional optionals optionalString versionOlder versionAtLeast
@@ -126,6 +131,8 @@ let
crossCabalFlagsString =
stdenv.lib.optionalString isCross (" " + stdenv.lib.concatStringsSep " " crossCabalFlags);
buildFlagsString = optionalString (buildFlags != []) (" " + concatStringsSep " " buildFlags);
defaultConfigureFlags = [
"--verbose" "--prefix=$out" "--libdir=\\$prefix/lib/\\$compiler" "--libsubdir=\\$pkgid"
(optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}")
@@ -169,18 +176,22 @@ let
optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends;
nativeBuildInputs = [ ghc nativeGhc removeReferencesTo ] ++ optional (allPkgconfigDepends != []) pkgconfig ++
setupHaskellDepends ++
buildTools ++ libraryToolDepends ++ executableToolDepends;
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
otherBuildInputs = setupHaskellDepends ++ extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
otherBuildInputs = extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
allPkgconfigDepends ++
optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testToolDepends) ++
optionals doBenchmark (benchmarkDepends ++ benchmarkHaskellDepends ++ benchmarkSystemDepends ++ benchmarkToolDepends);
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
haskellBuildInputs = stdenv.lib.filter isHaskellPkg allBuildInputs;
systemBuildInputs = stdenv.lib.filter isSystemPkg allBuildInputs;
ghcEnv = ghc.withPackages (p: haskellBuildInputs);
# When not cross compiling, also include Setup.hs dependencies.
ghcEnv = ghc.withPackages (p:
haskellBuildInputs ++ stdenv.lib.optional (!isCross) setupHaskellDepends);
setupCommand = "./Setup";
@@ -190,6 +201,25 @@ let
nativeGhcCommand = "${nativeGhc.targetPrefix}ghc";
buildPkgDb = ghcName: ''
if [ -d "$p/lib/${ghcName}/package.conf.d" ]; then
cp -f "$p/lib/${ghcName}/package.conf.d/"*.conf $packageConfDir/
continue
fi
if [ -d "$p/include" ]; then
configureFlags+=" --extra-include-dirs=$p/include"
fi
if [ -d "$p/lib" ]; then
configureFlags+=" --extra-lib-dirs=$p/lib"
fi
''
# It is not clear why --extra-framework-dirs does work fine on Linux
+ optionalString (!buildPlatform.isDarwin || versionAtLeast nativeGhc.version "8.0") ''
if [[ -d "$p/Library/Frameworks" ]]; then
configureFlags+=" --extra-framework-dirs=$p/Library/Frameworks"
fi
'';
in
assert allPkgconfigDepends != [] -> pkgconfig != null;
@@ -230,30 +260,37 @@ stdenv.mkDerivation ({
echo "Build with ${ghc}."
${optionalString (hasActiveLibrary && hyperlinkSource) "export PATH=${hscolour}/bin:$PATH"}
'' + (optionalString (setupHaskellDepends != []) ''
setupPackageConfDir="$TMPDIR/setup-package.conf.d"
mkdir -p $setupPackageConfDir
'') + ''
packageConfDir="$TMPDIR/package.conf.d"
mkdir -p $packageConfDir
setupCompileFlags="${concatStringsSep " " setupCompileFlags}"
configureFlags="${concatStringsSep " " defaultConfigureFlags} $configureFlags"
''
# We build the Setup.hs on the *build* machine, and as such should only add
# dependencies for the build machine.
#
# pkgs* arrays defined in stdenv/setup.hs
+ (optionalString (setupHaskellDepends != []) ''
for p in "''${pkgsBuildBuild[@]}" "''${pkgsBuildHost[@]}" "''${pkgsBuildTarget[@]}"; do
${buildPkgDb nativeGhc.name}
done
${nativeGhcCommand}-pkg --${nativePackageDbFlag}="$setupPackageConfDir" recache
'')
# host.*Pkgs defined in stdenv/setup.hs
# For normal components
+ ''
for p in "''${pkgsHostHost[@]}" "''${pkgsHostTarget[@]}"; do
if [ -d "$p/lib/${ghc.name}/package.conf.d" ]; then
cp -f "$p/lib/${ghc.name}/package.conf.d/"*.conf $packageConfDir/
continue
fi
if [ -d "$p/include" ]; then
configureFlags+=" --extra-include-dirs=$p/include"
fi
if [ -d "$p/lib" ]; then
configureFlags+=" --extra-lib-dirs=$p/lib"
fi
${buildPkgDb ghc.name}
done
''
# only use the links hack if we're actually building dylibs. otherwise, the
# "dynamic-library-dirs" point to nonexistent paths, and the ln command becomes
# "ln -s $out/lib/links", which tries to recreate the links dir and fails
+ (optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+ (optionalString (stdenv.isDarwin && (enableSharedLibraries || enableSharedExecutables)) ''
# Work around a limit in the macOS Sierra linker on the number of paths
# referenced by any one dynamic library:
#
@@ -282,7 +319,11 @@ stdenv.mkDerivation ({
done
echo setupCompileFlags: $setupCompileFlags
${nativeGhcCommand} $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
${optionalString (setupHaskellDepends != [])
''
echo GHC_PACKAGE_PATH="$setupPackageConfDir:"
GHC_PACKAGE_PATH="$setupPackageConfDir:" ''
}${nativeGhcCommand} $setupCompileFlags --make -o Setup -odir $TMPDIR -hidir $TMPDIR $i
runHook postCompileBuildDriver
'';
@@ -310,7 +351,7 @@ stdenv.mkDerivation ({
buildPhase = ''
runHook preBuild
${setupCommand} build ${buildTarget}${crossCabalFlagsString}
${setupCommand} build ${buildTarget}${crossCabalFlagsString}${buildFlagsString}
runHook postBuild
'';

View File

@@ -131,6 +131,8 @@ rec {
*/
appendConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = (drv.configureFlags or []) ++ [x]; });
appendBuildFlag = drv: x: overrideCabal drv (drv: { buildFlags = (drv.buildFlags or []) ++ [x]; });
appendBuildFlags = drv: xs: overrideCabal drv (drv: { buildFlags = (drv.buildFlags or []) ++ xs; });
/* removeConfigureFlag drv x is a Haskell package like drv, but with
all cabal configure arguments that are equal to x removed.

View File

@@ -4,12 +4,12 @@
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "fplll";
version = "5.2.0";
version = "5.2.1";
src = fetchFromGitHub {
owner = "${pname}";
repo = "${pname}";
rev = "${version}";
sha256 = "0931i4q49lzlifsg9zd8a2yzj626i1s2bqhkfxvcxv94c38s0nh1";
sha256 = "015qmrd7nfaysbv1hbwiprz9g6hnww1y1z1xw8f43ysb7k1b5nbg";
};
nativeBuildInputs = [autoconf automake libtool gettext autoreconfHook];
buildInputs = [gmp mpfr];

View File

@@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
name = "libqalculate-${version}";
version = "2.3.0";
version = "2.5.0";
src = fetchurl {
url = "https://github.com/Qalculate/libqalculate/archive/v${version}.tar.gz";
sha256 = "1wrd9ajf00h1ja56r25vljjsgklg0qlzmziax7x26wjqkigc28iq";
sha256 = "0xs2qjr93k43p6j126xj20fgb1n2jv56rhgc211yv1l46crbqxfv";
};
outputs = [ "out" "dev" "doc" ];

View File

@@ -1,7 +1,7 @@
{ stdenv, zookeeper, bash }:
stdenv.mkDerivation rec {
name = "zookeeper_mt";
name = "zookeeper_mt-${stdenv.lib.getVersion zookeeper}";
src = zookeeper.src;

View File

@@ -13,8 +13,6 @@ stdenv.mkDerivation rec {
sed -i -e s,--export-dynamic,, configure
'';
# TODO: still an issue: https://github.com/gdraheim/zziplib/issues/27
buildInputs = [ docbook_xml_dtd_412 perl python2 zip xmlto zlib ];
# tests are broken (https://github.com/gdraheim/zziplib/issues/20),

View File

@@ -0,0 +1,30 @@
{ stdenv, fetchFromGitHub, which, ocaml, findlib, ocamlbuild, earley }:
stdenv.mkDerivation rec {
version = "1.0.2";
name = "ocaml${ocaml.version}-earley_ocaml-${version}";
src = fetchFromGitHub {
owner = "rlepigre";
repo = "ocaml-earley-ocaml";
rev = "ocaml-earley-ocaml_${version}";
sha256 = "0f8kr49r2xfs7cbzps4r9i92ckhwssaiydam846jrky3z5djn2jc";
};
buildInputs = [ which ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ earley ];
preBuild = "make";
createFindlibDestdir = true;
installFlags = [ "BINDIR=$(out)/bin" ];
meta = {
description = "Extensible OCaml parser to be used with Earley";
license = stdenv.lib.licenses.cecill-b;
maintainers = [ stdenv.lib.maintainers.vbgl ];
inherit (ocaml.meta) platforms;
inherit (src.meta) homepage;
};
}

View File

@@ -0,0 +1,32 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, requests, requests_oauthlib
, django, python-openid, mock, coverage }:
buildPythonPackage rec {
pname = "django-allauth";
name = "${pname}-${version}";
version = "0.36.0";
# no tests on PyPI
src = fetchFromGitHub {
owner = "pennersr";
repo = pname;
rev = version;
sha256 = "1c863cmd521j6cwpyd50jxz5y62fdschrhm15jfqihicyr9imjan";
};
propagatedBuildInputs = [ requests requests_oauthlib django python-openid ];
checkInputs = [ coverage mock ];
doCheck = false;
checkPhase = ''
cd $NIX_BUILD_TOP/$sourceRoot
coverage run manage.py test allauth
'';
meta = with stdenv.lib; {
description = "Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication";
homepage = https://www.intenct.nl/projects/django-allauth;
license = licenses.mit;
};
}

View File

@@ -0,0 +1,20 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "django-gravatar2";
name = "${pname}-${version}";
version = "1.4.2";
src = fetchPypi {
inherit pname version;
sha256 = "1qsv40xywbqsf4mkrmsswrpzqd7nfljxpfiim9an2z3dykn5rka6";
};
doCheck = false;
meta = with stdenv.lib; {
description = "Essential Gravatar support for Django";
homepage = https://github.com/twaddington/django-gravatar;
license = licenses.mit;
};
}

View File

@@ -1,5 +1,5 @@
{ lib
, fetchPypi
, fetchFromGitHub
, buildPythonPackage
, pkgconfig
, gmp
@@ -14,11 +14,13 @@
buildPythonPackage rec {
pname = "fpylll";
version = "0.3.0dev";
version = "0.4.1dev";
src = fetchPypi {
inherit pname version;
sha256 = "0bjkh02fnxsrxwjzai8ij12zl2wq319z8y25sn9pvvzla5izgnp9";
src = fetchFromGitHub {
owner = "fplll";
repo = "fpylll";
rev = version;
sha256 = "01x2sqdv0sbjj4g4waj0hj4rcn4bq7h17442xaqwbznym9azmn9w";
};
buildInputs = [

View File

@@ -2,12 +2,12 @@
buildPythonPackage rec {
pname = "jedi";
version = "0.11.1";
version = "0.12.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "d6e799d04d1ade9459ed0f20de47c32f2285438956a677d083d3c98def59fa97";
sha256 = "1bcr7csx4xil1iwmk03d79jis0bkmgi9k0kir3xa4rmwqsagcwhr";
};
postPatch = ''

View File

@@ -1,6 +1,6 @@
{ stdenv, fetchPypi, buildPythonApplication, lxml, typed-ast, psutil }:
{ stdenv, fetchPypi, buildPythonPackage, lxml, typed-ast, psutil, isPy3k }:
buildPythonApplication rec {
buildPythonPackage rec {
pname = "mypy";
version = "0.600";
@@ -12,6 +12,8 @@ buildPythonApplication rec {
sha256 = "1pd3kkz435wlvi9fwqbi3xag5zs59jcjqi6c9gzdjdn23friq9dw";
};
disabled = !isPy3k;
propagatedBuildInputs = [ lxml typed-ast psutil ];
meta = with stdenv.lib; {

View File

@@ -6,12 +6,12 @@
buildPythonPackage rec {
pname = "parso";
version = "0.1.1";
version = "0.2.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "5815f3fe254e5665f3c5d6f54f086c2502035cb631a91341591b5a564203cffb";
sha256 = "0lamywk6dm5xshlkdvxxf5j6fa2k2zpi7xagf0bwidaay3vnpgb2";
};
checkInputs = [ pytest ];
@@ -22,4 +22,4 @@ buildPythonPackage rec {
license = lib.licenses.mit;
};
}
}

View File

@@ -0,0 +1,29 @@
{ lib, buildPythonPackage, fetchFromGitHub
, python-language-server, isort
}:
buildPythonPackage rec {
pname = "pyls-isort";
version = "0.1.1";
src = fetchFromGitHub {
owner = "paradoxxxzero";
repo = "pyls-isort";
rev = version;
sha256 = "0mf8c6dw5lsj9np20p0vrhr1yfycq2awjk2pil28l579xj9nr0dc";
};
# no tests
doCheck = false;
propagatedBuildInputs = [
isort python-language-server
];
meta = with lib; {
homepage = https://github.com/palantir/python-language-server;
description = "An implementation of the Language Server Protocol for Python";
license = licenses.mit;
maintainers = [ maintainers.mic92 ];
};
}

View File

@@ -0,0 +1,43 @@
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch
, future, python-language-server, mypy, configparser
, pytest, mock, isPy3k, pytestcov, coverage
}:
buildPythonPackage rec {
pname = "pyls-mypy";
version = "0.1.2";
src = fetchFromGitHub {
owner = "tomv564";
repo = "pyls-mypy";
rev = version;
sha256 = "0wa038a8a8yj3wmrc7q909nj4b5d3lq70ysbw7rpsnyb0x06m826";
};
disabled = !isPy3k;
patches = [
# also part of https://github.com/tomv564/pyls-mypy/pull/10
(fetchpatch {
url = "https://github.com/Mic92/pyls-mypy/commit/4c727120d2cbd8bf2825e1491cd55175f03266d2.patch";
sha256 = "1dgn5z742swpxwknmgvm65jpxq9zwzhggw4nl6ys7yw8r49kqgrl";
})
];
checkPhase = ''
HOME=$TEMPDIR pytest
'';
checkInputs = [ pytest mock pytestcov coverage ];
propagatedBuildInputs = [
mypy python-language-server future configparser
];
meta = with lib; {
homepage = https://github.com/palantir/python-language-server;
description = "An implementation of the Language Server Protocol for Python";
license = licenses.mit;
maintainers = [ maintainers.mic92 ];
};
}

View File

@@ -0,0 +1,21 @@
{ lib, buildPythonPackage, fetchPypi, pytest }:
buildPythonPackage rec {
pname = "pynmea2";
version = "1.12.0";
src = fetchPypi {
inherit pname version;
sha256 = "185wxn8gag9whxmysspbh8s7wn3sh1glgf508w2zzwi4lklryl7i";
};
checkInputs = [ pytest ];
checkPhase = "pytest";
meta = {
homepage = https://github.com/Knio/pynmea2;
description = "Python library for the NMEA 0183 protcol";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ geistesk ];
};
}

View File

@@ -0,0 +1,48 @@
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, isPy27
, configparser, futures, future, jedi, pluggy
, pytest, mock, pytestcov, coverage
# The following packages are optional and
# can be overwritten with null as your liking.
# This also requires to disable tests.
, rope ? null
, mccabe ? null
, pyflakes ? null
, pycodestyle ? null
, autopep8 ? null
, yapf ? null
, pydocstyle ? null
}:
buildPythonPackage rec {
pname = "python-language-server";
version = "0.18.0";
src = fetchFromGitHub {
owner = "palantir";
repo = "python-language-server";
rev = version;
sha256 = "0ig34bc0qm6gdj8xakmm3877lmf8ms7qg0xj8hay9gpgf8cz894s";
};
checkInputs = [
pytest mock pytestcov coverage
# rope is technically a dependency, but we don't add it by default since we
# already have jedi, which is the preferred option
rope
];
checkPhase = ''
HOME=$TEMPDIR pytest
'';
propagatedBuildInputs = [
jedi pluggy mccabe pyflakes pycodestyle yapf pydocstyle future autopep8
] ++ lib.optional (isPy27) [ configparser ]
++ lib.optional (pythonOlder "3.2") [ futures ];
meta = with lib; {
homepage = https://github.com/palantir/python-language-server;
description = "An implementation of the Language Server Protocol for Python";
license = licenses.mit;
maintainers = [ maintainers.mic92 ];
};
}

View File

@@ -0,0 +1,20 @@
{ stdenv, buildPythonPackage, fetchPypi }:
buildPythonPackage rec {
pname = "python-openid";
name = "${pname}-${version}";
version = "2.2.5";
src = fetchPypi {
inherit pname version;
sha256 = "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj";
};
doCheck = false;
meta = with stdenv.lib; {
description = "OpenID support for modern servers and consumers";
homepage = http://github.com/openid/python-openid;
license = licenses.asl20;
};
}

View File

@@ -0,0 +1,22 @@
{ stdenv, buildPythonPackage, fetchPypi, defusedxml }:
buildPythonPackage rec {
pname = "python3-openid";
name = "${pname}-${version}";
version = "3.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "00l5hrjh19740w00b3fnsqldnla41wbr2rics09dl4kyd1fkd3b2";
};
propagatedBuildInputs = [ defusedxml ];
doCheck = false;
meta = with stdenv.lib; {
description = "OpenID support for modern servers and consumers";
homepage = http://github.com/necaris/python3-openid;
license = licenses.asl20;
};
}

View File

@@ -4,13 +4,13 @@
buildPythonPackage rec {
pname = "raven";
version = "6.7.0";
version = "6.8.0";
src = fetchFromGitHub {
owner = "getsentry";
repo = "raven-python";
rev = version;
sha256 = "0vb6zczfgrrh0qw5wlbvk703r11y091k6r53fbbhpbwh4hva30nx";
sha256 = "0d052nns0pf1bsazapnnrylvair37vhnjaifsdldddqv05ccfc57";
};
# way too many dependencies to run tests

View File

@@ -4,10 +4,11 @@
, numpy
, pillow
, pytorch
, lib }:
, lib
}:
buildPythonPackage rec {
version = "0.1.9";
version = "0.2.1";
pname = "torchvision";
name = "${pname}-${version}";
@@ -16,7 +17,7 @@ buildPythonPackage rec {
src = fetchPypi {
inherit pname version;
format = "wheel";
sha256 = "016rjfh9w1x4xpw15ryxsvq3j2li17nd3a7qslnf3241hc6vdcwf";
sha256 = "18gvdabkmzfjg47ns0lw38mf85ry28nq1mas5rzlwvb4l5zmw2ms";
};
propagatedBuildInputs = [ six numpy pillow pytorch ];

View File

@@ -208,6 +208,13 @@ in
] ++ lib.optional stdenv.isDarwin "--with-iconv-dir=${libiconv}";
};
oxidized = attrs: {
postInstall = ''
cd "$(cat "$out/nix-support/gem-meta/install-path")"
patch -p1 < ${../../../tools/admin/oxidized/temporary-x-series.patch}
'';
};
pango = attrs: {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gtk2 xorg.libXdmcp pcre xorg.libpthreadstubs ];

View File

@@ -43,8 +43,8 @@ in
};
ragelDev = generic {
version = "7.0.0.10";
sha256 = "1v4ddzxal4gf8l8nkn32qabba6nbpd2mg8sphgmdn8kaqv52nmj0";
version = "7.0.0.11";
sha256 = "0h2k9bfz9i7x9mvr9rbsrzz8fk17756zwwrkf3fppvm9ivzwdfh8";
license = stdenv.lib.licenses.mit;
};
}

View File

@@ -0,0 +1,22 @@
{ stdenv, fetchFromGitHub, rustPlatform }:
rustPlatform.buildRustPackage rec {
name = "rust-cbindgen-${version}";
version = "0.6.0";
src = fetchFromGitHub {
owner = "eqrion";
repo = "cbindgen";
rev = "v${version}";
sha256 = "0yzjbmdhhwbg551bm06xwwdjdm5kdqw37pgd7hals8qxb0dzmmh8";
};
cargoSha256 = "1ml4a7xp40l3bhfhpwdrwj3k99zhan9dzpkw71fa689xmv6pdj62";
meta = with stdenv.lib; {
description = "A project for generating C bindings from Rust code";
homepage = https://github.com/eqrion/cbindgen;
license = licenses.mpl20;
maintainers = with maintainers; [ jtojnar ];
};
}

View File

@@ -5,13 +5,13 @@
with stdenv.lib;
let
version = "0.1.29";
version = "0.1.30";
src = fetchFromGitHub {
rev = "v${version}";
owner = "projectatomic";
repo = "skopeo";
sha256 = "1lhzbyj2mm25x12s7g2jx4v8w19izjwlgx4lml13r5yy1spn65k2";
sha256 = "10lpiiki7mlhrp4bid40wys3lch7fars1whxsa5gy0frfgp89ghn";
};
defaultPolicyFile = runCommand "skopeo-default-policy.json" {} "cp ${src}/default-policy.json $out";
@@ -30,7 +30,11 @@ buildGoPackage rec {
nativeBuildInputs = [ pkgconfig (lib.getBin go-md2man) ];
buildInputs = [ gpgme libgpgerror devicemapper btrfs-progs ostree libselinux ];
buildFlagsArray = "-ldflags= -X github.com/projectatomic/skopeo/vendor/github.com/containers/image/signature.systemDefaultPolicyPath=${defaultPolicyFile}";
buildFlagsArray = ''
-ldflags=
-X github.com/projectatomic/skopeo/vendor/github.com/containers/image/signature.systemDefaultPolicyPath=${defaultPolicyFile}
-X github.com/projectatomic/skopeo/vendor/github.com/containers/image/internal/tmpdir.unixTempDirForBigFiles=/tmp
'';
preBuild = ''
export CGO_CFLAGS="-I${getDev gpgme}/include -I${getDev libgpgerror}/include -I${getDev devicemapper}/include -I${getDev btrfs-progs}/include"

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "yarn-${version}";
version = "1.6.0";
version = "1.7.0";
src = fetchzip {
url = "https://github.com/yarnpkg/yarn/releases/download/v${version}/yarn-v${version}.tar.gz";
sha256 = "0bblp1jy4s9y5rpcqn40w61qwsmxr342xkcn7ykk88i7sng2cgfw";
sha256 = "00fxihv9ih40k6f21a7hb6vkx4h4m6ks0fbai5h9ssi0p4m5j3by";
};
buildInputs = [makeWrapper nodejs];