Merge remote-tracking branch 'origin/master' into staging.

This commit is contained in:
Peter Simons
2015-02-25 20:18:28 +01:00
121 changed files with 14483 additions and 2729 deletions

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchgit, python }:
let
tag = "1.29.3";
tag = "1.29.10";
in
stdenv.mkDerivation rec {
@@ -10,13 +10,13 @@ stdenv.mkDerivation rec {
srcFC = fetchgit {
url = git://github.com/kripken/emscripten-fastcomp;
rev = "refs/tags/${tag}";
sha256 = "ab44554dc43eee5552ea04c134a5aaff2cd32f6f6528f58a24025bcd8fd1d46e";
sha256 = "eee0f884c7e10e1b869b9d3afbb03bf69c63ec0560b136e3e8cd64ca00a41653";
};
srcFL = fetchgit {
url = git://github.com/kripken/emscripten-fastcomp-clang;
rev = "refs/tags/${tag}";
sha256 = "cc6dd704f5eba64fda931833479003bf3c8d9cf781bbaac3aa22a7b2644ccb26";
sha256 = "22c48e85dfacd9f2349d37fb421f0f848b65fc7b39e66984d04349ee3271667c";
};
buildInputs = [ python ];

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchgit, emscriptenfastcomp, python, nodejs, closurecompiler, jre }:
let
tag = "1.29.3";
tag = "1.29.10";
in
stdenv.mkDerivation rec {
@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
src = fetchgit {
url = git://github.com/kripken/emscripten;
rev = "refs/tags/${tag}";
sha256 = "7f65d1d5cc1c1866554cd79ff83f87fc72a7df59cf1dfd6481e3f0aed5c7dc1f";
sha256 = "0d7ed2b801ac37acaf907bd03ba42cce3ac4a4c330bf1ef28de25bbb3f39ba87";
};
buildCommand = ''

View File

@@ -5,14 +5,6 @@ stdenv.mkDerivation rec {
src = fetch "dragonegg" "1v1lc9h2nfk3lsk9sx1k4ckwddz813hqjmlp2bx2kwxx9hw364ar";
patches = [(fetchpatch {
url = "https://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/ABIHack.inc"
+ "?r1=208730&r2=208729&view=patch";
sha256 = "1al82gqz90hzjx24p0wls029lw2bgnlgd209kgvxsp82p4z1v1c1";
name = "bug-18548.patch";
})];
patchFlags = "-p2";
# The gcc the plugin will be built for (the same used building dragonegg)
GCC = "gcc";

View File

@@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
pname = "urweb";
version = "20141206";
version = "20150214";
name = "${pname}-${version}";
src = fetchurl {
url = "http://www.impredicative.com/ur/${name}.tgz";
sha256 = "077yakksxvdjlmwgc9wlz9jnkr345sikqjchvmxyv0axga5bw4rj";
sha256 = "f7b7587fe72c04f14581ded11588777f7bb61e392634966cc0354e13d69f236d";
};
buildInputs = [ stdenv.cc file openssl mlton mysql postgresql sqlite ];

View File

@@ -7,8 +7,8 @@ self: super: {
# Some packages need a non-core version of Cabal.
Cabal_1_18_1_6 = dontCheck super.Cabal_1_18_1_6;
Cabal_1_20_0_3 = dontCheck super.Cabal_1_20_0_3;
Cabal_1_22_0_0 = dontCheck super.Cabal_1_22_0_0;
cabal-install = dontCheck (super.cabal-install.override { Cabal = self.Cabal_1_22_0_0; });
Cabal_1_22_1_1 = dontCheck super.Cabal_1_22_1_1;
cabal-install = dontCheck (super.cabal-install.override { Cabal = self.Cabal_1_22_1_1; });
# Break infinite recursions.
digest = super.digest.override { inherit (pkgs) zlib; };
@@ -43,6 +43,20 @@ self: super: {
hinotify = if pkgs.stdenv.isLinux then self.hinotify else self.fsnotify;
};
# CUDA needs help finding the SDK headers and libraries.
cuda = overrideCabal super.cuda (drv: {
extraLibraries = (drv.extraLibraries or []) ++ [pkgs.linuxPackages.nvidia_x11];
configureFlags = (drv.configureFlags or []) ++
pkgs.lib.optional pkgs.stdenv.is64bit "--extra-lib-dirs=${pkgs.cudatoolkit}/lib64" ++ [
"--extra-lib-dirs=${pkgs.cudatoolkit}/lib"
"--extra-include-dirs=${pkgs.cudatoolkit}/usr_include"
];
preConfigure = ''
unset CC # unconfuse the haskell-cuda configure script
sed -i -e 's|/usr/local/cuda|${pkgs.cudatoolkit}|g' configure
'';
});
# Depends on code distributed under a non-free license.
bindings-yices = dontDistribute super.bindings-yices;
yices = dontDistribute super.yices;
@@ -206,6 +220,7 @@ self: super: {
# These packages try to execute non-existent external programs.
cmaes = dontCheck super.cmaes; # http://hydra.cryp.to/build/498725/log/raw
dbmigrations = dontCheck super.dbmigrations;
filestore = dontCheck super.filestore;
graceful = dontCheck super.graceful;
hakyll = dontCheck super.hakyll;
@@ -216,6 +231,7 @@ self: super: {
postgrest = dontCheck super.postgrest;
snowball = dontCheck super.snowball;
wai-middleware-hmac = dontCheck super.wai-middleware-hmac;
wai-middleware-throttle = dontCheck super.wai-middleware-throttle;
xmlgen = dontCheck super.xmlgen;
# These packages try to access the network.
@@ -378,6 +394,9 @@ self: super: {
xcffib = dontCheck super.xcffib;
xsd = dontCheck super.xsd;
# https://bitbucket.org/wuzzeb/webdriver-utils/issue/1/hspec-webdriver-101-cant-compile-its-test
hspec-webdriver = markBroken super.hspec-webdriver;
# The build fails with the most recent version of c2hs.
ncurses = super.ncurses.override { c2hs = self.c2hs_0_20_1; };
@@ -449,9 +468,6 @@ self: super: {
# https://github.com/evanrinehart/mikmod/issues/1
mikmod = addExtraLibrary super.mikmod pkgs.libmikmod;
# https://github.com/d12frosted/CanonicalPath/issues/3
system-canonicalpath = dontCheck super.system-canonicalpath;
# https://github.com/basvandijk/threads/issues/10
threads = dontCheck super.threads;
@@ -492,46 +508,27 @@ self: super: {
# https://github.com/anton-k/temporal-csound/issues/2
temporal-csound = markBrokenVersion "0.4.1" super.temporal-csound;
# https://github.com/gregwebs/haskell-heroku/issues/9
heroku = dontCheck super.heroku;
# https://github.com/seanparsons/wiring/issues/1
wiring = markBrokenVersion super.wiring;
# https://github.com/gibiansky/IHaskell/issues/355
ihaskell-parsec = markBroken super.ihaskell-parsec;
# https://github.com/jwiegley/simple-conduit/issues/2
simple-conduit = markBroken super.simple-conduit;
# https://github.com/evanrinehart/lowgl/issues/1
lowgl = markBroken super.lowgl;
# https://github.com/srijs/hwsl2/issues/1
hwsl2 = markBroken super.hwsl2;
# https://code.google.com/p/linux-music-player/issues/detail?id=1
mp = markBroken super.mp;
# https://github.com/athanclark/lucid-foundation/issues/1
lucid-foundation = markBroken super.lucid-foundation;
digestive-foundation-lucid = markBroken super.digestive-foundation-lucid;
# Depends on broken lmdb package.
vcache = markBroken super.vcache;
# https://github.com/osa1/language-lua/issues/14
language-lua = dontCheck super.language-lua;
# https://github.com/afcowie/http-streams/issues/80
http-streams = dontCheck super.http-streams;
# https://github.com/vincenthz/hs-asn1/issues/12
asn1-encoding = dontCheck super.asn1-encoding;
# https://github.com/NixOS/nixpkgs/issues/6343
c2hs = dontCheck super.c2hs;
# wxc needs help deciding which version of GTK to use.
wxc = overrideCabal (super.wxc.override { wxGTK = pkgs.wxGTK29; }) (drv: {
patches = [ ./wxc-no-ldconfig.patch ];
@@ -540,8 +537,13 @@ self: super: {
});
wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK29; };
# Depends on obsolete QuickCheck 1.x.
test-framework-quickcheck = markBroken super.test-framework-quickcheck;
# Depends on QuickCheck 1.x.
ersatz = dontCheck (super.ersatz.override { QuickCheck = self.QuickCheck_1_2_0_1; }); # https://github.com/ekmett/ersatz/issues/8
HaVSA = super.HaVSA.override { QuickCheck = self.QuickCheck_1_2_0_1; };
test-framework-quickcheck = super.test-framework-quickcheck.override { QuickCheck = self.QuickCheck_1_2_0_1; };
# Doesn't support "this system". Linux? Needs investigation.
lhc = markBroken (super.lhc.override { QuickCheck = self.QuickCheck_1_2_0_1; });
# Depends on broken test-framework-quickcheck.
apiary = dontCheck super.apiary;
@@ -557,13 +559,35 @@ self: super: {
apiary-session = dontCheck super.apiary-session;
apiary-websockets = dontCheck super.apiary-websockets;
# https://github.com/fumieval/elevator/issues/2
elevator = markBroken super.elevator;
minioperational = markBroken super.minioperational;
# https://github.com/mikeizbicki/hmm/issues/12
hmm = markBroken super.hmm;
# https://github.com/alephcloud/hs-configuration-tools/issues/40
configuration-tools = dontCheck super.configuration-tools;
# https://github.com/fumieval/karakuri/issues/1
karakuri = markBroken super.karakuri;
# Upstream notified by e-mail.
snowglobe = markBroken super.snowglobe;
gearbox = markBroken super.gearbox;
# https://github.com/deech/fltkhs/issues/7
fltkhs = markBroken super.fltkhs;
# Build fails, but there seems to be no issue tracker available. :-(
hmidi = markBrokenVersion "0.2.1.0" super.hmidi;
padKONTROL = markBroken super.padKONTROL;
# https://github.com/lambdabot/lambdabot/issues/105
lambdabot-core = markBroken super.lambdabot-core;
lambdabot-haskell-plugins = markBroken super.lambdabot-haskell-plugins;
lambdabot-irc-plugins = markBroken super.lambdabot-irc-plugins;
lambdabot-misc-plugins = markBroken super.lambdabot-misc-plugins;
lambdabot-novelty-plugins = markBroken super.lambdabot-novelty-plugins;
lambdabot-reference-plugins = markBroken super.lambdabot-reference-plugins;
lambdabot-social-plugins = markBroken super.lambdabot-social-plugins;
} // {
# Not on Hackage.

View File

@@ -38,7 +38,7 @@ self: super: {
unix = null;
# binary is not a core library for this compiler.
binary = self.binary_0_7_3_0;
binary = self.binary_0_7_4_0;
# deepseq is not a core library for this compiler.
deepseq_1_3_0_1 = dontJailbreak super.deepseq_1_3_0_1;

View File

@@ -32,7 +32,7 @@ self: super: {
unix = null;
# binary is not a core library for this compiler.
binary = self.binary_0_7_3_0;
binary = self.binary_0_7_4_0;
# deepseq is not a core library for this compiler.
deepseq = self.deepseq_1_4_0_0;

View File

@@ -39,6 +39,7 @@ self: super: {
# haddock: No input file(s).
nats = dontHaddock super.nats;
bytestring-builder = dontHaddock super.bytestring-builder;
# These used to be core packages in GHC 7.8.x.
old-locale = self.old-locale_1_0_0_7;
@@ -58,6 +59,7 @@ self: super: {
utf8-string = overrideCabal super.utf8-string (drv: {
patchPhase = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
});
esqueleto = doJailbreak super.esqueleto;
# bos/attoparsec#92
attoparsec = dontCheck super.attoparsec;
@@ -84,4 +86,46 @@ self: super: {
barecheck = doJailbreak super.barecheck;
cartel = overrideCabal super.cartel (drv: { doCheck = false; patchPhase = "sed -i -e 's|base >= .*|base|' cartel.cabal"; });
# https://github.com/kazu-yamamoto/unix-time/issues/30
unix-time = dontCheck super.unix-time;
# https://github.com/peti/jailbreak-cabal/issues/5
ReadArgs = dontCheck super.ReadArgs;
# Until the changes have been pushed to Hackage
haskell-src-meta = appendPatch super.haskell-src-meta (pkgs.fetchpatch {
url = "https://github.com/bmillwood/haskell-src-meta/pull/31.patch";
sha256 = "0ij5zi2sszqns46mhfb87fzrgn5lkdv8yf9iax7cbrxb4a2j4y1w";
});
foldl = appendPatch super.foldl (pkgs.fetchpatch {
url = "https://github.com/Gabriel439/Haskell-Foldl-Library/pull/30.patch";
sha256 = "15lfh54vhdp36197dp4xpb2mr3g49gz2xzl31cjir1fmcvjsbgjl";
});
persistent-template = appendPatch super.persistent-template (pkgs.fetchpatch {
url = "https://github.com/yesodweb/persistent/commit/4d34960bc421ec0aa353d69fbb3eb0c73585db97.patch";
sha256 = "1gphl0v87y2fjwkwp6j0bnksd0d9dr4pis6aw97rij477bm5mrvw";
stripLen = 1;
});
stringsearch = appendPatch super.stringsearch (pkgs.fetchpatch {
url = "https://bitbucket.org/api/2.0/repositories/dafis/stringsearch/pullrequests/3/patch";
sha256 = "13n7wipaa1j2rghg2j68yjnda8a5galpv5sfz4j4d9509xakz25g";
});
mono-traversable = appendPatch super.mono-traversable (pkgs.fetchpatch {
url = "https://github.com/snoyberg/mono-traversable/pull/68.patch";
sha256 = "11hqf6hi3sc34wl0fn4rpigdf7wfklcjv6jwp8c3129yphg8687h";
});
conduit-combinators = appendPatch super.conduit-combinators (pkgs.fetchpatch {
url = "https://github.com/fpco/conduit-combinators/pull/16.patch";
sha256 = "0jpwpi3shdn5rms3lcr4srajbhhfp5dbwy7pl23c9kmlil3d9mk3";
});
wai-extra = appendPatch super.wai-extra (pkgs.fetchpatch {
url = "https://github.com/yesodweb/wai/pull/339.patch";
sha256 = "1rmz1ijfch143v7jg4d5r50lqq9r46zhcmdafq8p9g9pjxlyc590";
stripLen = 1;
});
yesod-auth = appendPatch super.yesod-auth (pkgs.fetchpatch {
url = "https://github.com/yesodweb/yesod/pull/941.patch";
sha256 = "1fycvjfr1l9wa03k30bnppl3ns99lffh9kmp9r7sr8b6yiydcajq";
stripLen = 1;
});
}

View File

@@ -40,7 +40,7 @@ self: super: {
transformers-compat = disableCabalFlag super.transformers-compat "three";
# https://github.com/haskell/cabal/issues/2322
Cabal_1_22_0_0 = super.Cabal_1_22_0_0.override { binary = self.binary_0_7_3_0; process = self.process_1_2_2_0; };
Cabal_1_22_1_1 = super.Cabal_1_22_1_1.override { binary = self.binary_0_7_4_0; process = self.process_1_2_2_0; };
# https://github.com/tibbe/hashable/issues/85
hashable = dontCheck super.hashable;

View File

@@ -37,7 +37,7 @@ self: super: {
transformers-compat = disableCabalFlag super.transformers-compat "three";
# https://github.com/haskell/cabal/issues/2322
Cabal_1_22_0_0 = super.Cabal_1_22_0_0.override { binary = self.binary_0_7_3_0; };
Cabal_1_22_1_1 = super.Cabal_1_22_1_1.override { binary = self.binary_0_7_4_0; };
# https://github.com/tibbe/hashable/issues/85
hashable = dontCheck super.hashable;

View File

@@ -40,7 +40,7 @@ self: super: {
terminfo = self.terminfo_0_4_0_0;
# https://github.com/haskell/cabal/issues/2322
Cabal_1_22_0_0 = super.Cabal_1_22_0_0.override { binary = self.binary_0_7_3_0; };
Cabal_1_22_1_1 = super.Cabal_1_22_1_1.override { binary = self.binary_0_7_4_0; };
# https://github.com/tibbe/hashable/issues/85
hashable = dontCheck super.hashable;
@@ -87,7 +87,7 @@ self: super: {
presburger pretty process QuickCheck random smtLib syb text
tf-random transformers utf8-string
];
buildTools = with self; [ alex happy Cabal_1_22_0_0 ];
buildTools = with self; [ alex happy Cabal_1_22_1_1 ];
patchPhase = "sed -i -e 's|process .*,|process,|' cryptol.cabal";
description = "Cryptol: The Language of Cryptography";
license = pkgs.stdenv.lib.licenses.bsd3;

View File

@@ -82,15 +82,23 @@ self: super: {
clac = dontDistribute super.clac;
# https://github.com/junjihashimoto/test-sandbox-compose/issues/1
hspec-test-sandbox = markBroken super.hspec-test-sandbox;
test-framework-sandbox = markBroken super.test-sandbox-quickcheck;
test-sandbox = markBroken super.test-sandbox;
test-sandbox-compose = markBroken super.test-sandbox-compose;
test-sandbox-hunit = markBroken super.test-sandbox-hunit;
test-sandbox-quickcheck = markBroken super.test-sandbox-quickcheck;
# https://github.com/alephcloud/hs-configuration-tools/issues/38
configuration-tools = markBroken super.configuration-tools;
# These packages need mtl 2.2.x directly or indirectly via dependencies.
apiary-purescript = markBroken super.apiary-purescript;
highlighter2 = markBroken super.highlighter2;
hypher = markBroken super.hypher;
purescript = markBroken super.purescript;
yesod-purescript = markBroken super.yesod-purescript;
yet-another-logger = markBroken super.yet-another-logger;
# Needs mtl 2.2.x.
hypher = markBroken super.hypher;
# https://github.com/frosch03/arrowVHDL/issues/2
ArrowVHDL = markBroken super.ArrowVHDL;
}

View File

@@ -228,7 +228,7 @@ stdenv.mkDerivation ({
mv $packageConfFile $packageConfDir/$pkgId.conf
''}
${optionalString (enableSharedExecutables && isExecutable && stdenv.isDarwin) ''
${optionalString (enableSharedExecutables && isExecutable && stdenv.isDarwin && stdenv.lib.versionOlder ghc.version "7.10") ''
for exe in "$out/bin/"* ; do
install_name_tool -add_rpath "$out/lib/ghc-${ghc.version}/${pname}-${version}" "$exe"
done
@@ -241,6 +241,8 @@ stdenv.mkDerivation ({
inherit pname version;
isHaskellLibrary = hasActiveLibrary;
env = stdenv.mkDerivation {
name = "interactive-${optionalString hasActiveLibrary "haskell-"}${pname}-${version}-environment";
nativeBuildInputs = [ ghcEnv systemBuildInputs ];

File diff suppressed because it is too large Load Diff

View File

@@ -30,8 +30,8 @@ let
libDir = "$out/lib/ghc-${ghc.version}";
docDir = "$out/share/doc/ghc/html";
packageCfgDir = "${libDir}/package.conf.d";
isHaskellPkg = x: (x ? pname) && (x ? version) && (x ? env);
paths = stdenv.lib.filter isHaskellPkg (stdenv.lib.closePropagation packages);
paths = stdenv.lib.filter (x: x ? isHaskellLibrary) (stdenv.lib.closePropagation packages);
hasLibraries = stdenv.lib.any (x: x.isHaskellLibrary) paths;
in
if paths == [] then ghc else
buildEnv {
@@ -73,7 +73,7 @@ buildEnv {
makeWrapper ${ghc}/bin/$prg $out/bin/$prg --add-flags "${packageDBFlag}=${packageCfgDir}"
done
$out/bin/ghc-pkg recache
${stdenv.lib.optionalString hasLibraries "$out/bin/ghc-pkg recache"}
$out/bin/ghc-pkg check
'';
} // {

View File

@@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
name = "groovy-${version}";
version = "2.4.0";
version = "2.4.1";
src = fetchurl {
url = "http://dl.bintray.com/groovy/maven/groovy-binary-${version}.zip";
sha256 = "1wb0rb89mvy1x64a8z9z3jmphw72vnkxaqbc0f2v35c2wv61p839";
sha256 = "1bhsv804iik497gflgp0wfhj6j4ylrladp1xndcszlfg576r1zch";
};
installPhase = ''
@@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
meta = with stdenv.lib; {
description = "An agile dynamic language for the Java Platform";
homepage = http://groovy.codehaus.org/;
homepage = http://groovy-lang.org/;
license = licenses.asl20;
maintainers = with maintainers; [ pSub ];
};

View File

@@ -31,9 +31,7 @@ stdenv.mkDerivation rec {
# there is a mysterious sh: command not found
doCheck = false;
/* The build failed with a missing libranlib.la in hydra,
but worked on my computer. I think they have concurrency problems */
enableParallelBuilding = false;
enableParallelBuilding = true;
configureFlags = [ "--enable-readline" "--enable-dl" ];

View File

@@ -21,7 +21,7 @@ with stdenv.lib;
let
majorVersion = "3.4";
pythonVersion = majorVersion;
version = "${majorVersion}.2";
version = "${majorVersion}.3";
fullVersion = "${version}";
buildInputs = filter (p: p != null) [
@@ -35,7 +35,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "http://www.python.org/ftp/python/${version}/Python-${fullVersion}.tar.xz";
sha256 = "1vrd9gqdqw7rw0kiiprqvng7ywnfc2hbyys7gr9mdh25s619cv8w";
sha256 = "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm";
};
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lgcc_s";

View File

@@ -5,12 +5,12 @@
}:
stdenv.mkDerivation rec {
version = "2.5.3";
version = "2.5.4";
name = "ffmpeg-${version}";
src = fetchurl {
url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
sha256 = "06j1cgw9h9ya5z8gpcf9v9zik3l4xz7sr4wshj06kznzz5z3sf4x";
sha256 = "11m2hbhdgphjxjp6hk438cxmipqjg5ixbr1kqnn9mbdhq9kc34fc";
};
subtitleSupport = config.ffmpeg.subtitle or true;

View File

@@ -1,13 +1,13 @@
{ stdenv, fetchurl, composableDerivation, unzip, libjpeg, libtiff, zlib
, postgresql, mysql, libgeotiff, python, pythonPackages, proj}:
, postgresql, mysql, libgeotiff, python, pythonPackages, proj, geos}:
composableDerivation.composableDerivation {} (fixed: rec {
version = "1.11.1";
version = "1.11.2";
name = "gdal-${version}";
src = fetchurl {
url = "http://download.osgeo.org/gdal/${version}/${name}.tar.gz";
sha256 = "0h1kib2pzv4nbppdnxv6vhngvk9ic531y8rzcwb8bg6am125jszl";
sha256 = "66bc8192d24e314a66ed69285186d46e6999beb44fc97eeb9c76d82a117c0845";
};
buildInputs = [ unzip libjpeg libtiff python pythonPackages.numpy proj ];
@@ -26,6 +26,7 @@ composableDerivation.composableDerivation {} (fixed: rec {
"--with-geotiff=${libgeotiff}"
"--with-python" # optional
"--with-static-proj4=${proj}" # optional
"--with-geos=${geos}/bin/geos-config"# optional
];
meta = {

View File

@@ -28,7 +28,7 @@ let
result = {
libav_0_8 = libavFun "0.8.16" "df88b8f7d04d47edea8b19d80814227f0c058e57";
libav_9 = libavFun "9.17" "5899d51947b62f6b0cf9795ec2330d5ed59a3273";
libav_11 = libavFun "11" "21f3c7c2154c0ad703872f2faa65ef20d6b7a14f";
libav_11 = libavFun "11.2" "52ba52cabe5d86b45ce62f56e11fa7912c6e5083";
};
libavFun = version : sha1 : stdenv.mkDerivation rec {

View File

@@ -0,0 +1,25 @@
diff --git a/configure.ac b/configure.ac
index 3609d88..48c6bc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -227,6 +227,7 @@ if [[ $use_bdjava = "yes" ]]; then
AC_DEFINE([USING_BDJAVA], [1], ["Define to 1 if using BD-Java"])
AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$java_arch"], ["Defines the architecture of the java vm."])
AC_DEFINE_UNQUOTED([JDK_HOME], ["$JDK_HOME"], [""])
+ CPPFLAGS="${CPPFLAGS} -DJARDIR='\"\$(datadir)/java\"'"
fi
AM_CONDITIONAL([USING_BDJAVA], [ test $use_bdjava = "yes" ])
diff --git a/src/libbluray/bdj/bdj.c b/src/libbluray/bdj/bdj.c
index c622801..f4aab9b 100644
--- a/src/libbluray/bdj/bdj.c
+++ b/src/libbluray/bdj/bdj.c
@@ -210,7 +210,7 @@ static const char *_find_libbluray_jar(void)
#ifdef _WIN32
"" BDJ_JARFILE,
#else
- "/usr/share/java/" BDJ_JARFILE,
+ JARDIR "/" BDJ_JARFILE,
#endif
};

View File

@@ -2,9 +2,11 @@
, withAACS ? false, libaacs ? null, jdk ? null, ant ? null
, withMetadata ? true, libxml2 ? null
, withFonts ? true, freetype ? null
# Need to run autoreconf hook after BDJ jarfile patch
, autoreconfHook ? null
}:
assert withAACS -> jdk != null && ant != null && libaacs != null;
assert withAACS -> jdk != null && ant != null && libaacs != null && autoreconfHook != null;
assert withMetadata -> libxml2 != null;
assert withFonts -> freetype != null;
@@ -28,17 +30,27 @@ stdenv.mkDerivation rec {
buildInputs = with stdenv.lib;
[fontconfig]
++ optionals withAACS [jdk libaacs]
++ optionals withAACS [ jdk autoreconfHook ]
++ optional withMetadata libxml2
++ optional withFonts freetype
;
propagatedBuildInputs = stdenv.lib.optional withAACS libaacs;
preConfigure = stdenv.lib.optionalString withAACS ''
export JDK_HOME=${jdk.home}
export LIBS="$LIBS -L${libaacs} -laacs"
'';
configureFlags = with stdenv.lib;
optionals withAACS ["--enable-bdjava" "--with-jdk=${jdk}"]
optional withAACS "--enable-bdjava"
++ optional (! withMetadata) "--without-libxml2"
++ optional (! withFonts) "--without-freetype"
;
# Fix search path for BDJ jarfile
patches = stdenv.lib.optional withAACS ./BDJ-JARFILE-path.patch;
meta = with stdenv.lib; {
homepage = http://www.videolan.org/developers/libbluray.html;
description = "Library to access Blu-Ray disks for video playback";

View File

@@ -1,40 +1,18 @@
{ stdenv, fetchurl, zlib, libpng, patchutils }:
{ stdenv, fetchzip, cmake, zlib, libpng }:
stdenv.mkDerivation {
name = "libharu-2.2.1";
name = "libharu-2.3.0";
src = fetchurl {
url = http://libharu.org/files/libharu-2.2.1.tar.bz2;
sha256 = "04493rjb4z8f04p3kjvnya8phg4b0vzy3mbdbp8jfy0dhvqg4h4j";
src = fetchzip {
url = https://github.com/libharu/libharu/archive/RELEASE_2_3_0.tar.gz;
sha256 = "15s9hswnl3qqi7yh29jyrg0hma2n99haxznvcywmsp8kjqlyg75q";
};
configureFlags = "--with-zlib=${zlib} --with-png=${libpng}";
buildInputs = [ zlib libpng ];
patches =
[ (stdenv.mkDerivation {
name = "linpng15.patch";
src = fetchurl {
url = https://github.com/libharu/libharu/commit/e5bf8b01f6c3d5e3fe0e26ac5345e0da10c03934.diff;
sha256 = "07k2x5d4pvpf8a5hvfb9pj0dpjgcvv8sdvxwx3wzbwqsf9swwrxb";
};
nativeBuildInputs = [ patchutils ];
buildCommand = "filterdiff -x '*/CHANGES' $src > $out";
})
(fetchurl {
url = https://github.com/libharu/libharu/commit/b472b64ab44d834eb29d237f31bf12396fee9aca.diff;
name = "endless-loop.patch";
sha256 = "1jrajz6zdch2pyzjkhmhm1b6ms8dk62snps7fwphnpvndrm4h4rr";
})
];
buildInputs = [ zlib libpng cmake ];
meta = {
description = "Cross platform, open source library for generating PDF files";
homepage = http://libharu.org/wiki/Main_Page;
homepage = http://libharu.org/;
license = stdenv.lib.licenses.zlib;
maintainers = [ stdenv.lib.maintainers.marcweber ];
platforms = stdenv.lib.platforms.linux;

View File

@@ -1,20 +1,45 @@
{ stdenv, fetchurl, pkgconfig, mtdev, udev, libevdev }:
{ stdenv, fetchurl, pkgconfig
, libevdev, mtdev, udev
, documentationSupport ? true, doxygen ? null, graphviz ? null # Documentation
, eventGUISupport ? false, cairo ? null, glib ? null, gtk3 ? null # GUI event viewer support
, testsSupport ? false, check ? null, valgrind ? null
}:
assert documentationSupport -> doxygen != null && graphviz != null;
assert eventGUISupport -> cairo != null && glib != null && gtk3 != null;
assert testsSupport -> check != null && valgrind != null;
let
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "libinput-0.10.0";
name = "libinput-0.11.0";
src = fetchurl {
url = "http://www.freedesktop.org/software/libinput/${name}.tar.xz";
sha256 = "0h8lbhhxb5020bhdblxp1pkapy4bchjj3l44fxabz9pi1zw03q2c";
sha256 = "0hq7plvf9gpscy69pngffrfzqdrcwvpqr0a8fh45xslm5xwxcz4j";
};
buildInputs = [ pkgconfig mtdev udev libevdev ];
configureFlags = [
(mkFlag documentationSupport "documentation")
(mkFlag eventGUISupport "event-gui")
(mkFlag testsSupport "tests")
];
meta = with stdenv.lib; {
homepage = http://www.freedesktop.org/wiki/Software/libinput;
description = "handles input devices in Wayland compositors and to provide a generic X.Org input driver";
platforms = platforms.unix;
license = licenses.mit;
maintainers = with maintainers; [ wkennington ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libevdev mtdev udev ]
++ optionals eventGUISupport [ cairo glib gtk3 ]
++ optionals documentationSupport [ doxygen graphviz ]
++ optionals testsSupport [ check valgrind ];
meta = {
description = "Handles input devices in Wayland compositors and provides a generic X.Org input driver";
homepage = http://www.freedesktop.org/wiki/Software/libinput;
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ codyopel wkennington ];
};
}

View File

@@ -0,0 +1,27 @@
{ stdenv, lib, fetchFromGitHub, autoconf, automake, libtool }:
stdenv.mkDerivation rec {
name = "libsass-${version}";
version = "3.1.0";
src = fetchFromGitHub {
owner = "sass";
repo = "libsass";
rev = version;
sha256 = "1k9a6hiybqk7xx4k2cb9vhdqskrrzhi60dvwp3gx39jhjqjfl96p";
};
preConfigure = ''
autoreconf --force --install
'';
buildInputs = [ autoconf automake libtool ];
meta = with lib; {
description = "A C/C++ implementation of a Sass compiler";
license = licenses.mit;
homepage = https://github.com/sass/libsass;
maintainers = with maintainers; [ offline ];
platforms = with platforms; unix;
};
}

View File

@@ -105,4 +105,5 @@ in
//
mapAttrs (v: h: mkWithAutotools stable (toVersion v) h) {
v1_2_0 = "1nbp8qpgw64gl9nrjzxw0ndv1m64cfms0cy5a2883vw6877kizmx";
v1_4_0 = "17k028gn07vb9in440wbf0ar0rdl8bi5v4shm8nhj22vfb18dhl5";
}

View File

@@ -3,11 +3,11 @@
}:
stdenv.mkDerivation rec {
name = "libvirt-glib-0.1.9";
name = "libvirt-glib-0.2.0";
src = fetchurl {
url = "http://libvirt.org/sources/glib/${name}.tar.gz";
sha256 = "0n59hp0kwn80z9136g2n7pwkrlhlsxksr6gy4w7783d71qk3cfq5";
sha256 = "02saqkk4wzsimsan7s9yc5bx05xn7j00hnxhq4sczkgr4krf1drh";
};
buildInputs = [

View File

@@ -1,11 +1,11 @@
{ stdenv, fetchurl, pkgconfig, libxml2, gnutls, devicemapper, perl, python
, iproute, iptables, readline, lvm2, utillinux, udev, libpciaccess, gettext
, libtasn1, ebtables, libgcrypt, yajl, makeWrapper, pmutils, libcap_ng
, dnsmasq, libnl, libpcap
, pythonPackages
, dnsmasq, libnl, libpcap, libxslt, xhtml1
, pythonPackages, perlPackages
}:
let version = "1.2.9"; in
let version = "1.2.12"; in
assert version == pythonPackages.libvirt.version;
@@ -14,13 +14,13 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "http://libvirt.org/sources/${name}.tar.gz";
sha256 = "1i4ggs50dipz1hm0qlk6kak1n3klll8sx9fnffmvjlgla9d1m4wm";
sha256 = "0sp6xm6iyg5wfjgxiba4rpl527429r22lh241dzxjq25fxzj5xgg";
};
buildInputs = [
pkgconfig libxml2 gnutls devicemapper perl python readline lvm2
utillinux udev libpciaccess gettext libtasn1 libgcrypt yajl makeWrapper
libcap_ng libnl
libcap_ng libnl libxslt xhtml1 perlPackages.XMLXPath
];
preConfigure = ''

View File

@@ -11,11 +11,11 @@ let
in stdenv.mkDerivation rec {
name = "nss-${version}";
version = "3.17.3";
version = "3.17.4";
src = fetchurl {
url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_3_RTM/src/${name}.tar.gz";
sha256 = "f4d5e9035a2f84f25f35c283de3b0ff60d72e918748de25eaf017ed201fa21d5";
url = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_17_4_RTM/src/${name}.tar.gz";
sha256 = "1d98ad1881a4237ec98cbe472fc851480f0b0e954dfe224d047811fb96ff9d79";
};
buildInputs = [ nspr perl zlib sqlite ];

View File

@@ -0,0 +1,10 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "${branch}.2";
branch = "1.5";
src = fetchurl {
url = "mirror://gentoo/distfiles/openjpeg-${version}.tar.gz";
sha256 = "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm";
};
})

View File

@@ -0,0 +1,10 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "${branch}.0.1";
branch = "2";
src = fetchurl {
url = "mirror://sourceforge/openjpeg.mirror/openjpeg-${version}.tar.gz";
sha256 = "1c2xc3nl2mg511b63rk7hrckmy14681p1m44mzw3n1fyqnjm0b0z";
};
})

View File

@@ -0,0 +1,10 @@
{ callPackage, fetchurl, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "${branch}.0";
branch = "2.1";
src = fetchurl {
url = "mirror://gentoo/distfiles/openjpeg-${version}.tar.gz";
sha256 = "00zzm303zvv4ijzancrsb1cqbph3pgz0nky92k9qx3fq9y0vnchj";
};
})

View File

@@ -1,40 +0,0 @@
{ stdenv, fetchurl, pkgconfig, libpng, libtiff, lcms, cmake, glib/*passthru only*/ }:
stdenv.mkDerivation rec {
name = "openjpeg-2.0.0";
passthru = {
incDir = "openjpeg-2.0";
};
src = fetchurl {
url = "http://openjpeg.googlecode.com/files/${name}.tar.gz";
sha1 = "0af78ab2283b43421458f80373422d8029a9f7a7";
};
buildInputs = [ cmake ];
nativebuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ libpng libtiff lcms ]; # in closure anyway
postInstall = glib.flattenInclude + ''
mkdir -p "$out/lib/pkgconfig"
cat >"$out/lib/pkgconfig/libopenjp2.pc" <<EOF
prefix=$out
libdir=$out/lib
includedir=$out/include
Name: openjp2
Description: JPEG2000 library (Part 1 and 2)
URL: http://www.openjpeg.org/
Version: @OPENJPEG_VERSION@
Libs: -L$out/lib -lopenjp2
Cflags: -I$out/include
EOF
'';
meta = {
homepage = http://www.openjpeg.org/;
description = "Open-source JPEG 2000 codec written in C language";
license = stdenv.lib.licenses.bsd2;
platforms = stdenv.lib.platforms.all;
};
}

View File

@@ -0,0 +1,83 @@
{ stdenv, cmake, pkgconfig, libpng, libtiff, lcms2, glib/*passthru only*/
, sharedLibsSupport ? true # Build shared libraries
, codecSupport ? true # Codec executables
, mj2Support ? true # MJ2 executables
, jpwlLibSupport ? true # JPWL library & executables
, jpipLibSupport ? true # JPIP library & executables
, jpipServerSupport ? false, curl ? null, fcgi ? null # JPIP Server
#, opjViewerSupport ? false, wxGTK ? null # OPJViewer executable
, openjpegJarSupport ? false, jdk ? null # Openjpeg jar (Java)
, jp3dSupport ? true # # JP3D comp
, thirdPartySupport ? false # Third party libraries - OFF: only build when found, ON: always build
, testsSupport ? false
# Inherit generics
, branch, src, version, ...
}:
assert jpipServerSupport -> (jpipLibSupport && (curl != null) && (fcgi != null));
#assert opjViewerSupport -> (wxGTK != null);
assert openjpegJarSupport -> (jdk != null);
assert testsSupport -> codecSupport;
let
mkFlag = optSet: flag: if optSet then "-D${flag}=ON" else "-D${flag}=OFF";
in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "openjpeg-${version}";
inherit branch;
inherit version;
inherit src;
cmakeFlags = [
(mkFlag sharedLibsSupport "BUILD_SHARED_LIBS")
(mkFlag codecSupport "BUILD_CODEC")
(mkFlag mj2Support "BUILD_MJ2")
(mkFlag jpwlLibSupport "BUILD_JPWL")
(mkFlag jpipLibSupport "BUILD_JPIP")
(mkFlag jpipServerSupport "BUILD_JPIP_SERVER")
#(mkFlag opjViewerSupport "BUILD_VIEWER")
(mkFlag openjpegJarSupport "BUILD_JAVA")
(mkFlag jp3dSupport "BUILD_JP3D")
(mkFlag thirdPartySupport "BUILD_THIRDPARTY")
(mkFlag testsSupport "BUILD_TESTING")
];
nativebuildInputs = [ pkgconfig ];
buildInputs = [ cmake ]
++ optionals jpipServerSupport [ curl fcgi ]
#++ optional opjViewerSupport wxGTK
++ optional openjpegJarSupport jdk;
propagatedBuildInputs = [ libpng libtiff lcms2 ];
postInstall = glib.flattenInclude + ''
mkdir -p "$out/lib/pkgconfig"
cat > "$out/lib/pkgconfig/libopenjp2.pc" <<EOF
prefix=$out
libdir=$out/lib
includedir=$out/include
Name: openjp2
Description: JPEG2000 library (Part 1 and 2)
URL: http://www.openjpeg.org/
Version: @OPENJPEG_VERSION@
Libs: -L$out/lib -lopenjp2
Cflags: -I$out/include
EOF
'';
passthru = {
incDir = "openjpeg-${branch}";
};
meta = {
description = "Open-source JPEG 2000 codec written in C language";
homepage = http://www.openjpeg.org/;
license = licenses.bsd2;
maintainer = with maintainers; [ codyopel ];
platforms = platforms.all;
};
}

View File

@@ -3,11 +3,11 @@
assert interactive -> readline != null && ncurses != null;
stdenv.mkDerivation {
name = "sqlite-3.8.7.1";
name = "sqlite-3.8.7.4";
src = fetchurl {
url = "http://www.sqlite.org/2014/sqlite-autoconf-3080701.tar.gz";
sha1 = "5601be1263842209d7c5dbf6128f1cc0b6bbe2e5";
url = "http://www.sqlite.org/2014/sqlite-autoconf-3080704.tar.gz";
sha1 = "70ca0b8884a6b145b7f777724670566e2b4f3cde";
};
buildInputs = lib.optionals interactive [ readline ncurses ];

View File

@@ -0,0 +1,27 @@
{ stdenv, fetchzip, ocaml, findlib, sexplib, ocplib-endian, lwt, camlp4 }:
let version = "1.6.0"; in
stdenv.mkDerivation {
name = "ocaml-cstruct-${version}";
src = fetchzip {
url = "https://github.com/mirage/ocaml-cstruct/archive/v${version}.tar.gz";
sha256 = "09qw3rhfiq2kkns6660p9cwm5610k72md52a04cy91gr6gsig6ic";
};
buildInputs = [ ocaml findlib lwt camlp4 ];
propagatedBuildInputs = [ ocplib-endian sexplib ];
configureFlags = "--enable-lwt";
createFindlibDestdir = true;
meta = {
description = "Map OCaml arrays onto C-like structs";
homepage = https://github.com/mirage/ocaml-cstruct;
license = stdenv.lib.licenses.isc;
maintainers = with stdenv.lib.maintainers; [ vbgl ];
platforms = ocaml.meta.platforms;
};
}

View File

@@ -51,7 +51,7 @@
# Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
python.stdenv.mkDerivation (attrs // {
if disabled then throw "${name} not supported for interpreter ${python.executable}" else python.stdenv.mkDerivation (attrs // {
inherit doCheck;
name = namePrefix + name;
@@ -167,7 +167,6 @@ python.stdenv.mkDerivation (attrs // {
meta = with lib.maintainers; {
# default to python's platforms
platforms = python.meta.platforms;
broken = disabled;
} // meta // {
# add extra maintainer(s) to every package
maintainers = (meta.maintainers or []) ++ [ chaoflow iElectric ];

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, python }:
{ stdenv, fetchurl, perl }:
stdenv.mkDerivation rec {
version = "6.0.1";
@@ -9,13 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "1d041j0nd1hc0562lbj269dydjm4rbzagdgzdnmwdxr98544yw44";
};
# Python is required only by `make check`
buildInputs = [ perl python ];
buildInputs = [ perl ];
enableParallelBuilding = true;
doCheck = true;
postInstall = ''
mv -v $out/share/man/man1/coan.1.{1,gz}
'';

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, nightly ? false }:
{ stdenv, fetchurl, python, utillinux, openssl, http-parser, zlib, libuv, nightly ? false }:
let
version = if nightly then "1.2.1-nightly20150213f0296933f8" else "1.2.0";
version = if nightly then "1.2.1-nightly201502201bf91878e7" else "1.3.0";
inherit (stdenv.lib) optional maintainers licenses platforms;
in stdenv.mkDerivation {
name = "iojs-${version}";
@@ -11,19 +11,21 @@ in stdenv.mkDerivation {
then "https://iojs.org/download/nightly/v${version}/iojs-v${version}.tar.gz"
else "https://iojs.org/dist/v${version}/iojs-v${version}.tar.gz";
sha256 = if nightly
then "0v9njaggddi128v58rd34qknph8pn9c653gqd4y29l1mwjvqg62s"
else "17axqswpl252gliak1wjc2l9jk6n5jqdfa9f1vv7x9acj776yrik";
then "1bk0jiha7n3s9xawj77d4q1navq28pq061w2wa6cs70lik7n6ri4"
else "08g0kmz2978jrfx4551fi12ypcsv9p6vic89lfs08ki7ajw2yrgb";
};
prePatch = ''
sed -e 's|^#!/usr/bin/env python$|#!${python}/bin/python|g' -i configure
'';
configureFlags = [ "--shared-openssl" "--shared-http-parser" "--shared-zlib" ];
configureFlags = [ "--shared-openssl" "--shared-http-parser" "--shared-zlib" "--shared-libuv" ];
buildInputs = [ python openssl http-parser zlib ] ++ (optional stdenv.isLinux utillinux);
buildInputs = [ python openssl http-parser zlib libuv ] ++ (optional stdenv.isLinux utillinux);
setupHook = ../nodejs/setup-hook.sh;
passthru.interpreterName = "iojs";
meta = {
description = "A friendly fork of Node.js with an open governance model";
homepage = https://iojs.org/;

View File

@@ -0,0 +1,49 @@
#!/bin/sh -e
#
# Fetch the latest io.js release (stable/nightly) and update
# `default.nix` in this directory.
#
cd "$(dirname "$0")"
latest() {
curl -s "$1" | grep 'href="v' \
| tail -1 | sed 's/.*href="v//;s/\/".*//'
}
latest_log() {
echo "Getting latest $1 version from $2" >&2
version=$(latest "$2")
echo " -> $version" >&2
echo "$version"
}
url() {
nix-instantiate -A "$1" 2> /dev/null | xargs cat \
| sed 's/.*"urls","//;s/".*//'
}
hash() {
nix-prefetch-url "$1" 2> /dev/null
}
hash_log() {
echo "Finding hash for $1" >&2
value=$(hash "$1")
echo " -> $value" >&2
echo "$value"
}
stable=$(latest_log stable 'https://iojs.org/dist/')
nightly=$(latest_log nightly 'https://iojs.org/download/nightly/')
sed -i \
"/version = if nightly/s/then.*/then \"$nightly\" else \"$stable\";/" \
default.nix
stableHash=$(hash_log "$(url iojs.src)")
nightlyHash=$(hash_log "$(url iojs-nightly.src)")
sed -i \
"/sha256 = if nightly/{N;s/\"[^\"]*\"/\"$nightlyHash\"/;N;s/\"[^\"]*\";/\"$stableHash\";/}" \
default.nix

View File

@@ -1,22 +1,33 @@
{ stdenv, runCommand, nodejs, neededNatives}:
{
name, src,
name, version ? "", src,
# by default name of nodejs interpreter e.g. "nodejs-${name}"
namePrefix ? nodejs.interpreterName + "-",
# Node package name
pkgName ? (builtins.parseDrvName name).name,
pkgName ?
if version != "" then stdenv.lib.removeSuffix "-${version}" name else
(builtins.parseDrvName name).name,
# List or attribute set of dependencies
deps ? {},
# List or attribute set of peer depencies
peerDependencies ? [],
peerDependencies ? {},
# List or attribute set of optional dependencies
optionalDependencies ? {},
# List of optional dependencies to skip
skipOptionalDependencies ? [],
# Whether package is binary or library
bin ? null,
bin ? false,
# Flags passed to npm install
flags ? [],
# Additional flags passed to npm install
flags ? "",
# Command to be run before shell hook
preShellHook ? "",
@@ -24,6 +35,12 @@
# Command to be run after shell hook
postShellHook ? "",
# Same as https://docs.npmjs.com/files/package.json#os
os ? [],
# Same as https://docs.npmjs.com/files/package.json#cpu
cpu ? [],
# Attribute set of already resolved deps (internal),
# for avoiding infinite recursion
resolvedDeps ? {},
@@ -34,42 +51,67 @@
with stdenv.lib;
let
npmFlags = concatStringsSep " " (map (v: "--${v}") flags);
sources = runCommand "node-sources" {} ''
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
mv $(find . -type d -mindepth 1 -maxdepth 1) $out
'';
# Convert deps to attribute set
attrDeps = if isAttrs deps then deps else
(listToAttrs (map (dep: nameValuePair dep.name dep) deps));
# All required node modules, without already resolved dependencies
requiredDeps = removeAttrs attrDeps (attrNames resolvedDeps);
# Recursive dependencies that we want to avoid with shim creation
recursiveDeps = removeAttrs attrDeps (attrNames requiredDeps);
peerDeps = filter (dep: dep.pkgName != pkgName) peerDependencies;
self = let
# Pass resolved dependencies to dependencies of this package
deps = map (
dep: dep.override {
resolvedDeps = resolvedDeps // { "${name}" = self; };
}
) (attrValues requiredDeps);
sources = runCommand "node-sources" {} ''
tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
mv $(find . -type d -mindepth 1 -maxdepth 1) $out
'';
platforms = fold (entry: platforms:
let
filterPlatforms = attrByPath [(removePrefix "!" entry)] [] stdenv.lib.platforms;
in
if hasPrefix "!" entry then
filter (p: any (f: p != f) filterPlatforms) platforms
else
filter (p: any (f: p == f) filterPlatforms) platforms
) nodejs.meta.platforms os;
mapDependencies = deps: f: rec {
# Convert deps to attribute set
attrDeps = if isAttrs deps then deps else
(listToAttrs (map (dep: nameValuePair dep.name dep) deps));
# All required node modules, without already resolved dependencies
# Also override with already resolved dependencies
requiredDeps = mapAttrs (name: dep:
dep.override {
resolvedDeps = resolvedDeps // { "${name}" = self; };
}
) (filterAttrs f (removeAttrs attrDeps (attrNames resolvedDeps)));
# Recursive dependencies that we want to avoid with shim creation
recursiveDeps = filterAttrs f (removeAttrs attrDeps (attrNames requiredDeps));
};
_dependencies = mapDependencies deps (name: dep:
dep.pkgName != pkgName);
_optionalDependencies = mapDependencies optionalDependencies (name: dep:
any (platform: stdenv.system == platform) dep.meta.platforms &&
all (d: d != dep.pkgName) skipOptionalDependencies
);
_peerDependencies = mapDependencies peerDependencies (name: dep:
dep.pkgName != pkgName);
requiredDependencies =
_dependencies.requiredDeps //
_optionalDependencies.requiredDeps //
_peerDependencies.requiredDeps;
recursiveDependencies =
_dependencies.recursiveDeps //
_optionalDependencies.recursiveDeps //
_peerDependencies.recursiveDeps;
patchShebangs = dir: ''
node=`type -p node`
coffee=`type -p coffee || true`
find -L ${dir} -type f -print0 | xargs -0 grep -Il . | \
xargs sed --follow-symlinks -i \
-e 's@#!/usr/bin/env node@#!'"$node"'@' \
-e 's@#!/usr/bin/env coffee@#!'"$coffee"'@' \
-e 's@#!/.*/node@#!'"$node"'@' \
-e 's@#!/.*/coffee@#!'"$coffee"'@' || true
node=`type -p node`
coffee=`type -p coffee || true`
find -L ${dir} -type f -print0 | xargs -0 grep -Il . | \
xargs sed --follow-symlinks -i \
-e 's@#!/usr/bin/env node@#!'"$node"'@' \
-e 's@#!/usr/bin/env coffee@#!'"$coffee"'@' \
-e 's@#!/.*/node@#!'"$node"'@' \
-e 's@#!/.*/coffee@#!'"$coffee"'@' || true
'';
in stdenv.mkDerivation ({
@@ -147,9 +189,9 @@ let
# We do not handle shrinkwraps yet
rm npm-shrinkwrap.json 2>/dev/null || true
mkdir build-dir
mkdir ../build-dir
(
cd build-dir
cd ../build-dir
mkdir node_modules
# Symlink or copy dependencies for node modules
@@ -161,12 +203,7 @@ let
'' else ''
cp -R ${dep}/lib/node_modules/${dep.pkgName} node_modules/
''
) deps}
# Symlink peer dependencies
${concatMapStrings (dep: ''
ln -sv ${dep}/lib/node_modules/${dep.pkgName} node_modules/
'') peerDeps}
) (attrValues requiredDependencies)}
# Create shims for recursive dependenceies
${concatMapStrings (dep: ''
@@ -177,10 +214,10 @@ let
"version": "${getVersion dep}"
}
EOF
'') (attrValues recursiveDeps)}
'') (attrValues recursiveDependencies)}
)
export HOME=$PWD/build-dir
export HOME=$PWD/../build-dir
runHook postConfigure
'';
@@ -189,14 +226,14 @@ let
# If source was a file, repackage it, so npm pre/post publish hooks are not triggered,
if [[ -f $src ]]; then
tar --exclude='build-dir' -czf build-dir/package.tgz ./
GZIP=-1 tar -czf ../build-dir/package.tgz ./
export src=$HOME/package.tgz
else
export src=$PWD
fi
# Install package
(cd $HOME && npm --registry http://www.example.com --nodedir=${sources} install $src ${npmFlags})
(cd $HOME && npm --registry http://www.example.com --nodedir=${sources} install $src --fetch-retries 0 ${flags})
runHook postBuild
'';
@@ -211,7 +248,7 @@ let
${concatMapStrings (dep: ''
rm node_modules/${dep.pkgName}/package.json
rmdir node_modules/${dep.pkgName}
'') (attrValues recursiveDeps)}
'') (attrValues recursiveDependencies)}
mkdir -p $out/lib/node_modules
@@ -230,10 +267,10 @@ let
done
fi
# Symlink dependencies
# Move peer dependencies to node_modules
${concatMapStrings (dep: ''
mv node_modules/${dep.pkgName} $out/lib/node_modules
'') peerDeps}
'') (attrValues _peerDependencies.requiredDeps)}
# Install binaries and patch shebangs
mv node_modules/.bin $out/lib/node_modules 2>/dev/null || true
@@ -256,25 +293,36 @@ let
mkdir -p node_modules
${concatMapStrings (dep: ''
ln -sfv ${dep}/lib/node_modules/${dep.pkgName} node_modules/
'') deps}
'') (attrValues requiredDependencies)}
${postShellHook}
'';
# Stipping does not make a lot of sense in node packages
dontStrip = true;
meta = {
platforms = platforms;
maintainers = [ stdenv.lib.maintainers.offline ];
};
passthru.pkgName = pkgName;
} // (filterAttrs (n: v: n != "deps" && n != "resolvedDeps") args) // {
name = "${
if bin == true then "bin-" else if bin == false then "node-" else ""
}${name}";
} // (filterAttrs (n: v: all (k: n != k) ["deps" "resolvedDeps" "optionalDependencies"]) args) // {
name = namePrefix + name;
# Run the node setup hook when this package is a build input
propagatedNativeBuildInputs = (args.propagatedNativeBuildInputs or []) ++ [ nodejs ];
# Make buildNodePackage useful with --run-env
nativeBuildInputs = (args.nativeBuildInputs or []) ++ deps ++ peerDependencies ++ neededNatives;
nativeBuildInputs =
(args.nativeBuildInputs or []) ++ neededNatives ++
(attrValues requiredDependencies);
# Expose list of recursive dependencies upstream, up to the package that
# caused recursive dependency
recursiveDeps = (flatten (map (d: remove name d.recursiveDeps) deps)) ++ (attrNames recursiveDeps);
recursiveDeps =
(flatten (
map (dep: remove name dep.recursiveDeps) (attrValues requiredDependencies)
)) ++
(attrNames recursiveDependencies);
});
in self

View File

@@ -1,5 +1,5 @@
{ stdenv, fetchurl, openssl, python, zlib, v8, utillinux, http-parser
, pkgconfig, runCommand, which, unstableVersion ? false
{ stdenv, fetchurl, openssl, python, zlib, libuv, v8, utillinux, http-parser
, pkgconfig, runCommand, which, unstableVersion ? false
}:
let
@@ -10,9 +10,8 @@ let
version = if unstableVersion then "0.11.13" else "0.12.0";
# !!! Should we also do shared libuv?
deps = {
inherit openssl zlib;
inherit openssl zlib libuv;
# disabled system v8 because v8 3.14 no longer receives security fixes
# we fall back to nodejs' internal v8 copy which receives backports for now
@@ -55,6 +54,8 @@ in stdenv.mkDerivation {
++ optionals stdenv.isDarwin [ pkgconfig openssl dtrace ];
setupHook = ./setup-hook.sh;
passthru.interpreterName = "nodejs";
meta = {
description = "Event-driven I/O framework for the V8 JavaScript engine";
homepage = http://nodejs.org;