Merge branch 'master' into staging

* master: (271 commits)
  pysmbc: clarify license
  pysmbc: fix license
  bazel: 0.5.4 -> 0.6.0 (#29990)
  googler: init at 3.3
  go: declare support for aarch64
  firefox-beta-bin: 56.0b5 -> 57.0b4
  spotify: 1.0.64.401.g9d720389-21 -> 1.0.64.407.g9bd02c2d-26
  gogs: 0.11.19 -> 0.11.29
  grafana: 4.5.1 -> 4.5.2
  mopidy-iris: 3.4.1 -> 3.4.9
  nextcloud: 12.0.2 -> 12.0.3
  haskell-json-autotype: jailbreak to fix build within LTS 9.x
  kore: fix up
  kore: init at 2.0.0
  glusterfs service: fix issues with useRpcbind
  tig: 2.2.2 -> 2.3.0
  haskell-hspec-core: enable test suite again
  hackage-packages.nix: automatic Haskell package set update
  librsvg: fix thumbnailer path
  awscli: 1.11.108 -> 1.11.162
  ...
This commit is contained in:
Orivej Desh
2017-10-02 00:22:12 +00:00
260 changed files with 9682 additions and 4403 deletions

View File

@@ -1,31 +1,30 @@
{ stdenv, fetchurl, jre, gnutar, bash }:
{ stdenv, fetchurl, jre, makeWrapper }:
stdenv.mkDerivation rec {
name = "closure-compiler-${version}";
version = "20170218";
version = "20170910";
src = fetchurl {
url = "http://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
sha256 = "06snabmpy07x4xm8d1xgq5dfzbjli10xkxk3nx9jms39zkj493cd";
url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
sha256 = "0znzsks8ql9qajhcjzfkhmnpz8zs6b8cji04fhivyq973jpxxrak";
};
phases = [ "installPhase" ];
sourceRoot = ".";
buildInputs = [ gnutar ];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
mkdir -p $out/share/java $out/bin
tar -xzf $src
cp -r closure-compiler-v${version}.jar $out/share/java/
echo "#!${bash}/bin/bash" > $out/bin/closure-compiler
echo "${jre}/bin/java -jar $out/share/java/closure-compiler-v${version}.jar \"\$@\"" >> $out/bin/closure-compiler
chmod +x $out/bin/closure-compiler
cp closure-compiler-v${version}.jar $out/share/java
makeWrapper ${jre}/bin/java $out/bin/closure-compiler \
--add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
'';
meta = {
meta = with stdenv.lib; {
description = "A tool for making JavaScript download and run faster";
homepage = https://developers.google.com/closure/compiler/;
license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.unix;
license = licenses.asl20;
platforms = platforms.all;
};
}

View File

@@ -217,7 +217,8 @@ stdenv.mkDerivation ({
inherit patches;
outputs = [ "out" "lib" "man" "info" ];
outputs = if langJava || langGo then ["out" "man" "info"]
else [ "out" "lib" "man" "info" ];
setOutputFlags = false;
NIX_NO_SELF_RPATH = true;
@@ -323,7 +324,11 @@ stdenv.mkDerivation ({
export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
'';
''
+ stdenv.lib.optionalString (langJava || langGo) ''
export lib=$out;
''
;
dontDisableStatic = true;
@@ -565,4 +570,10 @@ stdenv.mkDerivation ({
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
// optionalAttrs (langJava) {
postFixup = ''
target="$(echo "$out/libexec/gcc"/*/*/ecj*)"
patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
'';}
)

View File

@@ -46,24 +46,6 @@ index db8b12e..7b815c5 100644
mapM_ patchPackage =<< allPackages
preparePrimops
buildGenPrim
@@ -1141,7 +1132,7 @@ cabalStage1 pkgs = sub $ do
globalFlags <- cabalGlobalFlags
flags <- cabalInstallFlags (length pkgs == 1)
let args = globalFlags ++ ("install" : pkgs) ++
- [ "--solver=topdown" -- the modular solver refuses to install stage1 packages
+ [ "--allow-boot-library-installs"
] ++ map ("--configure-option="<>) configureOpts ++ flags
checkInstallPlan pkgs args
cabal_ args
@@ -1162,7 +1153,7 @@ cabalInstall pkgs = do
-- uses somewhat fragile parsing of --dry-run output, find a better way
checkInstallPlan :: [Package] -> [Text] -> B ()
checkInstallPlan pkgs opts = do
- plan <- cabal (opts ++ ["-v2", "--dry-run"])
+ plan <- cabal (opts ++ ["-vverbose+nowrap", "--dry-run"])
when (hasReinstalls plan || hasUnexpectedInstalls plan || hasNewVersion plan) (err plan)
where
hasReinstalls = T.isInfixOf "(reinstall)" -- reject reinstalls
@@ -1201,14 +1192,14 @@ cabalInstallFlags parmakeGhcjs = do
, "--avoid-reinstalls"
, "--builddir", "dist"

View File

@@ -6,19 +6,15 @@ bootPkgs.callPackage ./base.nix {
inherit bootPkgs;
ghcjsSrc = fetchFromGitHub {
# TODO: switch back to the regular ghcjs repo
# when https://github.com/ghcjs/ghcjs/pull/573 is merged.
owner = "k0001";
owner = "ghcjs";
repo = "ghcjs";
rev = "600015e085a28da601b65a41c513d4a458fcd184";
sha256 = "01kirrg0fnfwhllvwgfqjiwzwj4yv4lyig87x61n9jp6y5shzjdx";
rev = "2b3759942fb5b2fc1a58d314d9b098d4622fa6b6";
sha256 = "15asapg0va8dvcdycsx8dgk4xcpdnhml4h31wka6vvxf5anzz8aw";
};
ghcjsBootSrc = fetchgit {
# TODO: switch back to git://github.com/ghcjs/ghcjs-boot.git
# when https://github.com/ghcjs/ghcjs-boot/pull/41 is merged.
url = git://github.com/basvandijk/ghcjs-boot.git;
rev = "19a3b157ecb807c2224daffda5baecc92b76af35";
sha256 = "16sgr8vfr1nx5ljnk8gckgjk70zpa67ix4dbr9aizkwyz41ilfrb";
url = git://github.com/ghcjs/ghcjs-boot.git;
rev = "106e144cca6529a1b9612c11aea5d6ef65b96745";
sha256 = "0gxg8iiwvm93x1dwhxypczn9qiz4m1xvj8i7cf4snfdy2jdyhi5l";
fetchSubmodules = true;
};

View File

@@ -2,117 +2,145 @@
{
async = callPackage
({ mkDerivation, base, HUnit, stm, test-framework
, test-framework-hunit, stdenv
}:
mkDerivation {
pname = "async";
version = "2.1.1";
src = "${ghcjsBoot}/boot/async";
doCheck = false;
libraryHaskellDepends = [ base stm ];
testHaskellDepends = [
base HUnit test-framework test-framework-hunit
];
jailbreak = true;
homepage = https://github.com/simonmar/async;
description = "Run IO operations asynchronously and wait for their results";
license = stdenv.lib.licenses.bsd3;
}) {};
({ mkDerivation, base, HUnit, stdenv, stm, test-framework
, test-framework-hunit
}:
mkDerivation {
pname = "async";
version = "2.1.1";
src = "${ghcjsBoot}/boot/async";
doCheck = false;
libraryHaskellDepends = [ base stm ];
testHaskellDepends = [
base HUnit test-framework test-framework-hunit
];
jailbreak = true;
homepage = "https://github.com/simonmar/async";
description = "Run IO operations asynchronously and wait for their results";
license = stdenv.lib.licenses.bsd3;
}) {};
aeson = callPackage
({ mkDerivation, attoparsec, base, base-compat, base-orphans
, base16-bytestring, bytestring, containers, deepseq, directory
, dlist, fetchgit, filepath, generic-deriving, ghc-prim, hashable
, hashable-time, HUnit, integer-logarithms, QuickCheck
, quickcheck-instances, scientific, stdenv, tagged
, template-haskell, test-framework, test-framework-hunit
, test-framework-quickcheck2, text, time, time-locale-compat
, unordered-containers, uuid-types, vector
}:
mkDerivation {
pname = "aeson";
version = "1.1.1.0";
src = "${ghcjsBoot}/boot/aeson";
libraryHaskellDepends = [
attoparsec base base-compat bytestring containers deepseq dlist
ghc-prim hashable scientific tagged template-haskell text time
time-locale-compat unordered-containers uuid-types vector
];
testHaskellDepends = [
attoparsec base base-compat base-orphans base16-bytestring
bytestring containers directory dlist filepath generic-deriving
ghc-prim hashable hashable-time HUnit integer-logarithms QuickCheck
quickcheck-instances scientific tagged template-haskell
test-framework test-framework-hunit test-framework-quickcheck2 text
time time-locale-compat unordered-containers uuid-types vector
];
jailbreak = true;
homepage = https://github.com/bos/aeson;
description = "Fast JSON parsing and encoding";
license = stdenv.lib.licenses.bsd3;
}) {};
, base16-bytestring, bytestring, containers, deepseq, directory
, dlist, filepath, generic-deriving, ghc-prim, hashable
, hashable-time, HUnit, integer-logarithms, QuickCheck
, quickcheck-instances, scientific, stdenv, tagged
, template-haskell, test-framework, test-framework-hunit
, test-framework-quickcheck2, text, th-abstraction, time
, time-locale-compat, unordered-containers, uuid-types, vector
}:
mkDerivation {
pname = "aeson";
version = "1.2.2.0";
src = "${ghcjsBoot}/boot/aeson";
doCheck = false;
libraryHaskellDepends = [
attoparsec base base-compat bytestring containers deepseq dlist
ghc-prim hashable scientific tagged template-haskell text
th-abstraction time time-locale-compat unordered-containers
uuid-types vector
];
testHaskellDepends = [
attoparsec base base-compat base-orphans base16-bytestring
bytestring containers directory dlist filepath generic-deriving
ghc-prim hashable hashable-time HUnit integer-logarithms QuickCheck
quickcheck-instances scientific tagged template-haskell
test-framework test-framework-hunit test-framework-quickcheck2 text
time time-locale-compat unordered-containers uuid-types vector
];
jailbreak = true;
homepage = "https://github.com/bos/aeson";
description = "Fast JSON parsing and encoding";
license = stdenv.lib.licenses.bsd3;
}) {};
attoparsec = callPackage
({ mkDerivation, array, base, bytestring, case-insensitive
, containers, criterion, deepseq, directory, filepath, ghc-prim
, http-types, parsec, QuickCheck, quickcheck-unicode, scientific
, tasty, tasty-quickcheck, text, transformers, unordered-containers
, vector, stdenv
}:
mkDerivation {
pname = "attoparsec";
version = "0.13.1.0";
src = "${ghcjsBoot}/boot/attoparsec";
libraryHaskellDepends = [
array base bytestring containers deepseq scientific text
transformers
];
testHaskellDepends = [
array base bytestring deepseq QuickCheck quickcheck-unicode
scientific tasty tasty-quickcheck text transformers vector
];
benchmarkHaskellDepends = [
array base bytestring case-insensitive containers criterion deepseq
directory filepath ghc-prim http-types parsec scientific text
transformers unordered-containers vector
];
jailbreak = true;
homepage = https://github.com/bos/attoparsec;
description = "Fast combinator parsing for bytestrings and text";
license = stdenv.lib.licenses.bsd3;
}) {};
, containers, criterion, deepseq, directory, filepath, ghc-prim
, http-types, parsec, QuickCheck, quickcheck-unicode, scientific
, stdenv, tasty, tasty-quickcheck, text, transformers
, unordered-containers, vector
}:
mkDerivation {
pname = "attoparsec";
version = "0.13.1.0";
src = "${ghcjsBoot}/boot/attoparsec";
doCheck = false;
libraryHaskellDepends = [
array base bytestring containers deepseq scientific text
transformers
];
testHaskellDepends = [
array base bytestring deepseq QuickCheck quickcheck-unicode
scientific tasty tasty-quickcheck text transformers vector
];
benchmarkHaskellDepends = [
array base bytestring case-insensitive containers criterion deepseq
directory filepath ghc-prim http-types parsec scientific text
transformers unordered-containers vector
];
jailbreak = true;
homepage = "https://github.com/bos/attoparsec";
description = "Fast combinator parsing for bytestrings and text";
license = stdenv.lib.licenses.bsd3;
}) {};
base-compat = callPackage
({ mkDerivation, base, hspec, QuickCheck, stdenv, unix }:
mkDerivation {
pname = "base-compat";
version = "0.9.3";
src = "${ghcjsBoot}/boot/base-compat";
doCheck = false;
libraryHaskellDepends = [ base unix ];
testHaskellDepends = [ base hspec QuickCheck ];
jailbreak = true;
description = "A compatibility layer for base";
license = stdenv.lib.licenses.mit;
}) {};
bytestring-builder = callPackage
({ mkDerivation, base, bytestring, deepseq, stdenv }:
mkDerivation {
pname = "bytestring-builder";
version = "0.10.8.1.0";
src = "${ghcjsBoot}/boot/bytestring-builder";
doCheck = false;
libraryHaskellDepends = [ base bytestring deepseq ];
jailbreak = true;
description = "The new bytestring builder, packaged outside of GHC";
license = stdenv.lib.licenses.bsd3;
}) {};
case-insensitive = callPackage
({ mkDerivation, base, bytestring, criterion, deepseq, hashable
, HUnit, test-framework, test-framework-hunit, text, stdenv
}:
mkDerivation {
pname = "case-insensitive";
version = "1.2.0.8";
src = "${ghcjsBoot}/boot/case-insensitive";
doCheck = false;
libraryHaskellDepends = [ base bytestring deepseq hashable text ];
testHaskellDepends = [
base bytestring HUnit test-framework test-framework-hunit text
];
benchmarkHaskellDepends = [ base bytestring criterion deepseq ];
jailbreak = true;
homepage = https://github.com/basvandijk/case-insensitive;
description = "Case insensitive string comparison";
license = stdenv.lib.licenses.bsd3;
}) {};
, HUnit, stdenv, test-framework, test-framework-hunit, text
}:
mkDerivation {
pname = "case-insensitive";
version = "1.2.0.8";
src = "${ghcjsBoot}/boot/case-insensitive";
doCheck = false;
libraryHaskellDepends = [ base bytestring deepseq hashable text ];
testHaskellDepends = [
base bytestring HUnit test-framework test-framework-hunit text
];
benchmarkHaskellDepends = [ base bytestring criterion deepseq ];
jailbreak = true;
homepage = "https://github.com/basvandijk/case-insensitive";
description = "Case insensitive string comparison";
license = stdenv.lib.licenses.bsd3;
}) {};
dlist = callPackage
({ mkDerivation, base, Cabal, deepseq, QuickCheck, stdenv }:
mkDerivation {
pname = "dlist";
version = "0.8.0.2";
src = "${ghcjsBoot}/boot/dlist";
doCheck = false;
libraryHaskellDepends = [ base deepseq ];
testHaskellDepends = [ base Cabal QuickCheck ];
jailbreak = true;
homepage = https://github.com/spl/dlist;
description = "Difference lists";
license = stdenv.lib.licenses.bsd3;
}) {};
mkDerivation {
pname = "dlist";
version = "0.8.0.2";
src = "${ghcjsBoot}/boot/dlist";
doCheck = false;
libraryHaskellDepends = [ base deepseq ];
testHaskellDepends = [ base Cabal QuickCheck ];
jailbreak = true;
homepage = "https://github.com/spl/dlist";
description = "Difference lists";
license = stdenv.lib.licenses.bsd3;
}) {};
extensible-exceptions = callPackage
({ mkDerivation, base, stdenv }:
mkDerivation {
@@ -125,10 +153,21 @@
description = "Extensible exceptions";
license = stdenv.lib.licenses.bsd3;
}) {};
fail = callPackage
({ mkDerivation, stdenv }:
mkDerivation {
pname = "fail";
version = "4.9.0.0";
src = "${ghcjsBoot}/boot/fail";
jailbreak = true;
homepage = "https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail";
description = "Forward-compatible MonadFail class";
license = stdenv.lib.licenses.bsd3;
}) {};
hashable = callPackage
({ mkDerivation, base, bytestring, ghc-prim, HUnit, integer-gmp
, QuickCheck, random, stdenv, test-framework, test-framework-hunit
, test-framework-quickcheck2, text, unix
({ mkDerivation, base, bytestring, criterion, ghc-prim, HUnit
, integer-gmp, QuickCheck, random, siphash, stdenv, test-framework
, test-framework-hunit, test-framework-quickcheck2, text, unix
}:
mkDerivation {
pname = "hashable";
@@ -142,24 +181,58 @@
base bytestring ghc-prim HUnit QuickCheck random test-framework
test-framework-hunit test-framework-quickcheck2 text unix
];
benchmarkHaskellDepends = [
base bytestring criterion ghc-prim integer-gmp siphash text
];
jailbreak = true;
homepage = http://github.com/tibbe/hashable;
homepage = "http://github.com/tibbe/hashable";
description = "A class for types that can be converted to a hash value";
license = stdenv.lib.licenses.bsd3;
}) {};
integer-logarithms = callPackage
({ mkDerivation, array, base, ghc-prim, integer-gmp, QuickCheck
, smallcheck, stdenv, tasty, tasty-hunit, tasty-quickcheck
, tasty-smallcheck
}:
mkDerivation {
pname = "integer-logarithms";
version = "1.0.2";
src = "${ghcjsBoot}/boot/integer-logarithms";
doCheck = false;
libraryHaskellDepends = [ array base ghc-prim integer-gmp ];
testHaskellDepends = [
base QuickCheck smallcheck tasty tasty-hunit tasty-quickcheck
tasty-smallcheck
];
jailbreak = true;
homepage = "https://github.com/phadej/integer-logarithms";
description = "Integer logarithms";
license = stdenv.lib.licenses.mit;
}) {};
mtl = callPackage
({ mkDerivation, base, stdenv, transformers }:
mkDerivation {
pname = "mtl";
version = "2.2.2";
version = "2.2.1";
src = "${ghcjsBoot}/boot/mtl";
doCheck = false;
libraryHaskellDepends = [ base transformers ];
jailbreak = true;
homepage = http://github.com/ekmett/mtl;
homepage = "http://github.com/ekmett/mtl";
description = "Monad classes, using functional dependencies";
license = stdenv.lib.licenses.bsd3;
}) {};
nats = callPackage
({ mkDerivation, stdenv }:
mkDerivation {
pname = "nats";
version = "1.1.1";
src = "${ghcjsBoot}/boot/nats";
jailbreak = true;
homepage = "http://github.com/ekmett/nats/";
description = "Natural numbers";
license = stdenv.lib.licenses.bsd3;
}) {};
old-time = callPackage
({ mkDerivation, base, old-locale, stdenv }:
mkDerivation {
@@ -184,30 +257,57 @@
description = "Parallel programming library";
license = stdenv.lib.licenses.bsd3;
}) {};
random = callPackage
({ mkDerivation, base, stdenv, time }:
mkDerivation {
pname = "random";
version = "1.1";
src = "${ghcjsBoot}/boot/random";
doCheck = false;
libraryHaskellDepends = [ base time ];
testHaskellDepends = [ base ];
jailbreak = true;
description = "random number library";
license = stdenv.lib.licenses.bsd3;
}) {};
scientific = callPackage
({ mkDerivation, base, binary, bytestring, containers, criterion
, deepseq, ghc-prim, hashable, integer-gmp, integer-logarithms
, QuickCheck, smallcheck, tasty, tasty-ant-xml, tasty-hunit
, tasty-quickcheck, tasty-smallcheck, text, vector, stdenv
}:
mkDerivation {
pname = "scientific";
version = "0.3.4.10";
src = "${ghcjsBoot}/boot/scientific";
libraryHaskellDepends = [
base binary bytestring containers deepseq ghc-prim hashable
integer-gmp integer-logarithms text vector
];
testHaskellDepends = [
base binary bytestring QuickCheck smallcheck tasty tasty-ant-xml
tasty-hunit tasty-quickcheck tasty-smallcheck text
];
benchmarkHaskellDepends = [ base criterion ];
jailbreak = true;
homepage = https://github.com/basvandijk/scientific;
description = "Numbers represented using scientific notation";
license = stdenv.lib.licenses.bsd3;
}) {};
, deepseq, ghc-prim, hashable, integer-gmp, integer-logarithms
, QuickCheck, smallcheck, stdenv, tasty, tasty-ant-xml, tasty-hunit
, tasty-quickcheck, tasty-smallcheck, text, vector
}:
mkDerivation {
pname = "scientific";
version = "0.3.4.10";
src = "${ghcjsBoot}/boot/scientific";
doCheck = false;
libraryHaskellDepends = [
base binary bytestring containers deepseq ghc-prim hashable
integer-gmp integer-logarithms text vector
];
testHaskellDepends = [
base binary bytestring QuickCheck smallcheck tasty tasty-ant-xml
tasty-hunit tasty-quickcheck tasty-smallcheck text
];
benchmarkHaskellDepends = [ base criterion ];
jailbreak = true;
homepage = "https://github.com/basvandijk/scientific";
description = "Numbers represented using scientific notation";
license = stdenv.lib.licenses.bsd3;
}) {};
semigroups = callPackage
({ mkDerivation, base, stdenv }:
mkDerivation {
pname = "semigroups";
version = "0.18.3";
src = "${ghcjsBoot}/boot/semigroups";
doCheck = false;
libraryHaskellDepends = [ base ];
jailbreak = true;
homepage = "http://github.com/ekmett/semigroups/";
description = "Anything that associates";
license = stdenv.lib.licenses.bsd3;
}) {};
stm = callPackage
({ mkDerivation, array, base, stdenv }:
mkDerivation {
@@ -230,27 +330,27 @@
libraryHaskellDepends = [ base ];
testHaskellDepends = [ base containers HUnit mtl ];
jailbreak = true;
homepage = http://www.cs.uu.nl/wiki/GenericProgramming/SYB;
homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB";
description = "Scrap Your Boilerplate";
license = stdenv.lib.licenses.bsd3;
}) {};
tagged = callPackage
({ mkDerivation, base, deepseq, template-haskell, transformers
, transformers-compat, stdenv
}:
mkDerivation {
pname = "tagged";
version = "0.8.5";
src = "${ghcjsBoot}/boot/tagged";
doCheck = false;
libraryHaskellDepends = [
base deepseq template-haskell transformers transformers-compat
];
jailbreak = true;
homepage = http://github.com/ekmett/tagged;
description = "Haskell 98 phantom types to avoid unsafely passing dummy arguments";
license = stdenv.lib.licenses.bsd3;
}) {};
({ mkDerivation, base, deepseq, stdenv, template-haskell
, transformers, transformers-compat
}:
mkDerivation {
pname = "tagged";
version = "0.8.5";
src = "${ghcjsBoot}/boot/tagged";
doCheck = false;
libraryHaskellDepends = [
base deepseq template-haskell transformers transformers-compat
];
jailbreak = true;
homepage = "http://github.com/ekmett/tagged";
description = "Haskell 98 phantom types to avoid unsafely passing dummy arguments";
license = stdenv.lib.licenses.bsd3;
}) {};
text = callPackage
({ mkDerivation, array, base, binary, bytestring, deepseq, directory
, ghc-prim, HUnit, integer-gmp, QuickCheck, quickcheck-unicode
@@ -271,57 +371,104 @@
test-framework-hunit test-framework-quickcheck2
];
jailbreak = true;
homepage = https://github.com/bos/text;
homepage = "https://github.com/bos/text";
description = "An efficient packed Unicode text type";
license = stdenv.lib.licenses.bsd3;
}) {};
th-abstraction = callPackage
({ mkDerivation, base, containers, ghc-prim, stdenv
, template-haskell
}:
mkDerivation {
pname = "th-abstraction";
version = "0.2.6.0";
src = "${ghcjsBoot}/boot/th-abstraction";
doCheck = false;
libraryHaskellDepends = [
base containers ghc-prim template-haskell
];
testHaskellDepends = [ base containers template-haskell ];
jailbreak = true;
homepage = "https://github.com/glguy/th-abstraction";
description = "Nicer interface for reified information about data types";
license = stdenv.lib.licenses.isc;
}) {};
time-locale-compat = callPackage
({ mkDerivation, base, old-locale, stdenv, time }:
mkDerivation {
pname = "time-locale-compat";
version = "0.1.1.3";
src = "${ghcjsBoot}/boot/time-locale-compat";
doCheck = false;
libraryHaskellDepends = [ base old-locale time ];
jailbreak = true;
homepage = "https://github.com/khibino/haskell-time-locale-compat";
description = "Compatibility of TimeLocale between old-locale and time-1.5";
license = stdenv.lib.licenses.bsd3;
}) {};
transformers-compat = callPackage
({ mkDerivation, base, ghc-prim, stdenv, transformers }:
mkDerivation {
pname = "transformers-compat";
version = "0.5.1.4";
src = "${ghcjsBoot}/boot/transformers-compat";
doCheck = false;
libraryHaskellDepends = [ base ghc-prim transformers ];
jailbreak = true;
homepage = "http://github.com/ekmett/transformers-compat/";
description = "A small compatibility shim exposing the new types from transformers 0.3 and 0.4 to older Haskell platforms.";
license = stdenv.lib.licenses.bsd3;
}) {};
unordered-containers = callPackage
({ mkDerivation, base, bytestring, ChasingBottoms, containers
, criterion, deepseq, deepseq-generics, hashable, hashmap, HUnit
, mtl, QuickCheck, random, test-framework, test-framework-hunit
, test-framework-quickcheck2, stdenv
}:
mkDerivation {
pname = "unordered-containers";
version = "0.2.7.2";
src = "${ghcjsBoot}/boot/unordered-containers";
libraryHaskellDepends = [ base deepseq hashable ];
testHaskellDepends = [
base ChasingBottoms containers hashable HUnit QuickCheck
test-framework test-framework-hunit test-framework-quickcheck2
];
benchmarkHaskellDepends = [
base bytestring containers criterion deepseq deepseq-generics
hashable hashmap mtl random
];
jailbreak = true;
homepage = https://github.com/tibbe/unordered-containers;
description = "Efficient hashing-based container types";
license = stdenv.lib.licenses.bsd3;
}) {};
, criterion, deepseq, deepseq-generics, hashable, hashmap, HUnit
, mtl, QuickCheck, random, stdenv, test-framework
, test-framework-hunit, test-framework-quickcheck2
}:
mkDerivation {
pname = "unordered-containers";
version = "0.2.7.2";
src = "${ghcjsBoot}/boot/unordered-containers";
doCheck = false;
libraryHaskellDepends = [ base deepseq hashable ];
testHaskellDepends = [
base ChasingBottoms containers hashable HUnit QuickCheck
test-framework test-framework-hunit test-framework-quickcheck2
];
benchmarkHaskellDepends = [
base bytestring containers criterion deepseq deepseq-generics
hashable hashmap mtl random
];
jailbreak = true;
homepage = "https://github.com/tibbe/unordered-containers";
description = "Efficient hashing-based container types";
license = stdenv.lib.licenses.bsd3;
}) {};
uuid-types = callPackage
({ mkDerivation, base, binary, bytestring, containers, criterion
, deepseq, hashable, HUnit, QuickCheck, random, stdenv, tasty
, tasty-hunit, tasty-quickcheck, text
}:
mkDerivation {
pname = "uuid-types";
version = "1.0.3";
src = "${ghcjsBoot}/boot/uuid/uuid-types";
libraryHaskellDepends = [
base binary bytestring deepseq hashable random text
];
testHaskellDepends = [
base bytestring HUnit QuickCheck tasty tasty-hunit tasty-quickcheck
];
benchmarkHaskellDepends = [
base bytestring containers criterion deepseq random
];
jailbreak = true;
homepage = https://github.com/aslatter/uuid;
description = "Type definitions for Universally Unique Identifiers";
license = stdenv.lib.licenses.bsd3;
}) {};
, deepseq, hashable, HUnit, QuickCheck, random, stdenv, tasty
, tasty-hunit, tasty-quickcheck, text, unordered-containers
}:
mkDerivation {
pname = "uuid-types";
version = "1.0.3";
src = "${ghcjsBoot}/boot/uuid/uuid-types";
doCheck = false;
libraryHaskellDepends = [
base binary bytestring deepseq hashable random text
];
testHaskellDepends = [
base bytestring HUnit QuickCheck tasty tasty-hunit tasty-quickcheck
];
benchmarkHaskellDepends = [
base bytestring containers criterion deepseq random
unordered-containers
];
jailbreak = true;
homepage = "https://github.com/hvr/uuid";
description = "Type definitions for Universally Unique Identifiers";
license = stdenv.lib.licenses.bsd3;
}) {};
vector = callPackage
({ mkDerivation, base, deepseq, ghc-prim, primitive, QuickCheck
, random, stdenv, template-haskell, test-framework
@@ -338,7 +485,7 @@
test-framework-quickcheck2 transformers
];
jailbreak = true;
homepage = https://github.com/haskell/vector;
homepage = "https://github.com/haskell/vector";
description = "Efficient Arrays";
license = stdenv.lib.licenses.bsd3;
}) {};
@@ -366,16 +513,15 @@
test-framework-hunit test-framework-quickcheck2 text
];
jailbreak = true;
homepage = http://github.com/ghcjs/ghcjs-base;
description = "Base library for GHCJS";
homepage = "http://github.com/ghcjs/ghcjs-base";
description = "base library for GHCJS";
license = stdenv.lib.licenses.mit;
}) {};
Cabal = callPackage
({ mkDerivation, array, base, binary, bytestring, containers
, deepseq, directory, extensible-exceptions, filepath, HUnit
, old-time, pretty, process, QuickCheck, regex-posix, stdenv
, test-framework, test-framework-hunit, test-framework-quickcheck2
, time, unix
, deepseq, directory, exceptions, filepath, old-time, pretty
, process, QuickCheck, regex-posix, stdenv, tagged, tasty
, tasty-hunit, tasty-quickcheck, time, transformers, unix
}:
mkDerivation {
pname = "Cabal";
@@ -387,12 +533,12 @@
pretty process time unix
];
testHaskellDepends = [
base bytestring containers directory extensible-exceptions filepath
HUnit old-time process QuickCheck regex-posix test-framework
test-framework-hunit test-framework-quickcheck2 unix
base bytestring containers directory exceptions filepath old-time
pretty process QuickCheck regex-posix tagged tasty tasty-hunit
tasty-quickcheck transformers unix
];
jailbreak = true;
homepage = http://www.haskell.org/cabal/;
homepage = "http://www.haskell.org/cabal/";
description = "A framework for packaging Haskell software";
license = stdenv.lib.licenses.bsd3;
}) {};

View File

@@ -118,6 +118,15 @@ stdenv.mkDerivation rec {
./ssl-cert-file-1.9.patch
./creds-test.patch
./remove-test-pie-1.9.patch
(fetchpatch {
url = "https://github.com/golang/go/commit/29415eb2b92e78481897c4161ba99f5b09fa6102.patch";
sha256 = "01jkm4b2dazzjnfla7rdd0w2clzplga3zza6ybpmkjkk3i4bp73d";
})
(fetchpatch {
url = "https://github.com/golang/go/commit/27e80f7c4d8001598367e15a1617fa524bd0fb11.patch";
sha256 = "1250nrc79jwcagkjqffn5srn78isykvjhvmqhwipwyqb99q85wcz";
})
];
postPatch = optionalString stdenv.isDarwin ''
@@ -132,6 +141,7 @@ stdenv.mkDerivation rec {
else if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.isArm then "arm"
else if stdenv.isAarch64 then "arm64"
else throw "Unsupported system";
GOARM = optionalString (stdenv.system == "armv5tel-linux") "5";
GO386 = 387; # from Arch: don't assume sse2 on i686
@@ -171,11 +181,11 @@ stdenv.mkDerivation rec {
disallowedReferences = [ go_bootstrap ];
meta = with stdenv.lib; {
branch = "1.8";
branch = "1.9";
homepage = http://golang.org/;
description = "The Go Programming language";
license = licenses.bsd3;
maintainers = with maintainers; [ cstrahan wkennington ];
maintainers = with maintainers; [ cstrahan orivej wkennington ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -1,12 +1,12 @@
{ stdenv, fetchurl, makeWrapper, jre, unzip }:
stdenv.mkDerivation rec {
version = "1.1.50";
version = "1.1.51";
name = "kotlin-${version}";
src = fetchurl {
url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
sha256 = "01y7m0r5wa2apd05c38h77060javgbj8072vd08lz4qaw6c6445m";
sha256 = "1kbwyldfyyd20rnrl5yvyvqiqj9b3v6543vhlqsh5swhhc9nnd0b";
};
propagatedBuildInputs = [ jre ] ;

View File

@@ -0,0 +1,97 @@
{ stdenv, fetch, cmake, libxml2, libedit, llvm, version, release_version, clang-tools-extra_src, python
, fixDarwinDylibNames
, enableManpages ? false
}:
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
self = stdenv.mkDerivation {
name = "clang-${version}";
unpackPhase = ''
unpackFile ${fetch "cfe" "0w09s8fn3lkn6i04nj0cisgp821r815fk5b5fjn97xrd371277q1"}
mv cfe-${version}* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
mv clang-tools-extra-* $sourceRoot/tools/extra
'';
nativeBuildInputs = [ cmake python ]
++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
buildInputs = [ libedit libxml2 llvm ]
++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"
] ++ stdenv.lib.optionals enableManpages [
"-DCLANG_INCLUDE_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
]
# Maybe with compiler-rt this won't be needed?
++ stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}"
++ stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include";
patches = [ ./purity.patch ];
postBuild = stdenv.lib.optionalString enableManpages ''
cmake --build . --target docs-clang-man
'';
postPatch = ''
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
-e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
lib/Driver/ToolChains/*.cpp
# Patch for standalone doc building
sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
'';
outputs = [ "out" "python" ]
++ stdenv.lib.optional enableManpages "man";
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
ln -sv ${llvm}/lib/clang/${release_version}/lib $out/lib/clang/${release_version}/
ln -sv $out/bin/clang $out/bin/cpp
mkdir -p $python/bin $python/share/clang/
mv $out/bin/{git-clang-format,scan-view} $python/bin
if [ -e $out/bin/set-xcode-analyzer ]; then
mv $out/bin/set-xcode-analyzer $python/bin
fi
mv $out/share/clang/*.py $python/share/clang
rm $out/bin/c-index-test
''
+ stdenv.lib.optionalString enableManpages ''
# Manually install clang manpage
cp docs/man/*.1 $out/share/man/man1/
# Move it and other man pages to 'man' output
moveToOutput "share/man" "$man"
'';
enableParallelBuilding = true;
passthru = {
lib = self; # compatibility with gcc, so that `stdenv.cc.cc.lib` works on both
isClang = true;
inherit llvm;
} // stdenv.lib.optionalAttrs stdenv.isLinux {
inherit gcc;
};
meta = {
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all;
};
};
in self

View File

@@ -0,0 +1,30 @@
From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Thu, 18 May 2017 11:56:12 -0500
Subject: [PATCH] "purity" patch for 5.0
---
lib/Driver/ToolChains/Gnu.cpp | 7 -------
1 file changed, 7 deletions(-)
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
index fe3c0191bb..c6a482bece 100644
--- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/lib/Driver/ToolChains/Gnu.cpp
@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
if (!Args.hasArg(options::OPT_static)) {
if (Args.hasArg(options::OPT_rdynamic))
CmdArgs.push_back("-export-dynamic");
-
- if (!Args.hasArg(options::OPT_shared)) {
- const std::string Loader =
- D.DyldPrefix + ToolChain.getDynamicLinker(Args);
- CmdArgs.push_back("-dynamic-linker");
- CmdArgs.push_back(Args.MakeArgString(Loader));
- }
}
CmdArgs.push_back("-o");
--
2.11.0

View File

@@ -0,0 +1,155 @@
From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Tue, 19 Sep 2017 13:13:06 -0500
Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
needs it
---
cmake/Modules/AddCompilerRT.cmake | 8 ------
test/asan/CMakeLists.txt | 52 ---------------------------------------
test/tsan/CMakeLists.txt | 47 -----------------------------------
3 files changed, 107 deletions(-)
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
index bc5fb9ff7..b64eb4246 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
endif()
- if(APPLE)
- # Ad-hoc sign the dylibs
- add_custom_command(TARGET ${libname}
- POST_BUILD
- COMMAND codesign --sign - $<TARGET_FILE:${libname}>
- WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
- )
- endif()
endif()
install(TARGETS ${libname}
ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
diff --git a/test/asan/CMakeLists.txt b/test/asan/CMakeLists.txt
index 8bfc15b5c..f23d0f71a 100644
--- a/test/asan/CMakeLists.txt
+++ b/test/asan/CMakeLists.txt
@@ -83,58 +83,6 @@ foreach(arch ${ASAN_TEST_ARCH})
endif()
endforeach()
-# iOS and iOS simulator test suites
-# These are not added into "check-all", in order to run these tests, use
-# "check-asan-iossim-x86_64" and similar. They also require that an extra env
-# variable to select which iOS device or simulator to use, e.g.:
-# SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6"
-if(APPLE)
- set(EXCLUDE_FROM_ALL ON)
-
- set(ASAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
- set(ASAN_TEST_IOS "1")
- pythonize_bool(ASAN_TEST_IOS)
- set(ASAN_TEST_DYNAMIC True)
-
- foreach(arch ${DARWIN_iossim_ARCHS})
- set(ASAN_TEST_IOSSIM "1")
- pythonize_bool(ASAN_TEST_IOSSIM)
- set(ASAN_TEST_TARGET_ARCH ${arch})
- set(ASAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_iossim_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
- set(ASAN_TEST_CONFIG_SUFFIX "-${arch}-iossim")
- get_bits_for_arch(${arch} ASAN_TEST_BITS)
- string(TOUPPER ${arch} ARCH_UPPER_CASE)
- set(CONFIG_NAME "IOSSim${ARCH_UPPER_CASE}Config")
- configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
- )
- add_lit_testsuite(check-asan-iossim-${arch} "AddressSanitizer iOS Simulator ${arch} tests"
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
- DEPENDS ${ASAN_TEST_DEPS})
- endforeach()
-
- foreach (arch ${DARWIN_ios_ARCHS})
- set(ASAN_TEST_IOSSIM "0")
- pythonize_bool(ASAN_TEST_IOSSIM)
- set(ASAN_TEST_TARGET_ARCH ${arch})
- set(ASAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_ios_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
- set(ASAN_TEST_CONFIG_SUFFIX "-${arch}-ios")
- get_bits_for_arch(${arch} ASAN_TEST_BITS)
- string(TOUPPER ${arch} ARCH_UPPER_CASE)
- set(CONFIG_NAME "IOS${ARCH_UPPER_CASE}Config")
- configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
- )
- add_lit_testsuite(check-asan-ios-${arch} "AddressSanitizer iOS ${arch} tests"
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
- DEPENDS ${ASAN_TEST_DEPS})
- endforeach()
-
- set(EXCLUDE_FROM_ALL OFF)
-endif()
-
# Add unit tests.
if(COMPILER_RT_INCLUDE_TESTS)
set(ASAN_TEST_DYNAMIC False)
diff --git a/test/tsan/CMakeLists.txt b/test/tsan/CMakeLists.txt
index a68908612..cde0accb5 100644
--- a/test/tsan/CMakeLists.txt
+++ b/test/tsan/CMakeLists.txt
@@ -42,53 +42,6 @@ foreach(arch ${TSAN_TEST_ARCH})
list(APPEND TSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
endforeach()
-# iOS and iOS simulator test suites
-# These are not added into "check-all", in order to run these tests, use
-# "check-tsan-iossim-x86_64" and similar. They also require an extra environment
-# variable to select which iOS device or simulator to use, e.g.:
-# SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6"
-if(APPLE)
- set(EXCLUDE_FROM_ALL ON)
-
- set(TSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
- set(TSAN_TEST_IOS "1")
- pythonize_bool(TSAN_TEST_IOS)
-
- set(arch "x86_64")
- set(TSAN_TEST_IOSSIM "1")
- pythonize_bool(TSAN_TEST_IOSSIM)
- set(TSAN_TEST_TARGET_ARCH ${arch})
- set(TSAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_iossim_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
- set(TSAN_TEST_CONFIG_SUFFIX "-${arch}-iossim")
- string(TOUPPER ${arch} ARCH_UPPER_CASE)
- set(CONFIG_NAME "IOSSim${ARCH_UPPER_CASE}Config")
- configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
- )
- add_lit_testsuite(check-tsan-iossim-${arch} "ThreadSanitizer iOS Simulator ${arch} tests"
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
- DEPENDS ${TSAN_TEST_DEPS})
-
- set(arch "arm64")
- set(TSAN_TEST_IOSSIM "0")
- pythonize_bool(TSAN_TEST_IOSSIM)
- set(TSAN_TEST_TARGET_ARCH ${arch})
- set(TSAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_ios_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
- set(TSAN_TEST_CONFIG_SUFFIX "-${arch}-ios")
- string(TOUPPER ${arch} ARCH_UPPER_CASE)
- set(CONFIG_NAME "IOS${ARCH_UPPER_CASE}Config")
- configure_lit_site_cfg(
- ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
- )
- add_lit_testsuite(check-tsan-ios-${arch} "ThreadSanitizer iOS Simulator ${arch} tests"
- ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
- DEPENDS ${TSAN_TEST_DEPS})
-
- set(EXCLUDE_FROM_ALL OFF)
-endif()
-
if(COMPILER_RT_INCLUDE_TESTS)
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
--
2.14.1

View File

@@ -0,0 +1,81 @@
{ lowPrio, newScope, stdenv, targetPlatform, cmake, libstdcxxHook
, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, ccWrapperFun
, darwin
}:
let
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; });
release_version = "5.0.0";
version = release_version; # differentiating these is important for rc's
fetch = name: sha256: fetchurl {
url = "http://llvm.org/releases/${release_version}/${name}-${version}.src.tar.xz";
inherit sha256;
};
compiler-rt_src = fetch "compiler-rt" "1cy0y389zxn7mk8vffqvfirk9bbcbc8ziwc1nf1a8d118rk55bfm";
clang-tools-extra_src = fetch "clang-tools-extra" "1ikkv6k8cfgpjqlm24iqz52i5nyafzsc4dyikzzyb9n4b6wpil47";
# Add man output without introducing extra dependencies.
overrideManOutput = drv:
let drv-manpages = drv.override { enableManpages = true; }; in
drv // { man = drv-manpages.man; /*outputs = drv.outputs ++ ["man"];*/ };
llvm = callPackage ./llvm.nix {
inherit compiler-rt_src stdenv;
};
clang-unwrapped = callPackage ./clang {
inherit clang-tools-extra_src stdenv;
};
self = {
llvm = overrideManOutput llvm;
clang-unwrapped = overrideManOutput clang-unwrapped;
llvm-manpages = lowPrio self.llvm.man;
clang-manpages = lowPrio self.clang-unwrapped.man;
clang = if stdenv.cc.isGNU then self.libstdcxxClang else self.libcxxClang;
libstdcxxClang = ccWrapperFun {
cc = self.clang-unwrapped;
/* FIXME is this right? */
inherit (stdenv.cc) libc nativeTools nativeLibc;
extraPackages = [ libstdcxxHook ];
};
libcxxClang = ccWrapperFun {
cc = self.clang-unwrapped;
/* FIXME is this right? */
inherit (stdenv.cc) libc nativeTools nativeLibc;
extraPackages = [ self.libcxx self.libcxxabi ];
};
stdenv = stdenv.override (drv: {
allowedRequisites = null;
cc = self.clang;
# Don't include the libc++ and libc++abi from the original stdenv.
extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF;
});
libcxxStdenv = stdenv.override (drv: {
allowedRequisites = null;
cc = self.libcxxClang;
# Don't include the libc++ and libc++abi from the original stdenv.
extraBuildInputs = stdenv.lib.optional stdenv.isDarwin darwin.CF;
});
lld = callPackage ./lld.nix {};
lldb = callPackage ./lldb.nix {};
libcxx = callPackage ./libc++ {};
libcxxabi = callPackage ./libc++abi.nix {};
openmp = callPackage ./openmp.nix {};
};
in self

View File

@@ -0,0 +1,44 @@
{ lib, stdenv, fetch, cmake, llvm, libcxxabi, fixDarwinDylibNames, version }:
stdenv.mkDerivation rec {
name = "libc++-${version}";
src = fetch "libcxx" "1cf953msb0vwgjjrapw06950dnsdb2ps305czkn0vvr1k8g9irga";
postUnpack = ''
unpackFile ${libcxxabi.src}
export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
'';
prePatch = ''
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
'';
preConfigure = ''
# Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
"-DLIBCXX_LIBCPPABI_VERSION=2"
"-DLIBCXX_CXX_ABI=libcxxabi"
];
enableParallelBuilding = true;
linkCxxAbi = stdenv.isLinux;
setupHook = ./setup-hook.sh;
meta = {
homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11";
license = with stdenv.lib.licenses; [ ncsa mit ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@@ -0,0 +1,3 @@
linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@@ -0,0 +1,47 @@
{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version }:
stdenv.mkDerivation {
name = "libc++abi-${version}";
src = fetch "libcxxabi" "04c9dfmrr8diih73x0wq99dk9xb99mg0bvsnbhx5q912xg3ihs8p";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
postUnpack = ''
unpackFile ${libcxx.src}
unpackFile ${llvm.src}
export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export TRIPLE=x86_64-apple-darwin
'';
installPhase = if stdenv.isDarwin
then ''
for file in lib/*.dylib; do
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# http://www.cmake.org/Wiki/CMake_RPATH_handling
install_name_tool -id $out/$file $file
done
make install
install -d 755 $out/include
install -m 644 ../include/*.h $out/include
''
else ''
install -d -m 755 $out/include $out/lib
install -m 644 lib/libc++abi.so.1.0 $out/lib
install -m 644 ../include/cxxabi.h $out/include
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
'';
meta = {
homepage = http://libcxxabi.llvm.org/;
description = "A new implementation of low level support for a standard C++ library";
license = with stdenv.lib.licenses; [ ncsa mit ];
maintainers = with stdenv.lib.maintainers; [ vlstill ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@@ -0,0 +1,33 @@
{ stdenv
, fetch
, cmake
, zlib
, llvm
, python
, version
}:
stdenv.mkDerivation {
name = "lld-${version}";
src = fetch "lld" "15rqsmfw0jlsri7hszbs8l0j7v1030cy9xvvdb245397llh7k6ir";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm ];
outputs = [ "out" "dev" ];
enableParallelBuilding = true;
postInstall = ''
moveToOutput include "$dev"
moveToOutput lib "$dev"
'';
meta = {
description = "The LLVM Linker";
homepage = http://lld.llvm.org/;
license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all;
};
}

View File

@@ -0,0 +1,51 @@
{ stdenv
, fetch
, cmake
, zlib
, ncurses
, swig
, which
, libedit
, libxml2
, llvm
, clang-unwrapped
, python
, version
, darwin
}:
stdenv.mkDerivation {
name = "lldb-${version}";
src = fetch "lldb" "0zcbav39srf6awv9znvzr7nqdrj704i8da3wdgc8362y20rcm860";
postPatch = ''
# Fix up various paths that assume llvm and clang are installed in the same place
sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
cmake/modules/LLDBStandalone.cmake
sed -i 's,".*tools/clang/include","${clang-unwrapped}/include",' \
cmake/modules/LLDBStandalone.cmake
sed -i 's,"$.LLVM_LIBRARY_DIR.",${llvm}/lib ${clang-unwrapped}/lib,' \
cmake/modules/LLDBStandalone.cmake
'';
nativeBuildInputs = [ cmake python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
CXXFLAGS = "-fno-rtti";
hardeningDisable = [ "format" ];
cmakeFlags = [
"-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
];
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "A next-generation high-performance debugger";
homepage = http://llvm.org/;
license = licenses.ncsa;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,26 @@
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index 94d426b..37f7794 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
+ /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
+ if (!IsInDevelopmentTree) {
+ bool WantShared = true;
+ for (int i = 1; i < argc; ++i) {
+ StringRef Arg = argv[i];
+ if (Arg == "--link-shared")
+ WantShared = true;
+ else if (Arg == "--link-static")
+ WantShared = false; // the last one wins
+ }
+
+ if (WantShared)
+ ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
+ }
+
/// We only use `shared library` mode in cases where the static library form
/// of the components provided are not available; note however that this is
/// skipped if we're run from within the build dir. However, once installed,

View File

@@ -0,0 +1,153 @@
{ stdenv
, fetch
, fetchpatch
, perl
, groff
, cmake
, python
, libffi
, binutils
, libxml2
, valgrind
, ncurses
, version
, release_version
, zlib
, compiler-rt_src
, libcxxabi
, debugVersion ? false
, enableManpages ? false
, enableSharedLibraries ? true
, darwin
}:
let
src = fetch "llvm" "1nin64vz21hyng6jr19knxipvggaqlkl2l9jpd5czbc4c2pcnpg3";
# Used when creating a version-suffixed symlink of libLLVM.dylib
shortVersion = with stdenv.lib;
concatStringsSep "." (take 2 (splitString "." release_version));
in stdenv.mkDerivation rec {
name = "llvm-${version}";
unpackPhase = ''
unpackFile ${src}
mv llvm-${version}* llvm
sourceRoot=$PWD/llvm
unpackFile ${compiler-rt_src}
mv compiler-rt-* $sourceRoot/projects/compiler-rt
'';
outputs = [ "out" ]
++ stdenv.lib.optional enableSharedLibraries "lib"
++ stdenv.lib.optional enableManpages "man";
nativeBuildInputs = [ perl groff cmake python ]
++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
buildInputs = [ libxml2 libffi ]
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi ];
propagatedBuildInputs = [ ncurses zlib ];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
# get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
# a flag and turn the flag off during the stdenv build.
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace ./projects/compiler-rt/cmake/config-ix.cmake \
--replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
''
# Patch llvm-config to return correct library path based on --link-{shared,static}.
+ stdenv.lib.optionalString (enableSharedLibraries) ''
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
patch -p1 < ./llvm-outputs.patch
'' + ''
# FileSystem permissions tests fail with various special bits
substituteInPlace unittests/Support/CMakeLists.txt \
--replace "Path.cpp" ""
rm unittests/Support/Path.cpp
# Revert compiler-rt commit that makes codesign mandatory
patch -p1 -i ${./compiler-rt-codesign.patch} -d projects/compiler-rt
'';
# hacky fix: created binaries need to be run before installation
preBuild = ''
mkdir -p $out/
ln -sv $PWD/lib $out
'';
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON"
"-DCOMPILER_RT_INCLUDE_TESTS=OFF" # FIXME: requires clang source code
]
++ stdenv.lib.optional enableSharedLibraries
"-DLLVM_LINK_LLVM_DYLIB=ON"
++ stdenv.lib.optionals enableManpages [
"-DLLVM_BUILD_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
]
++ stdenv.lib.optional (!isDarwin)
"-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include"
++ stdenv.lib.optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
];
postBuild = ''
rm -fR $out
paxmark m bin/{lli,llvm-rtdyld}
paxmark m unittests/ExecutionEngine/MCJIT/MCJITTests
paxmark m unittests/ExecutionEngine/Orc/OrcJITTests
paxmark m unittests/Support/SupportTests
paxmark m bin/lli-child-target
'';
preCheck = ''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
'';
postInstall = stdenv.lib.optionalString enableManpages ''
moveToOutput "share/man" "$man"
''
+ stdenv.lib.optionalString enableSharedLibraries ''
moveToOutput "lib/libLLVM-*" "$lib"
moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
''
+ stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
install_name_tool -id $lib/lib/libLLVM.dylib $lib/lib/libLLVM.dylib
install_name_tool -change @rpath/libLLVM.dylib $lib/lib/libLLVM.dylib $out/bin/llvm-config
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
'';
doCheck = stdenv.isLinux && (!stdenv.isi686);
checkTarget = "check-all";
enableParallelBuilding = true;
passthru.src = src;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.ncsa;
maintainers = with stdenv.lib.maintainers; [ lovek323 raskin viric dtzWill ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@@ -0,0 +1,26 @@
{ stdenv
, fetch
, cmake
, zlib
, llvm
, perl
, version
}:
stdenv.mkDerivation {
name = "openmp-${version}";
src = fetch "openmp" "1igplg89bl6k6r9q88hnpcznq3g9lb79w7bix025lwp00ldhivy0";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];
enableParallelBuilding = true;
meta = {
description = "Components required to build an executable OpenMP program";
homepage = http://openmp.llvm.org/;
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.all;
};
}

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "nim-${version}";
version = "0.17.0";
version = "0.17.2";
src = fetchurl {
url = "http://nim-lang.org/download/${name}.tar.xz";
sha256 = "16vsmk4rqnkg9lc9h9jk62ps0x778cdqg6qrs3k6fv2g73cqvq9n";
sha256 = "1gc2xk3ygmz9y4pm75pligssgw995a7gvnfpy445fjpw4d81pzxa";
};
doCheck = true;

View File

@@ -25,6 +25,7 @@ rec {
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
doCheck = false;
broken = true;
};
cargo = callPackage ./cargo.nix rec {

View File

@@ -22,6 +22,7 @@ rec {
] ++ stdenv.lib.optional stdenv.needsPax ./patches/grsec.patch;
doCheck = false;
broken = true;
};
cargo = callPackage ./cargo.nix rec {

View File

@@ -10,6 +10,7 @@
, targetPatches
, targetToolchains
, doCheck ? true
, broken ? false
, buildPlatform, hostPlatform
} @ args:
@@ -154,5 +155,6 @@ stdenv.mkDerivation {
maintainers = with maintainers; [ madjar cstrahan wizeman globin havvy wkennington ];
license = [ licenses.mit licenses.asl20 ];
platforms = platforms.linux ++ platforms.darwin;
broken = broken;
};
}

View File

@@ -263,6 +263,7 @@ stdenv.mkDerivation rec {
license = licenses.asl20;
# Swift doesn't support 32bit Linux, unknown on other platforms.
platforms = [ "x86_64-linux" ];
broken = true;
};
}

View File

@@ -0,0 +1,82 @@
{ stdenv, lib, fetchurl, unzip, makeWrapper, setJavaClassPath
, zulu, glib, libxml2, libav_0_8, ffmpeg, libxslt, mesa_noglu, alsaLib
, fontconfig, freetype, gnome2, cairo, gdk_pixbuf, atk, xorg
, swingSupport ? true }:
let
version = "8.21.0.1";
openjdk = "8.0.131";
sha256_linux = "0cr1wvk1ifdq69ia8sr6171yzciba8l5x7dszwa5g2v0vmmqq88p";
sha256_darwin = "0xq9bdzbdq8wq48gj6j56bw30l2iafz6sy1wdhrf92n9bnz5qmw7";
platform = if stdenv.isDarwin then "macosx" else "linux";
hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
extension = if stdenv.isDarwin then "zip" else "tar.gz";
libraries = [
stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu
xorg.libXxf86vm alsaLib fontconfig freetype gnome2.pango
gnome2.gtk cairo gdk_pixbuf atk
] ++ (lib.optionals swingSupport (with xorg; [
xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp
xorg.libXt xorg.libXrender stdenv.cc.cc
]));
in stdenv.mkDerivation rec {
inherit version openjdk platform hash extension;
name = "zulu-${version}";
src = fetchurl {
url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}";
sha256 = hash;
};
buildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin unzip;
installPhase = ''
mkdir -p $out
cp -r ./* "$out/"
jrePath="$out/jre"
rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/jli
rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/server
rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/xawt
rpath=$rpath''${rpath:+:}$jrePath/lib/amd64
# set all the dynamic linkers
find $out -type f -perm -0100 \
-exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "$rpath" {} \;
find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
mkdir -p $out/nix-support
printWords ${setJavaClassPath} > $out/nix-support/propagated-native-build-inputs
# Set JAVA_HOME automatically.
cat <<EOF >> $out/nix-support/setup-hook
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
EOF
'';
rpath = stdenv.lib.strings.makeLibraryPath libraries;
passthru = {
home = "${zulu}";
};
meta = with stdenv.lib; {
homepage = https://www.azul.com/products/zulu/;
license = licenses.gpl2;
description = "Certified builds of OpenJDK";
longDescription = ''
Certified builds of OpenJDK that can be deployed across multiple
operating systems, containers, hypervisors and Cloud platforms.
'';
maintainers = with maintainers; [ nequissimus fpletz ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
};
}

View File

@@ -1,14 +1,14 @@
{ stdenv, lib, fetchurl, unzip, makeWrapper, setJavaClassPath
, zulu, glib, libxml2, libav_0_8, ffmpeg, libxslt, mesa_noglu, alsaLib
, fontconfig, freetype, gnome2, cairo, gdk_pixbuf, atk, xorg
, fontconfig, freetype, gnome2, cairo, gdk_pixbuf, atk, xorg, zlib
, swingSupport ? true }:
let
version = "8.21.0.1";
openjdk = "8.0.131";
version = "9.0.0.15";
openjdk = "9.0.0";
sha256_linux = "0cr1wvk1ifdq69ia8sr6171yzciba8l5x7dszwa5g2v0vmmqq88p";
sha256_darwin = "0xq9bdzbdq8wq48gj6j56bw30l2iafz6sy1wdhrf92n9bnz5qmw7";
sha256_linux = "0s9vr135yhdnxqds4hfafyrlh33j6g78v6l1v0ap2y6yqgabh9qi";
sha256_darwin = "104w1msrwijf8dv3n65hjinp7i47z6ygzjipdzqriqam2zljxn4b";
platform = if stdenv.isDarwin then "macosx" else "linux";
hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
@@ -17,7 +17,7 @@ let
libraries = [
stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg libxslt mesa_noglu
xorg.libXxf86vm alsaLib fontconfig freetype gnome2.pango
gnome2.gtk cairo gdk_pixbuf atk
gnome2.gtk cairo gdk_pixbuf atk zlib
] ++ (lib.optionals swingSupport (with xorg; [
xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp
xorg.libXt xorg.libXrender stdenv.cc.cc
@@ -39,12 +39,9 @@ in stdenv.mkDerivation rec {
mkdir -p $out
cp -r ./* "$out/"
jrePath="$out/jre"
rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/jli
rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/server
rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/xawt
rpath=$rpath''${rpath:+:}$jrePath/lib/amd64
rpath=$rpath''${rpath:+:}$out/lib/jli
rpath=$rpath''${rpath:+:}$out/lib/server
rpath=$rpath''${rpath:+:}$out/lib
# set all the dynamic linkers
find $out -type f -perm -0100 \