Merge branch 'master' into staging
The haskell split got reverted (again). Hydra: ?compare=1416012
This commit is contained in:
commit
689d6303e8
39 changed files with 1133 additions and 999 deletions
|
@ -290,8 +290,8 @@ in
|
|||
ln -s /run/systemd/resolve/resolv.conf /run/resolvconf/interfaces/systemd
|
||||
''}
|
||||
|
||||
# Make sure resolv.conf is up to date if not managed by systemd
|
||||
${optionalString (!config.services.resolved.enable) ''
|
||||
# Make sure resolv.conf is up to date if not managed manually or by systemd
|
||||
${optionalString (!config.environment.etc?"resolv.conf") ''
|
||||
${pkgs.openresolv}/bin/resolvconf -u
|
||||
''}
|
||||
'';
|
||||
|
|
|
@ -9,6 +9,12 @@ let
|
|||
isBuiltinBackend = name:
|
||||
builtins.elem name [ "graphite" "console" "repeater" ];
|
||||
|
||||
backendsToPackages = let
|
||||
mkMap = list: name:
|
||||
if isBuiltinBackend name then list
|
||||
else list ++ [ pkgs.nodePackages.${name} ];
|
||||
in foldl mkMap [];
|
||||
|
||||
configFile = pkgs.writeText "statsd.conf" ''
|
||||
{
|
||||
address: "${cfg.listenAddress}",
|
||||
|
@ -27,13 +33,21 @@ let
|
|||
prettyprint: false
|
||||
},
|
||||
log: {
|
||||
backend: "syslog"
|
||||
backend: "stdout"
|
||||
},
|
||||
automaticConfigReload: false${optionalString (cfg.extraConfig != null) ","}
|
||||
${cfg.extraConfig}
|
||||
}
|
||||
'';
|
||||
|
||||
deps = pkgs.buildEnv {
|
||||
name = "statsd-runtime-deps";
|
||||
pathsToLink = [ "/lib" ];
|
||||
ignoreCollisions = true;
|
||||
|
||||
paths = backendsToPackages cfg.backends;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -42,11 +56,7 @@ in
|
|||
|
||||
options.services.statsd = {
|
||||
|
||||
enable = mkOption {
|
||||
description = "Whether to enable statsd stats aggregation service";
|
||||
default = false;
|
||||
type = types.bool;
|
||||
};
|
||||
enable = mkEnableOption "statsd";
|
||||
|
||||
listenAddress = mkOption {
|
||||
description = "Address that statsd listens on over UDP";
|
||||
|
@ -110,6 +120,11 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
assertions = map (backend: {
|
||||
assertion = !isBuiltinBackend backend -> hasAttrByPath [ backend ] pkgs.nodePackages;
|
||||
message = "Only builtin backends (graphite, console, repeater) or backends enumerated in `pkgs.nodePackages` are allowed!";
|
||||
}) cfg.backends;
|
||||
|
||||
users.extraUsers = singleton {
|
||||
name = "statsd";
|
||||
uid = config.ids.uids.statsd;
|
||||
|
@ -120,9 +135,7 @@ in
|
|||
description = "Statsd Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
environment = {
|
||||
NODE_PATH=concatMapStringsSep ":"
|
||||
(pkg: "${builtins.getAttr pkg pkgs.statsd.nodePackages}/lib/node_modules")
|
||||
(filter (name: !isBuiltinBackend name) cfg.backends);
|
||||
NODE_PATH = "${deps}/lib/node_modules";
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.statsd}/bin/statsd ${configFile}";
|
||||
|
|
|
@ -332,6 +332,7 @@ in rec {
|
|||
tests.slim = callTest tests/slim.nix {};
|
||||
tests.smokeping = callTest tests/smokeping.nix {};
|
||||
tests.snapper = callTest tests/snapper.nix {};
|
||||
tests.statsd = callTest tests/statsd.nix {};
|
||||
tests.switchTest = callTest tests/switch-test.nix {};
|
||||
tests.taskserver = callTest tests/taskserver.nix {};
|
||||
tests.tomcat = callTest tests/tomcat.nix {};
|
||||
|
|
40
nixos/tests/statsd.nix
Normal file
40
nixos/tests/statsd.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
import ./make-test.nix ({ pkgs, lib }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
name = "statsd";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ ma27 ];
|
||||
};
|
||||
|
||||
nodes.statsd1 = {
|
||||
services.statsd.enable = true;
|
||||
services.statsd.backends = [ "statsd-influxdb-backend" "console" ];
|
||||
services.statsd.extraConfig = ''
|
||||
influxdb: {
|
||||
username: "root",
|
||||
password: "root",
|
||||
database: "statsd"
|
||||
}
|
||||
'';
|
||||
|
||||
services.influxdb.enable = true;
|
||||
|
||||
systemd.services.influx-init = {
|
||||
description = "Setup Influx Test Base";
|
||||
after = [ "influxdb.service" ];
|
||||
before = [ "statsd.service" ];
|
||||
|
||||
script = ''
|
||||
echo "CREATE DATABASE statsd" | ${pkgs.influxdb}/bin/influx
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
$statsd1->start();
|
||||
$statsd1->waitForUnit("statsd.service");
|
||||
$statsd1->succeed("nc -z 127.0.0.1 8126");
|
||||
'';
|
||||
})
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, pkgconfig, intltool, file, makeWrapper
|
||||
{ stdenv, fetchurl, pkgconfig, intltool, file, wrapGAppsHook
|
||||
, openssl, curl, libevent, inotify-tools, systemd, zlib
|
||||
, enableGTK3 ? false, gtk3
|
||||
, enableSystemd ? stdenv.isLinux
|
||||
|
@ -20,9 +20,10 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0pykmhi7pdmzq47glbj8i2im6iarp4wnj4l1pyvsrnba61f0939s";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
nativeBuildInputs = [ pkgconfig ]
|
||||
++ optionals enableGTK3 [ wrapGAppsHook ];
|
||||
buildInputs = [ intltool file openssl curl libevent zlib ]
|
||||
++ optionals enableGTK3 [ gtk3 makeWrapper ]
|
||||
++ optionals enableGTK3 [ gtk3 ]
|
||||
++ optionals enableSystemd [ systemd ]
|
||||
++ optionals stdenv.isLinux [ inotify-tools ];
|
||||
|
||||
|
@ -41,10 +42,8 @@ stdenv.mkDerivation rec {
|
|||
++ optional enableSystemd "--with-systemd-daemon"
|
||||
++ optional enableGTK3 "--with-gtk";
|
||||
|
||||
preFixup = optionalString enableGTK3 /* gsettings schemas for file dialogues */ ''
|
||||
preFixup = optionalString enableGTK3 ''
|
||||
rm "$out/share/icons/hicolor/icon-theme.cache"
|
||||
wrapProgram "$out/bin/transmission-gtk" \
|
||||
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
|
||||
'';
|
||||
|
||||
NIX_LDFLAGS = optionalString stdenv.isDarwin "-framework CoreFoundation";
|
||||
|
|
|
@ -1322,6 +1322,19 @@ rec {
|
|||
archs = ["noarch" "x86_64"];
|
||||
packages = commonCentOSPackages ++ [ "procps-ng" ];
|
||||
};
|
||||
|
||||
centos74x86_64 = rec {
|
||||
name = "centos-7.4-x86_64";
|
||||
fullName = "CentOS 7.4 (x86_64)";
|
||||
# N.B. Switch to vault.centos.org when the next release comes out
|
||||
urlPrefix = http://mirror.centos.org/centos-7/7.4.1708/os/x86_64;
|
||||
packagesList = fetchurl {
|
||||
url = "${urlPrefix}/repodata/b686d3a0f337323e656d9387b9a76ce6808b26255fc3a138b1a87d3b1cb95ed5-primary.xml.gz";
|
||||
sha256 = "1mayp4f3nzd8n4wa3hsz4lk8p076djkvk1wkdmjkwcipyfhd71mn";
|
||||
};
|
||||
archs = ["noarch" "x86_64"];
|
||||
packages = commonCentOSPackages ++ [ "procps-ng" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ pkgconfig wrapGAppsHook ];
|
||||
|
||||
buildInputs = [ vala libxslt glib dbus_glib gnome3.gtk libxml2 gnome3.defaultIconTheme
|
||||
gnome3.gsettings_desktop_schemas
|
||||
intltool docbook_xsl docbook_xsl_ns gnome3.dconf ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -1,167 +0,0 @@
|
|||
{ stdenv, fetchFromGitHub
|
||||
, makeWrapper, unzip, which
|
||||
, curl, tzdata
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dmd-${version}";
|
||||
# This is the last version of dmd which is buildable without a D compiler.
|
||||
# So we use this as a bootstrap version.
|
||||
# The DMD frontend has been ported to D in 2.069.0 but idgen was already
|
||||
# ported in 2.068.0.
|
||||
version = "2.067.1";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "dmd";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fm29lg8axfmzdaj0y6vg70lhwb5d9rv4aavnvdd15xjschinlcz";
|
||||
name = "dmd-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "druntime";
|
||||
rev = "v${version}";
|
||||
sha256 = "1n2qfw9kmnql0fk2nxikispqs7vh85nhvyyr00fk227n9lgnqf02";
|
||||
name = "druntime-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "phobos";
|
||||
rev = "v${version}";
|
||||
sha256 = "0fywgds9xvjcgnqxmpwr67p3wi2m535619pvj159cgwv5y0nr3p1";
|
||||
name = "phobos-v${version}-src";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
postUnpack = ''
|
||||
mv dmd-v${version}-src dmd
|
||||
mv druntime-v${version}-src druntime
|
||||
mv phobos-v${version}-src phobos
|
||||
'';
|
||||
|
||||
# Compile with PIC to prevent colliding modules with binutils 2.28.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=17375
|
||||
usePIC = "-fPIC";
|
||||
ROOT_HOME_DIR = "$(echo ~root)";
|
||||
|
||||
postPatch = ''
|
||||
# Ugly hack so the dlopen call has a chance to succeed.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace phobos/std/net/curl.d \
|
||||
--replace libcurl.so ${curl.out}/lib/libcurl.so
|
||||
|
||||
# Ugly hack to fix the hardcoded path to zoneinfo in the source file.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace phobos/std/datetime.d \
|
||||
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
|
||||
|
||||
substituteInPlace druntime/test/shared/Makefile \
|
||||
--replace "DFLAGS:=" "DFLAGS:=${usePIC} "
|
||||
|
||||
# phobos uses curl, so we need to patch the path to the lib.
|
||||
substituteInPlace phobos/posix.mak \
|
||||
--replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
|
||||
|
||||
# Use proper C++ compiler
|
||||
substituteInPlace dmd/src/posix.mak \
|
||||
--replace g++ $CXX
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace dmd/src/root/port.c \
|
||||
--replace "#include <bits/mathdef.h>" "#include <complex.h>"
|
||||
|
||||
# See https://github.com/NixOS/nixpkgs/issues/29443
|
||||
substituteInPlace phobos/std/path.d \
|
||||
--replace "\"/root" "\"${ROOT_HOME_DIR}"
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace dmd/src/posix.mak \
|
||||
--replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
|
||||
|
||||
# Was not able to compile on darwin due to "__inline_isnanl"
|
||||
# being undefined.
|
||||
substituteInPlace dmd/src/root/port.c --replace __inline_isnanl __inline_isnan
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper unzip which ];
|
||||
buildInputs = [ curl tzdata ];
|
||||
|
||||
# Buid and install are based on http://wiki.dlang.org/Building_DMD
|
||||
buildPhase = ''
|
||||
cd dmd
|
||||
make -f posix.mak INSTALL_DIR=$out
|
||||
export DMD=$PWD/src/dmd
|
||||
cd ../druntime
|
||||
make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
|
||||
cd ../phobos
|
||||
make -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
|
||||
cd ..
|
||||
'';
|
||||
|
||||
# disable check phase because some tests are not working with sandboxing
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
cd dmd
|
||||
export DMD=$PWD/src/dmd
|
||||
cd ../druntime
|
||||
make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
|
||||
cd ../phobos
|
||||
make -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
|
||||
cd ..
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cd dmd
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
cp $PWD/src/dmd $out/bin
|
||||
mkdir -p $out/share/man/man1
|
||||
mkdir -p $out/share/man/man5
|
||||
cp -r docs/man/man1/* $out/share/man/man1/
|
||||
cp -r docs/man/man5/* $out/share/man/man5/
|
||||
|
||||
cd ../druntime
|
||||
mkdir $out/include
|
||||
mkdir $out/include/d2
|
||||
cp -r import/* $out/include/d2
|
||||
|
||||
cd ../phobos
|
||||
mkdir $out/lib
|
||||
${
|
||||
let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
|
||||
osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name;
|
||||
extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}"; in
|
||||
"cp generated/${osname}/release/${bits}/libphobos2.${extension} $out/lib"
|
||||
}
|
||||
|
||||
cp -r std $out/include/d2
|
||||
cp -r etc $out/include/d2
|
||||
|
||||
wrapProgram $out/bin/dmd \
|
||||
--prefix PATH ":" "${stdenv.cc}/bin" \
|
||||
--set-default CC "$CC"
|
||||
|
||||
cd $out/bin
|
||||
tee dmd.conf << EOF
|
||||
[Environment]
|
||||
DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Official reference compiler for the D language";
|
||||
homepage = http://dlang.org/;
|
||||
# Everything is now Boost licensed, even the backend.
|
||||
# https://github.com/dlang/dmd/pull/6680
|
||||
license = licenses.boost;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,173 +1,287 @@
|
|||
{ stdenv, fetchFromGitHub
|
||||
{ stdenv, fetchFromGitHub, overrideCC, gcc5
|
||||
, makeWrapper, unzip, which
|
||||
, curl, tzdata, gdb, darwin
|
||||
# Versions 2.070.2 and up require a working dmd compiler to build:
|
||||
, bootstrapDmd }:
|
||||
, callPackage
|
||||
, bootstrapVersion ? false
|
||||
, version ? "2.075.1"
|
||||
, dmdSha256 ? "0kq6r8rcghvzk5jcphg89l85rg734s29bssd2rcw3fygx0k9a9k5"
|
||||
, druntimeSha256 ? "0idn2v1lmp7hl637g3i7pdfj9mjk4sclkz4cm77nl8873k2fhk8j"
|
||||
, phobosSha256 ? "1a7q5fd15yspgs5plxgx54jyrcwgzlyw3rahmz04jd2s5h56dj04"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dmd-${version}";
|
||||
version = "2.075.1";
|
||||
let
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "dmd";
|
||||
rev = "v${version}";
|
||||
sha256 = "0kq6r8rcghvzk5jcphg89l85rg734s29bssd2rcw3fygx0k9a9k5";
|
||||
name = "dmd-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "druntime";
|
||||
rev = "v${version}";
|
||||
sha256 = "0idn2v1lmp7hl637g3i7pdfj9mjk4sclkz4cm77nl8873k2fhk8j";
|
||||
name = "druntime-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "phobos";
|
||||
rev = "v${version}";
|
||||
sha256 = "1a7q5fd15yspgs5plxgx54jyrcwgzlyw3rahmz04jd2s5h56dj04";
|
||||
name = "phobos-v${version}-src";
|
||||
})
|
||||
];
|
||||
bootstrapDmd = if !bootstrapVersion then
|
||||
# Versions 2.070.2 and up require a working dmd compiler to build so we just
|
||||
# use the last dmd without any D code to bootstrap the actual build.
|
||||
callPackage ./default.nix {
|
||||
stdenv = if stdenv.hostPlatform.isDarwin then
|
||||
stdenv
|
||||
else
|
||||
# Doesn't build with gcc6 on linux
|
||||
overrideCC stdenv gcc5;
|
||||
bootstrapVersion = true;
|
||||
version = "2.067.1";
|
||||
dmdSha256 = "0fm29lg8axfmzdaj0y6vg70lhwb5d9rv4aavnvdd15xjschinlcz";
|
||||
druntimeSha256 = "1n2qfw9kmnql0fk2nxikispqs7vh85nhvyyr00fk227n9lgnqf02";
|
||||
phobosSha256 = "0fywgds9xvjcgnqxmpwr67p3wi2m535619pvj159cgwv5y0nr3p1";
|
||||
}
|
||||
else
|
||||
"";
|
||||
|
||||
sourceRoot = ".";
|
||||
dmdBuild = stdenv.mkDerivation rec {
|
||||
name = "dmdBuild-${version}";
|
||||
inherit version;
|
||||
|
||||
postUnpack = ''
|
||||
mv dmd-v${version}-src dmd
|
||||
mv druntime-v${version}-src druntime
|
||||
mv phobos-v${version}-src phobos
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# Remove cppa test for now because it doesn't work.
|
||||
rm dmd/test/runnable/cppa.d
|
||||
rm dmd/test/runnable/extra-files/cppb.cpp
|
||||
'';
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "dmd";
|
||||
rev = "v${version}";
|
||||
sha256 = dmdSha256;
|
||||
name = "dmd";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "druntime";
|
||||
rev = "v${version}";
|
||||
sha256 = druntimeSha256;
|
||||
name = "druntime";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "phobos";
|
||||
rev = "v${version}";
|
||||
sha256 = phobosSha256;
|
||||
name = "phobos";
|
||||
})
|
||||
];
|
||||
|
||||
# Compile with PIC to prevent colliding modules with binutils 2.28.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=17375
|
||||
usePIC = "-fPIC";
|
||||
sourceRoot = ".";
|
||||
|
||||
postPatch = ''
|
||||
# Ugly hack so the dlopen call has a chance to succeed.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace phobos/std/net/curl.d \
|
||||
--replace libcurl.so ${curl.out}/lib/libcurl.so
|
||||
postUnpack = ''
|
||||
patchShebangs .
|
||||
|
||||
# Ugly hack to fix the hardcoded path to zoneinfo in the source file.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace phobos/std/datetime/timezone.d \
|
||||
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
|
||||
|
||||
substituteInPlace druntime/test/common.mak \
|
||||
--replace "DFLAGS:=" "DFLAGS:=${usePIC} "
|
||||
|
||||
# phobos uses curl, so we need to patch the path to the lib.
|
||||
substituteInPlace phobos/posix.mak \
|
||||
--replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
|
||||
|
||||
# Use proper C++ compiler
|
||||
substituteInPlace dmd/posix.mak \
|
||||
--replace g++ $CXX
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace dmd/posix.mak \
|
||||
--replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
|
||||
# Remove cppa test for now because it doesn't work.
|
||||
rm dmd/test/runnable/cppa.d
|
||||
rm dmd/test/runnable/extra-files/cppb.cpp
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which gdb ]
|
||||
# Compile with PIC to prevent colliding modules with binutils 2.28.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=17375
|
||||
usePIC = "-fPIC";
|
||||
ROOT_HOME_DIR = "$(echo ~root)";
|
||||
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Foundation
|
||||
]);
|
||||
datetimePath = if bootstrapVersion then
|
||||
"phobos/std/datetime.d"
|
||||
else
|
||||
"phobos/std/datetime/timezone.d";
|
||||
|
||||
buildInputs = [ curl tzdata ];
|
||||
phobosPatches = ''
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "import core.time;" "import core.time;import std.path;"
|
||||
|
||||
# Buid and install are based on http://wiki.dlang.org/Building_DMD
|
||||
buildPhase = ''
|
||||
cd dmd
|
||||
make -j$NIX_BUILD_CORES -f posix.mak INSTALL_DIR=$out
|
||||
${
|
||||
let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
|
||||
osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
|
||||
"export DMD=$PWD/generated/${osname}/release/${bits}/dmd"
|
||||
}
|
||||
cd ../druntime
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
|
||||
cd ../phobos
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=${usePIC} INSTALL_DIR=$out DMD=$DMD
|
||||
cd ..
|
||||
'';
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "tzName == \"leapseconds\"" "baseName(tzName) == \"leapseconds\""
|
||||
|
||||
# disable check phase because some tests are not working with sandboxing
|
||||
doCheck = false;
|
||||
# Ugly hack to fix the hardcoded path to zoneinfo in the source file.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
|
||||
|
||||
checkPhase = ''
|
||||
cd dmd
|
||||
${
|
||||
let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
|
||||
osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
|
||||
"export DMD=$PWD/generated/${osname}/release/${bits}/dmd"
|
||||
}
|
||||
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=${usePIC} DMD=$DMD BUILD=release SHARED=0
|
||||
cd ../druntime
|
||||
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
|
||||
cd ../phobos
|
||||
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=${usePIC} DMD=$DMD BUILD=release
|
||||
cd ..
|
||||
'';
|
||||
# Ugly hack so the dlopen call has a chance to succeed.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace phobos/std/net/curl.d \
|
||||
--replace libcurl.so ${curl.out}/lib/libcurl.so
|
||||
|
||||
# phobos uses curl, so we need to patch the path to the lib.
|
||||
substituteInPlace phobos/posix.mak \
|
||||
--replace "-soname=libcurl.so.4" "-soname=${curl.out}/lib/libcurl.so.4"
|
||||
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (bootstrapVersion) ''
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "import std.traits;" "import std.traits;import std.path;"
|
||||
|
||||
substituteInPlace ${datetimePath} \
|
||||
--replace "tzName == \"+VERSION\"" "baseName(tzName) == \"leapseconds\" || tzName == \"+VERSION\""
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
# See https://github.com/NixOS/nixpkgs/issues/29443
|
||||
substituteInPlace phobos/std/path.d \
|
||||
--replace "\"/root" "\"${ROOT_HOME_DIR}"
|
||||
'';
|
||||
|
||||
dmdPath = if bootstrapVersion then
|
||||
"dmd/src"
|
||||
else
|
||||
"dmd";
|
||||
|
||||
postPatch = ''
|
||||
# Use proper C++ compiler
|
||||
substituteInPlace ${dmdPath}/posix.mak \
|
||||
--replace g++ $CXX
|
||||
|
||||
# TODO
|
||||
substituteInPlace druntime/src/core/memory.d \
|
||||
--replace "assert(z is null);" "//assert(z is null);"
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (!bootstrapVersion) ''
|
||||
substituteInPlace druntime/test/common.mak \
|
||||
--replace "DFLAGS:=" "DFLAGS:=${usePIC} "
|
||||
''
|
||||
|
||||
+ phobosPatches
|
||||
|
||||
+ stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) ''
|
||||
substituteInPlace ${dmdPath}/root/port.c \
|
||||
--replace "#include <bits/mathdef.h>" "#include <complex.h>"
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace ${dmdPath}/posix.mak \
|
||||
--replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin && bootstrapVersion) ''
|
||||
# Was not able to compile on darwin due to "__inline_isnanl"
|
||||
# being undefined.
|
||||
substituteInPlace ${dmdPath}/root/port.c --replace __inline_isnanl __inline_isnan
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ bootstrapDmd makeWrapper unzip which gdb ]
|
||||
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Foundation
|
||||
]);
|
||||
|
||||
buildInputs = [ curl tzdata ];
|
||||
|
||||
bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
|
||||
osname = if stdenv.hostPlatform.isDarwin then
|
||||
"osx"
|
||||
else
|
||||
stdenv.hostPlatform.parsed.kernel.name;
|
||||
top = "$(echo $NIX_BUILD_TOP)";
|
||||
pathToDmd = if bootstrapVersion then
|
||||
"${top}/dmd/src/dmd"
|
||||
else
|
||||
"${top}/dmd/generated/${osname}/release/${bits}/dmd";
|
||||
|
||||
# Buid and install are based on http://wiki.dlang.org/Building_DMD
|
||||
buildPhase = ''
|
||||
cd dmd
|
||||
make -j$NIX_BUILD_CORES -f posix.mak INSTALL_DIR=$out
|
||||
cd ../druntime
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
|
||||
cd ../phobos
|
||||
make -j$NIX_BUILD_CORES -f posix.mak PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
|
||||
cd ..
|
||||
'';
|
||||
|
||||
doCheck = !bootstrapVersion;
|
||||
|
||||
checkPhase = ''
|
||||
cd dmd
|
||||
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 DMD=${pathToDmd} BUILD=release SHARED=0 SHELL=$SHELL
|
||||
cd ../druntime
|
||||
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release
|
||||
cd ..
|
||||
'';
|
||||
|
||||
extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}";
|
||||
|
||||
installPhase = ''
|
||||
cd dmd
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
cp ${pathToDmd} $out/bin
|
||||
|
||||
mkdir -p $out/share/man/man1
|
||||
mkdir -p $out/share/man/man5
|
||||
cp -r docs/man/man1/* $out/share/man/man1/
|
||||
cp -r docs/man/man5/* $out/share/man/man5/
|
||||
|
||||
cd ../druntime
|
||||
mkdir $out/include
|
||||
mkdir $out/include/d2
|
||||
cp -r import/* $out/include/d2
|
||||
|
||||
cd ../phobos
|
||||
mkdir $out/lib
|
||||
cp generated/${osname}/release/${bits}/libphobos2.${extension} $out/lib
|
||||
|
||||
cp -r std $out/include/d2
|
||||
cp -r etc $out/include/d2
|
||||
|
||||
wrapProgram $out/bin/dmd \
|
||||
--prefix PATH ":" "${stdenv.cc}/bin" \
|
||||
--set-default CC "$CC"
|
||||
|
||||
cd $out/bin
|
||||
tee dmd.conf << EOF
|
||||
[Environment]
|
||||
DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Official reference compiler for the D language";
|
||||
homepage = http://dlang.org/;
|
||||
# Everything is now Boost licensed, even the backend.
|
||||
# https://github.com/dlang/dmd/pull/6680
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ ThomasMader ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Need to test Phobos in a fixed-output derivation, otherwise the
|
||||
# network stuff in Phobos would fail if sandbox mode is enabled.
|
||||
phobosUnittests = stdenv.mkDerivation rec {
|
||||
name = "phobosUnittests-${version}";
|
||||
version = dmdBuild.version;
|
||||
|
||||
enableParallelBuilding = dmdBuild.enableParallelBuilding;
|
||||
preferLocalBuild = true;
|
||||
inputString = dmdBuild.outPath;
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = builtins.hashString "sha256" inputString;
|
||||
|
||||
srcs = dmdBuild.srcs;
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
postPatch = dmdBuild.phobosPatches;
|
||||
|
||||
nativeBuildInputs = dmdBuild.nativeBuildInputs;
|
||||
buildInputs = dmdBuild.buildInputs;
|
||||
|
||||
buildPhase = ''
|
||||
cd phobos
|
||||
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${dmdBuild}/bin/dmd BUILD=release
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
echo -n $inputString > $out
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit phobosUnittests;
|
||||
name = "dmd-${version}";
|
||||
phases = "installPhase";
|
||||
|
||||
installPhase = ''
|
||||
cd dmd
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
${
|
||||
let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
|
||||
osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
|
||||
"cp $PWD/generated/${osname}/release/${bits}/dmd $out/bin"
|
||||
}
|
||||
|
||||
mkdir -p $out/share/man/man1
|
||||
mkdir -p $out/share/man/man5
|
||||
cp -r docs/man/man1/* $out/share/man/man1/
|
||||
cp -r docs/man/man5/* $out/share/man/man5/
|
||||
|
||||
cd ../druntime
|
||||
mkdir $out/include
|
||||
mkdir $out/include/d2
|
||||
cp -r import/* $out/include/d2
|
||||
|
||||
cd ../phobos
|
||||
mkdir $out/lib
|
||||
${
|
||||
let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
|
||||
osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name;
|
||||
extension = if stdenv.hostPlatform.isDarwin then "a" else "{a,so}"; in
|
||||
"cp generated/${osname}/release/${bits}/libphobos2.${extension} $out/lib"
|
||||
}
|
||||
|
||||
cp -r std $out/include/d2
|
||||
cp -r etc $out/include/d2
|
||||
|
||||
wrapProgram $out/bin/dmd \
|
||||
--prefix PATH ":" "${stdenv.cc}/bin" \
|
||||
--set-default CC "$CC"
|
||||
|
||||
cd $out/bin
|
||||
tee dmd.conf << EOF
|
||||
[Environment]
|
||||
DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--export-dynamic"} -fPIC
|
||||
EOF
|
||||
mkdir $out
|
||||
cp -r --symbolic-link ${dmdBuild}/* $out/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Official reference compiler for the D language";
|
||||
homepage = http://dlang.org/;
|
||||
# Everything is now Boost licensed, even the backend.
|
||||
# https://github.com/dlang/dmd/pull/6680
|
||||
license = licenses.boost;
|
||||
maintainers = with maintainers; [ ThomasMader ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1x8m4rp2v7ydnrz6z9g8x7z3x3d3pxhv2pixy7i7hkbqbdsp7kal";
|
||||
};
|
||||
|
||||
buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 (stdenv.lib.getBin hscolour) ];
|
||||
buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour ];
|
||||
|
||||
patches = [ ./relocation.patch ];
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
|||
./relocation.patch
|
||||
];
|
||||
|
||||
buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 (stdenv.lib.getBin hscolour) ];
|
||||
buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||
++ stdenv.lib.optional stdenv.isLinux ./ghc-no-madv-free.patch
|
||||
++ stdenv.lib.optional stdenv.isDarwin ./ghc-8.0.2-no-cpp-warnings.patch;
|
||||
|
||||
buildInputs = [ ghc perl (stdenv.lib.getBin hscolour) sphinx ];
|
||||
buildInputs = [ ghc perl hscolour sphinx ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
let
|
||||
inherit (bootPkgs) ghc;
|
||||
version = "8.2.1";
|
||||
preReleaseName = "ghc-8.2.1";
|
||||
|
||||
commonBuildInputs = [ alex autoconf automake ghc happy hscolour perl python3 sphinx ];
|
||||
commonPreConfigure = ''
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
let
|
||||
inherit (bootPkgs) ghc;
|
||||
|
||||
commonBuildInputs = [ ghc perl autoconf automake (stdenv.lib.getBin happy) (stdenv.lib.getBin alex) python3 ];
|
||||
commonBuildInputs = [ ghc perl autoconf automake happy alex python3 ];
|
||||
|
||||
rev = "14457cf6a50f708eecece8f286f08687791d51f7";
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ in mkDerivation (rec {
|
|||
lens optparse-applicative parallel safe shelly split
|
||||
stringsearch syb system-fileio system-filepath tar terminfo text-binary
|
||||
unordered-containers vector wl-pprint-text yaml
|
||||
(stdenv.lib.getBin alex) (stdenv.lib.getBin happy) git gnumake autoconf automake libtool patch gmp
|
||||
alex happy git gnumake autoconf automake libtool patch gmp
|
||||
base16-bytestring cryptohash executable-path haddock-api
|
||||
transformers-compat QuickCheck haddock hspec xhtml
|
||||
regex-posix libiconv
|
||||
|
|
|
@ -20,9 +20,9 @@ stdenv.mkDerivation rec {
|
|||
sed -ie 's|ld |${targetPackages.stdenv.cc.bintools}/bin/ld |g' src/scripts/ldkernel.in
|
||||
'';
|
||||
configureFlags = stdenv.lib.optional (!enableIntegerSimple) [ "--enable-gmp" ];
|
||||
propagatedNativeBuildInputs = [ (stdenv.lib.getBin alex) (stdenv.lib.getBin happy) ];
|
||||
propagatedNativeBuildInputs = [ alex happy ];
|
||||
buildInputs =
|
||||
let haskellPkgs = [ (stdenv.lib.getBin alex) (stdenv.lib.getBin happy) (stdenv.lib.getBin bootPkgs.hscolour) bootPkgs.cabal-install bootPkgs.haddock bootPkgs.hpc
|
||||
let haskellPkgs = [ alex happy bootPkgs.hscolour bootPkgs.cabal-install bootPkgs.haddock bootPkgs.hpc
|
||||
]; in [ bootPkgs.ghc
|
||||
automake perl git targetPackages.stdenv.cc.bintools
|
||||
autoconf xen zlib ncurses.dev
|
||||
|
|
|
@ -1,103 +1,258 @@
|
|||
{ stdenv, fetchFromGitHub, cmake, llvm, dmd, curl, tzdata, python,
|
||||
lit, gdb, unzip, darwin }:
|
||||
{ stdenv, fetchgit, fetchurl, cmake, llvm, curl, tzdata
|
||||
, python, libconfig, lit, gdb, unzip, darwin, bash
|
||||
, callPackage
|
||||
, bootstrapVersion ? false
|
||||
, version ? "1.5.0"
|
||||
, ldcSha256 ? "1150sgns03vplni2wd4afk3rgw3rap8rsiipspw0rzxgki5rlr83"
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
bootstrapLdc = if !bootstrapVersion then
|
||||
# LDC 0.17.x is the last version which doesn't need a working D compiler to
|
||||
# build so we use that version to bootstrap the actual build.
|
||||
callPackage ./default.nix {
|
||||
bootstrapVersion = true;
|
||||
version = "0.17.5";
|
||||
ldcSha256 = "0200r5y8hs5yv2cx24csgyh00dlg18877b9cfblixypr6nhl19bs";
|
||||
}
|
||||
else
|
||||
"";
|
||||
|
||||
ldcBuild = stdenv.mkDerivation rec {
|
||||
name = "ldcBuild-${version}";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz";
|
||||
sha256 = ldcSha256;
|
||||
};
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
postUnpack = ''
|
||||
cd ldc-${version}-src/
|
||||
|
||||
patchShebangs .
|
||||
|
||||
# Remove cppa test for now because it doesn't work.
|
||||
rm tests/d2/dmd-testsuite/runnable/cppa.d
|
||||
rm tests/d2/dmd-testsuite/runnable/extra-files/cppb.cpp
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (bootstrapVersion) ''
|
||||
# ... runnable/variadic.d ()
|
||||
#Test failed. The logged output:
|
||||
#/tmp/nix-build-ldcBuild-0.17.5.drv-0/ldc-0.17.5-src/build/bin/ldmd2 -conf= -m64 -Irunnable -od/tmp/nix-build-ldcBuild-0.17.5.drv-0/ldc-0.17.5-src/build/dmd-testsuite/runnable -of/tmp/nix-build-ldcBuild-0.17.5.drv-0/ldc-0.17.5-src/build/dmd-testsuite/runnable/variadic_0 runnable/variadic.d
|
||||
#Error: integer constant expression expected instead of <cant>
|
||||
#Error: integer constant expression expected instead of <cant>
|
||||
#Error: integer constant expression expected instead of <cant>
|
||||
#Error: integer constant expression expected instead of <cant>
|
||||
#Error: integer constant expression expected instead of <cant>
|
||||
#runnable/variadic.d(84): Error: template instance variadic.Foo3!(int, int, int) error instantiating
|
||||
#
|
||||
#
|
||||
#==============================
|
||||
#Test failed: expected rc == 0, exited with rc == 1
|
||||
rm tests/d2/dmd-testsuite/runnable/variadic.d
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (!bootstrapVersion) ''
|
||||
# https://github.com/NixOS/nixpkgs/issues/29611
|
||||
rm tests/sanitizers/asan_*
|
||||
'';
|
||||
|
||||
ROOT_HOME_DIR = "$(echo ~root)";
|
||||
|
||||
datetimePath = if bootstrapVersion then
|
||||
"phobos/std/datetime.d"
|
||||
else
|
||||
"phobos/std/datetime/timezone.d";
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace cmake/Modules/FindLLVM.cmake \
|
||||
--replace "llvm_set(LIBRARY_DIRS" "#llvm_set(LIBRARY_DIRS"
|
||||
|
||||
substituteInPlace runtime/${datetimePath} \
|
||||
--replace "import core.time;" "import core.time;import std.path;"
|
||||
|
||||
substituteInPlace runtime/${datetimePath} \
|
||||
--replace "tzName == \"leapseconds\"" "baseName(tzName) == \"leapseconds\""
|
||||
|
||||
substituteInPlace runtime/phobos/std/net/curl.d \
|
||||
--replace libcurl.so ${curl.out}/lib/libcurl.so
|
||||
|
||||
# Ugly hack to fix the hardcoded path to zoneinfo in the source file.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace runtime/${datetimePath} \
|
||||
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
|
||||
|
||||
substituteInPlace tests/d2/dmd-testsuite/Makefile \
|
||||
--replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash"
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
# See https://github.com/NixOS/nixpkgs/issues/29443
|
||||
substituteInPlace runtime/phobos/std/path.d \
|
||||
--replace "\"/root" "\"${ROOT_HOME_DIR}"
|
||||
|
||||
# TODO
|
||||
substituteInPlace runtime/druntime/src/core/memory.d \
|
||||
--replace "assert(z is null);" "//assert(z is null);"
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
|
||||
# https://github.com/ldc-developers/ldc/pull/2306
|
||||
# Can be removed on bootstrap version > 0.17.5
|
||||
substituteInPlace gen/programs.cpp \
|
||||
--replace "gcc" "clang"
|
||||
|
||||
# Was not able to compile on darwin due to "__inline_isnanl"
|
||||
# being undefined.
|
||||
substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) ''
|
||||
substituteInPlace dmd2/root/port.c \
|
||||
--replace "#include <bits/mathdef.h>" "#include <complex.h>"
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString (bootstrapVersion) ''
|
||||
substituteInPlace runtime/${datetimePath} \
|
||||
--replace "import std.traits;" "import std.traits;import std.path;"
|
||||
|
||||
substituteInPlace runtime/${datetimePath} \
|
||||
--replace "tzName == \"+VERSION\"" "baseName(tzName) == \"leapseconds\" || tzName == \"+VERSION\""
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake llvm bootstrapLdc python lit gdb unzip ]
|
||||
|
||||
++ stdenv.lib.optional (bootstrapVersion) [
|
||||
libconfig
|
||||
]
|
||||
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Foundation
|
||||
]);
|
||||
|
||||
|
||||
buildInputs = [ curl tzdata stdenv.cc ];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlagsArray=("-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc"
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DCMAKE_SKIP_RPATH=ON"
|
||||
"-DBUILD_SHARED_LIBS=OFF"
|
||||
"-DLDC_WITH_LLD=OFF"
|
||||
# Xcode 9.0.1 fixes that bug according to ldc release notes
|
||||
"-DRT_ARCHIVE_WITH_LDC=OFF"
|
||||
"-DLLVM_LIBRARY_DIRS=${llvm}/lib"
|
||||
)
|
||||
'';
|
||||
|
||||
|
||||
postConfigure = ''
|
||||
export DMD=$PWD/bin/ldmd2
|
||||
'';
|
||||
|
||||
makeFlags = [ "DMD=$DMD" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
checkPhase = ''
|
||||
# Build and run LDC D unittests.
|
||||
ctest --output-on-failure -R "ldc2-unittest"
|
||||
# Run LIT testsuite.
|
||||
ctest -V -R "lit-tests"
|
||||
# Run DMD testsuite.
|
||||
DMD_TESTSUITE_MAKE_ARGS=-j$NIX_BUILD_CORES ctest -V -R "dmd-testsuite"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The LLVM-based D compiler";
|
||||
homepage = https://github.com/ldc-developers/ldc;
|
||||
# from https://github.com/ldc-developers/ldc/blob/master/LICENSE
|
||||
license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ];
|
||||
maintainers = with maintainers; [ ThomasMader ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
|
||||
};
|
||||
};
|
||||
|
||||
# Need to test Phobos in a fixed-output derivation, otherwise the
|
||||
# network stuff in Phobos would fail if sandbox mode is enabled.
|
||||
ldcUnittests = stdenv.mkDerivation rec {
|
||||
name = "ldcUnittests-${version}";
|
||||
|
||||
enableParallelBuilding = ldcBuild.enableParallelBuilding;
|
||||
preferLocalBuild = true;
|
||||
inputString = ldcBuild.outPath;
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = builtins.hashString "sha256" inputString;
|
||||
|
||||
src = ldcBuild.src;
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
postUnpack = ldcBuild.postUnpack;
|
||||
|
||||
postPatch = ldcBuild.postPatch;
|
||||
|
||||
nativeBuildInputs = ldcBuild.nativeBuildInputs
|
||||
|
||||
++ [
|
||||
ldcBuild
|
||||
];
|
||||
|
||||
buildInputs = ldcBuild.buildInputs;
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlagsArray=( "-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc"
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DCMAKE_SKIP_RPATH=ON"
|
||||
"-DBUILD_SHARED_LIBS=OFF"
|
||||
"-DLDC_WITH_LLD=OFF"
|
||||
# Xcode 9.0.1 fixes that bug according to ldc release notes
|
||||
"-DRT_ARCHIVE_WITH_LDC=OFF"
|
||||
"-DLLVM_LIBRARY_DIRS=${llvm}/lib"
|
||||
"-DD_COMPILER=${ldcBuild}/bin/ldmd2"
|
||||
)
|
||||
'';
|
||||
|
||||
postConfigure = ldcBuild.postConfigure;
|
||||
|
||||
makeFlags = ldcBuild.makeFlags;
|
||||
|
||||
buildCmd = if bootstrapVersion then
|
||||
"ctest -V -R \"build-druntime-ldc-unittest|build-phobos2-ldc-unittest\""
|
||||
else
|
||||
"make -j$NIX_BUILD_CORES DMD=${ldcBuild}/bin/ldc2 druntime-test-runner druntime-test-runner-debug phobos2-test-runner phobos2-test-runner-debug";
|
||||
|
||||
testCmd = if bootstrapVersion then
|
||||
"ctest -j$NIX_BUILD_CORES --output-on-failure -E \"dmd-testsuite|lit-tests|ldc2-unittest|llvm-ir-testsuite\""
|
||||
else
|
||||
"ctest -j$NIX_BUILD_CORES --output-on-failure -E \"dmd-testsuite|lit-tests|ldc2-unittest\"";
|
||||
|
||||
buildPhase = ''
|
||||
${buildCmd}
|
||||
${testCmd}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
echo -n $inputString > $out
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit ldcUnittests;
|
||||
name = "ldc-${version}";
|
||||
version = "1.3.0";
|
||||
phases = "installPhase";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
owner = "ldc-developers";
|
||||
repo = "ldc";
|
||||
rev = "v${version}";
|
||||
sha256 = "1ac3j4cwwgjpayhijxx4d6478bc3iqksjxkd7xp7byx7k8w1ppdl";
|
||||
name = "ldc-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "ldc-developers";
|
||||
repo = "druntime";
|
||||
rev = "ldc-v${version}";
|
||||
sha256 = "1m13370wnj3sizqk3sdpzi9am5d24srf27d613qblhqa9n8vwz30";
|
||||
name = "druntime-ldc-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "ldc-developers";
|
||||
repo = "phobos";
|
||||
rev = "ldc-v${version}";
|
||||
sha256 = "0fhcdfi7a00plwj27ysfyv783nhk0kspq7hawf6vbsl3s1nyvn8g";
|
||||
name = "phobos-ldc-v${version}-src";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
owner = "ldc-developers";
|
||||
repo = "dmd-testsuite";
|
||||
rev = "ldc-v${version}";
|
||||
sha256 = "0dmdkp220gqhxjrmrjfkf0vsvylwfaj70hswavq4q3v4dg17pzmj";
|
||||
name = "dmd-testsuite-ldc-v${version}-src";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
postUnpack = ''
|
||||
mv ldc-v${version}-src/* .
|
||||
|
||||
mv druntime-ldc-v${version}-src/* runtime/druntime
|
||||
|
||||
mv phobos-ldc-v${version}-src/* runtime/phobos
|
||||
|
||||
mv dmd-testsuite-ldc-v${version}-src/* tests/d2/dmd-testsuite
|
||||
|
||||
# Remove cppa test for now because it doesn't work.
|
||||
rm tests/d2/dmd-testsuite/runnable/cppa.d
|
||||
rm tests/d2/dmd-testsuite/runnable/extra-files/cppb.cpp
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp -r --symbolic-link ${ldcBuild}/* $out/
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace runtime/phobos/std/net/curl.d \
|
||||
--replace libcurl.so ${curl.out}/lib/libcurl.so
|
||||
|
||||
# Ugly hack to fix the hardcoded path to zoneinfo in the source file.
|
||||
# https://issues.dlang.org/show_bug.cgi?id=15391
|
||||
substituteInPlace runtime/phobos/std/datetime.d \
|
||||
--replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
|
||||
''
|
||||
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace driver/tool.cpp \
|
||||
--replace "gcc" "clang"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake llvm dmd python lit gdb unzip ]
|
||||
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Foundation
|
||||
]);
|
||||
|
||||
buildInputs = [ curl tzdata stdenv.cc ];
|
||||
|
||||
preConfigure = ''
|
||||
cmakeFlagsArray=("-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc")
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
export DMD=$PWD/bin/ldc2
|
||||
'';
|
||||
|
||||
makeFlags = [ "DMD=$DMD" ];
|
||||
|
||||
# disable check phase because some tests are not working with sandboxing
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
ctest -j $NIX_BUILD_CORES -V DMD=$DMD
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "The LLVM-based D compiler";
|
||||
homepage = https://github.com/ldc-developers/ldc;
|
||||
# from https://github.com/ldc-developers/ldc/blob/master/LICENSE
|
||||
license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ];
|
||||
maintainers = with maintainers; [ ThomasMader ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -897,7 +897,6 @@ self: super: {
|
|||
# Don't install internal mkReadme tool.
|
||||
hastache = overrideCabal super.hastache (drv: {
|
||||
doCheck = false;
|
||||
enableSeparateBinOutput = false;
|
||||
postInstall = "rm $out/bin/mkReadme && rmdir $out/bin";
|
||||
});
|
||||
|
||||
|
|
|
@ -217,10 +217,7 @@ self: super: builtins.intersectAttrs super {
|
|||
|
||||
# wxc supports wxGTX >= 3.0, but our current default version points to 2.8.
|
||||
# http://hydra.cryp.to/build/1331287/log/raw
|
||||
wxc = (overrideCabal super.wxc (drv: {
|
||||
buildDepends = (drv.buildDepends or []) ++ [self.split];
|
||||
postInstall = "cp -v dist/build/libwxc.so.0.92.3.0 $lib/lib/libwxc.so";
|
||||
})).override { wxGTK = pkgs.wxGTK30; };
|
||||
wxc = (addBuildDepend super.wxc self.split).override { wxGTK = pkgs.wxGTK30; };
|
||||
wxcore = super.wxcore.override { wxGTK = pkgs.wxGTK30; };
|
||||
|
||||
# Test suite wants to connect to $DISPLAY.
|
||||
|
@ -510,52 +507,4 @@ self: super: builtins.intersectAttrs super {
|
|||
# Break cyclic reference that results in an infinite recursion.
|
||||
partial-semigroup = dontCheck super.partial-semigroup;
|
||||
|
||||
# Alex has some weird files in /usr/share that create a cyclic ref with
|
||||
# its bin dir.
|
||||
alex = hasNoBinOutput super.alex;
|
||||
|
||||
# Disable separate bin outputs for these specific packages that break with it.
|
||||
H = hasNoBinOutput super.H;
|
||||
cryptol = hasNoBinOutput super.cryptol;
|
||||
hscolour = hasNoBinOutput super.hscolour;
|
||||
sproxy = hasNoBinOutput super.sproxy;
|
||||
sproxy2 = hasNoBinOutput super.sproxy2;
|
||||
sproxy-web = hasNoBinOutput super.sproxy-web;
|
||||
juandelacosa = hasNoBinOutput super.juandelacosa;
|
||||
mywatch = hasNoBinOutput super.mywatch;
|
||||
sugarhaskell = hasNoBinOutput super.sugarhaskell;
|
||||
zerobin = hasNoBinOutput super.zerobin;
|
||||
|
||||
git-annex = overrideCabal super.git-annex (drv: {
|
||||
enableSeparateBinOutput = false;
|
||||
enableSeparateEtcOutput = false;
|
||||
});
|
||||
|
||||
# Has extra data files which are referred to from the binary output,
|
||||
# creating a store reference cycle. Putting data in separate output
|
||||
# solves the problem.
|
||||
happy = overrideCabal super.happy (drv: { enableSeparateDataOutput = true; });
|
||||
|
||||
# Override a number of packages with specific references to $out in their
|
||||
# derivations
|
||||
stack = overrideCabal super.stack (drv: {
|
||||
postInstall = ''
|
||||
exe=$bin/bin/stack
|
||||
mkdir -p $bin/share/bash-completion/completions
|
||||
$exe --bash-completion-script $exe >$bin/share/bash-completion/completions/stack
|
||||
'';
|
||||
});
|
||||
Agda = overrideCabal super.Agda (drv: {
|
||||
postInstall = ''
|
||||
files=("$out/share/"*"-ghc-"*"/Agda-"*"/lib/prim/Agda/"{Primitive.agda,Builtin"/"*.agda})
|
||||
for f in "''${files[@]}" ; do
|
||||
$bin/bin/agda $f
|
||||
done
|
||||
for f in "''${files[@]}" ; do
|
||||
$bin/bin/agda -c --no-main $f
|
||||
done
|
||||
$bin/bin/agda-mode compile
|
||||
'';
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -56,10 +56,6 @@ let isCross = (ghc.cross or null) != null; in
|
|||
, hardeningDisable ? lib.optional (ghc.isHaLVM or false) "all"
|
||||
, enableSeparateDataOutput ? false
|
||||
, enableSeparateDocOutput ? doHaddock
|
||||
, enableSeparateBinOutput ? isExecutable
|
||||
, outputsToInstall ? []
|
||||
, enableSeparateLibOutput ? true
|
||||
, enableSeparateEtcOutput ? (stdenv.lib.versionOlder "7.7" ghc.version)
|
||||
} @ args:
|
||||
|
||||
assert editedCabalFile != null -> revision != null;
|
||||
|
@ -83,6 +79,9 @@ let
|
|||
then "package-db"
|
||||
else "package-conf";
|
||||
|
||||
# the target dir for haddock documentation
|
||||
docdir = docoutput: docoutput + "/share/doc";
|
||||
|
||||
newCabalFileUrl = "http://hackage.haskell.org/package/${pname}-${version}/revision/${revision}.cabal";
|
||||
newCabalFile = fetchurl {
|
||||
url = newCabalFileUrl;
|
||||
|
@ -96,13 +95,6 @@ let
|
|||
'';
|
||||
|
||||
hasActiveLibrary = isLibrary && (enableStaticLibraries || enableSharedLibraries || enableLibraryProfiling);
|
||||
hasLibOutput = enableSeparateLibOutput && hasActiveLibrary;
|
||||
libDir = if hasLibOutput then "$lib/lib/${ghc.name}" else "$out/lib/${ghc.name}";
|
||||
binDir = if enableSeparateBinOutput then "$bin/bin" else "$out/bin";
|
||||
libexecDir = if enableSeparateBinOutput then "$libexec/bin" else "$out/libexec";
|
||||
etcDir = if enableSeparateEtcOutput then "$etc/etc" else "$out/etc";
|
||||
docDir = if enableSeparateDocOutput then "$doc/share/doc" else "$out/share/doc";
|
||||
dataDir = if enableSeparateDataOutput then "$data/share/${ghc.name}" else "$out/share/${ghc.name}";
|
||||
|
||||
# We cannot enable -j<n> parallelism for libraries because GHC is far more
|
||||
# likely to generate a non-determistic library ID in that case. Further
|
||||
|
@ -121,20 +113,12 @@ let
|
|||
stdenv.lib.optionalString isCross (" " + stdenv.lib.concatStringsSep " " crossCabalFlags);
|
||||
|
||||
defaultConfigureFlags = [
|
||||
"--verbose" "--prefix=$out"
|
||||
# Binary directory has to be $bin/bin instead of just $bin: this
|
||||
# is so that the package is added to the PATH when it's used as a
|
||||
# build input. Sadly mkDerivation won't add inputs that don't have
|
||||
# bin subdirectory.
|
||||
"--bindir=${binDir}"
|
||||
"--libdir=${libDir}" "--libsubdir=\\$pkgid"
|
||||
"--libexecdir=${libexecDir}"
|
||||
(optionalString (enableSeparateEtcOutput) "--sysconfdir=${etcDir}") # Old versions of cabal don't support this flag.
|
||||
"--datadir=${dataDir}"
|
||||
"--docdir=${docDir}"
|
||||
"--verbose" "--prefix=$out" "--libdir=\\$prefix/lib/\\$compiler" "--libsubdir=\\$pkgid"
|
||||
(optionalString enableSeparateDataOutput "--datadir=$data/share/${ghc.name}")
|
||||
(optionalString enableSeparateDocOutput "--docdir=${docdir "$doc"}")
|
||||
"--with-gcc=$CC" # Clang won't work without that extra information.
|
||||
"--package-db=$packageConfDir"
|
||||
(optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=${libDir}/${pname}-${version}")
|
||||
(optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/lib/${ghc.name}/${pname}-${version}")
|
||||
(optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names")
|
||||
(optionalString enableParallelBuilding "--ghc-option=-j$NIX_BUILD_CORES")
|
||||
(optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp")
|
||||
|
@ -168,11 +152,8 @@ let
|
|||
allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++
|
||||
optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends;
|
||||
|
||||
nativeBuildInputs = map stdenv.lib.getBin
|
||||
( optional (allPkgconfigDepends != []) pkgconfig
|
||||
++ buildTools ++ libraryToolDepends ++ executableToolDepends
|
||||
++ [ removeReferencesTo ]
|
||||
);
|
||||
nativeBuildInputs = optional (allPkgconfigDepends != []) pkgconfig ++
|
||||
buildTools ++ libraryToolDepends ++ executableToolDepends ++ [ removeReferencesTo ];
|
||||
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
|
||||
otherBuildInputs = setupHaskellDepends ++ extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
|
||||
optionals (allPkgconfigDepends != []) allPkgconfigDepends ++
|
||||
|
@ -201,15 +182,7 @@ assert allPkgconfigDepends != [] -> pkgconfig != null;
|
|||
stdenv.mkDerivation ({
|
||||
name = "${pname}-${version}";
|
||||
|
||||
outputs = if (args ? outputs) then args.outputs else
|
||||
( (optional enableSeparateBinOutput "bin")
|
||||
++ (optional enableSeparateBinOutput "libexec")
|
||||
++ [ "out" ]
|
||||
++ (optional enableSeparateDataOutput "data")
|
||||
++ (optional enableSeparateDocOutput "doc")
|
||||
++ (optional enableSeparateEtcOutput "etc")
|
||||
++ (optional hasLibOutput "lib")
|
||||
);
|
||||
outputs = if (args ? outputs) then args.outputs else ([ "out" ] ++ (optional enableSeparateDataOutput "data") ++ (optional enableSeparateDocOutput "doc"));
|
||||
setOutputFlags = false;
|
||||
|
||||
pos = builtins.unsafeGetAttrPos "pname" args;
|
||||
|
@ -233,7 +206,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
postPatch = optionalString jailbreak ''
|
||||
echo "Run jailbreak-cabal to lift version restrictions on build inputs."
|
||||
${stdenv.lib.getBin jailbreak-cabal}/bin/jailbreak-cabal ${pname}.cabal
|
||||
${jailbreak-cabal}/bin/jailbreak-cabal ${pname}.cabal
|
||||
'' + postPatch;
|
||||
|
||||
setupCompilerEnvironmentPhase = ''
|
||||
|
@ -241,7 +214,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
echo "Build with ${ghc}."
|
||||
export PATH="${ghc}/bin:$PATH"
|
||||
${optionalString (hasActiveLibrary && hyperlinkSource) "export PATH=${stdenv.lib.getBin hscolour}/bin:$PATH"}
|
||||
${optionalString (hasActiveLibrary && hyperlinkSource) "export PATH=${hscolour}/bin:$PATH"}
|
||||
|
||||
packageConfDir="$TMPDIR/package.conf.d"
|
||||
mkdir -p $packageConfDir
|
||||
|
@ -268,7 +241,7 @@ stdenv.mkDerivation ({
|
|||
#
|
||||
# Create a local directory with symlinks of the *.dylib (macOS shared
|
||||
# libraries) from all the dependencies.
|
||||
local dynamicLinksDir="${libDir}/links"
|
||||
local dynamicLinksDir="$out/lib/links"
|
||||
mkdir -p $dynamicLinksDir
|
||||
for d in $(grep dynamic-library-dirs "$packageConfDir/"*|awk '{print $2}'); do
|
||||
ln -s "$d/"*.dylib $dynamicLinksDir
|
||||
|
@ -340,7 +313,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
${if !hasActiveLibrary then "${setupCommand} install" else ''
|
||||
${setupCommand} copy
|
||||
local packageConfDir="${libDir}/package.conf.d"
|
||||
local packageConfDir="$out/lib/${ghc.name}/package.conf.d"
|
||||
local packageConfFile="$packageConfDir/${pname}-${version}.conf"
|
||||
mkdir -p "$packageConfDir"
|
||||
${setupCommand} register --gen-pkg-config=$packageConfFile
|
||||
|
@ -348,7 +321,7 @@ stdenv.mkDerivation ({
|
|||
mv $packageConfFile $packageConfDir/$pkgId.conf
|
||||
''}
|
||||
${optionalString isGhcjs ''
|
||||
for exeDir in "${binDir}/"*.jsexe; do
|
||||
for exeDir in "$out/bin/"*.jsexe; do
|
||||
exe="''${exeDir%.jsexe}"
|
||||
printWords '#!${nodejs}/bin/node' > "$exe"
|
||||
cat "$exeDir/all.js" >> "$exe"
|
||||
|
@ -357,68 +330,18 @@ stdenv.mkDerivation ({
|
|||
''}
|
||||
${optionalString doCoverage "mkdir -p $out/share && cp -r dist/hpc $out/share"}
|
||||
${optionalString (enableSharedExecutables && isExecutable && !isGhcjs && stdenv.isDarwin && stdenv.lib.versionOlder ghc.version "7.10") ''
|
||||
for exe in "${binDir}/"* ; do
|
||||
install_name_tool -add_rpath "${libDir}/${pname}-${version}" "$exe"
|
||||
for exe in "$out/bin/"* ; do
|
||||
install_name_tool -add_rpath "$out/lib/ghc-${ghc.version}/${pname}-${version}" "$exe"
|
||||
done
|
||||
''}
|
||||
|
||||
${optionalString enableSeparateDocOutput ''
|
||||
# Remove references back to $out but also back to $lib if we have
|
||||
# docs. $lib is needed as it stores path to haddock interfaces in the
|
||||
# conf file which creates a cycle if docs refer back to library
|
||||
# path.
|
||||
mkdir -p ${docDir}
|
||||
|
||||
for x in ${docDir}/html/src/*.html; do
|
||||
remove-references-to -t $out -t ${libDir} -t ${binDir} ${optionalString enableSeparateDataOutput "-t $data"} $x
|
||||
for x in ${docdir "$doc"}/html/src/*.html; do
|
||||
remove-references-to -t $out $x
|
||||
done
|
||||
mkdir -p $doc
|
||||
''}
|
||||
|
||||
${optionalString hasLibOutput ''
|
||||
# Even if we don't have binary output for the package, things like
|
||||
# Paths files will embed paths to bin/libexec directories in themselves
|
||||
# which results in .lib <-> $out cyclic store reference. We
|
||||
# therefore patch out the paths from separate library if we don't have
|
||||
# separate bin output too.
|
||||
#
|
||||
# If we _do_ have separate bin and lib outputs, we may still be in
|
||||
# trouble in case of shared executables: executable contains path to
|
||||
# .lib, .lib contains path (through Paths) to .bin and we have a
|
||||
# cycle.
|
||||
#
|
||||
# Lastly we have to deal with references from .lib back into
|
||||
# $out/share if we're not splitting out data directory.
|
||||
#
|
||||
# It may happen that we have hasLibOutput set but the library
|
||||
# directory was not created: this happens in the case that library
|
||||
# section is not exposing any modules. See "fail" package for an
|
||||
# example where no modules are exposed for GHC >= 8.0.
|
||||
if [ -d ${libDir} ]; then
|
||||
find ${libDir} -type f -exec \
|
||||
remove-references-to -t ${binDir} -t ${libexecDir} "{}" \;
|
||||
fi
|
||||
''}
|
||||
|
||||
${optionalString (hasLibOutput && ! enableSeparateDocOutput) ''
|
||||
# If we don't have separate docs, we have to patch out the ref to
|
||||
# docs in package conf. This will likely break Haddock
|
||||
# cross-package links but is necessary to break store cycle…
|
||||
find ${libDir}/ -type f -name '*.conf' -exec \
|
||||
remove-references-to -t ${docDir} "{}" \;
|
||||
''}
|
||||
|
||||
${optionalString (hasLibOutput && ! enableSeparateDataOutput) ''
|
||||
# Just like for doc output path in $out potentially landing in
|
||||
# *.conf, we have to also remove the data directory so that it
|
||||
# doesn't appear under data-dir field creating a cycle.
|
||||
find ${libDir}/ -type f -exec echo Removing ${dataDir} refs from "{}" \;
|
||||
find ${libDir}/ -type f -exec \
|
||||
remove-references-to -t ${dataDir} "{}" \;
|
||||
''}
|
||||
|
||||
${optionalString enableSeparateDataOutput "mkdir -p ${dataDir}"}
|
||||
${optionalString enableSeparateBinOutput "mkdir -p ${binDir} ${libexecDir}"}
|
||||
${optionalString enableSeparateEtcOutput "mkdir -p ${etcDir}"}
|
||||
${optionalString enableSeparateDataOutput "mkdir -p $data"}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
@ -435,7 +358,7 @@ stdenv.mkDerivation ({
|
|||
# the directory containing the haddock documentation.
|
||||
# `null' if no haddock documentation was built.
|
||||
# TODO: fetch the self from the fixpoint instead
|
||||
haddockDir = self: if doHaddock then "${docDir}/html" else null;
|
||||
haddockDir = self: if doHaddock then "${docdir self.doc}/html" else null;
|
||||
|
||||
env = stdenv.mkDerivation {
|
||||
name = "interactive-${pname}-${version}-environment";
|
||||
|
@ -463,7 +386,6 @@ stdenv.mkDerivation ({
|
|||
// optionalAttrs (description != "") { inherit description; }
|
||||
// optionalAttrs (maintainers != []) { inherit maintainers; }
|
||||
// optionalAttrs (hydraPlatforms != platforms) { inherit hydraPlatforms; }
|
||||
// optionalAttrs (outputsToInstall != []) { inherit outputsToInstall; }
|
||||
;
|
||||
|
||||
}
|
||||
|
|
|
@ -147,8 +147,4 @@ rec {
|
|||
overrideSrc = drv: { src, version ? drv.version }:
|
||||
overrideCabal drv (_: { inherit src version; editedCabalFile = null; });
|
||||
|
||||
hasNoBinOutput = drv: overrideCabal drv (drv: { enableSeparateBinOutput = false; });
|
||||
|
||||
installOutputs = drv: outputs: overrideCabal drv
|
||||
(drv: { outputsToInstall = outputs; });
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ let
|
|||
isLibrary = false;
|
||||
doHaddock = false;
|
||||
hyperlinkSource = false; # Avoid depending on hscolour for this build.
|
||||
enableSeparateEtcOutput = false; # The flag to support this is missing in old versions of cabal.
|
||||
postFixup = "rm -rf $out/lib $out/share $out/nix-support";
|
||||
});
|
||||
cpphs = overrideCabal (self.cpphs.overrideScope (self: super: {
|
||||
|
|
|
@ -43,7 +43,7 @@ let
|
|||
libDir = if isHaLVM then "$out/lib/HaLVM-${ghc.version}" else "$out/lib/${ghcCommand}-${ghc.version}";
|
||||
docDir = "$out/share/doc/ghc/html";
|
||||
packageCfgDir = "${libDir}/package.conf.d";
|
||||
paths = map lib.getLib (lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages));
|
||||
paths = lib.filter (x: x ? isHaskellLibrary) (lib.closePropagation packages);
|
||||
hasLibraries = lib.any (x: x.isHaskellLibrary) paths;
|
||||
# CLang is needed on Darwin for -fllvm to work:
|
||||
# https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/code-generators.html
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libp11-${version}";
|
||||
version = "0.4.4";
|
||||
version = "0.4.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenSC";
|
||||
repo = "libp11";
|
||||
rev = name;
|
||||
sha256 = "1jnpnwipmw3skw112qff36w046nyz5amiil228rn5divpkvx4axa";
|
||||
sha256 = "0n1i0pxj6l0vdq8gpdwfp5p9qd7wkymg0lpy6a17ix8hpqsljlhr";
|
||||
};
|
||||
|
||||
makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
|
||||
|
|
|
@ -7,13 +7,11 @@
|
|||
assert readline != null;
|
||||
|
||||
let
|
||||
arch = if stdenv.isArm
|
||||
then if stdenv.is64bit
|
||||
then"arm64"
|
||||
else "arm"
|
||||
else if stdenv.is64bit
|
||||
then"x64"
|
||||
else "ia32";
|
||||
arch = if stdenv.isx86_64 then "x64"
|
||||
else if stdenv.isi686 then "ia32"
|
||||
else if stdenv.isAarch64 then "arm64"
|
||||
else if stdenv.isArm then "arm"
|
||||
else throw "Unknown architecture for v8";
|
||||
git_url = "https://chromium.googlesource.com";
|
||||
clangFlag = if stdenv.isDarwin then "1" else "0";
|
||||
sharedFlag = if static then "static_library" else "shared_library";
|
||||
|
@ -172,6 +170,8 @@ stdenv.mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
dontUpdateAutotoolsGnuConfigScripts = if stdenv.isAarch64 then true else null;
|
||||
|
||||
# the `libv8_libplatform` target is _only_ built as a static library,
|
||||
# and is expected to be statically linked in when needed.
|
||||
# see the following link for further commentary:
|
||||
|
|
|
@ -175,13 +175,13 @@ let
|
|||
sha1 = "0054e1e744502e27c04c187c3ecc505dd54bbb4f";
|
||||
};
|
||||
};
|
||||
"interpret-1.0.4" = {
|
||||
"interpret-1.1.0" = {
|
||||
name = "interpret";
|
||||
packageName = "interpret";
|
||||
version = "1.0.4";
|
||||
version = "1.1.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/interpret/-/interpret-1.0.4.tgz";
|
||||
sha1 = "820cdd588b868ffb191a809506d6c9c8f212b1b0";
|
||||
url = "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz";
|
||||
sha1 = "7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614";
|
||||
};
|
||||
};
|
||||
"liftoff-2.3.0" = {
|
||||
|
@ -1300,13 +1300,13 @@ let
|
|||
sha1 = "a794af0c05ab1752846ee753a1f211a05ba0c44f";
|
||||
};
|
||||
};
|
||||
"array-slice-1.0.0" = {
|
||||
"array-slice-1.1.0" = {
|
||||
name = "array-slice";
|
||||
packageName = "array-slice";
|
||||
version = "1.0.0";
|
||||
version = "1.1.0";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/array-slice/-/array-slice-1.0.0.tgz";
|
||||
sha1 = "e73034f00dcc1f40876008fd20feae77bd4b7c2f";
|
||||
url = "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz";
|
||||
sha512 = "3myjiz16qi117x0k52sisqyn0cqx6yxvpgr43bkil9shgs7yhs8wpdgd3wjwfzgwxsw330yqwhp880gsyx2kxj1lfyb6gs1fh7qqnh7";
|
||||
};
|
||||
};
|
||||
"for-own-1.0.0" = {
|
||||
|
@ -2119,13 +2119,13 @@ let
|
|||
sha1 = "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79";
|
||||
};
|
||||
};
|
||||
"ajv-5.5.0" = {
|
||||
"ajv-5.5.1" = {
|
||||
name = "ajv";
|
||||
packageName = "ajv";
|
||||
version = "5.5.0";
|
||||
version = "5.5.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/ajv/-/ajv-5.5.0.tgz";
|
||||
sha1 = "eb2840746e9dc48bd5e063a36e3fd400c5eab5a9";
|
||||
url = "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz";
|
||||
sha1 = "b38bb8876d9e86bee994956a04e721e88b248eb2";
|
||||
};
|
||||
};
|
||||
"har-schema-2.0.0" = {
|
||||
|
@ -4045,13 +4045,13 @@ let
|
|||
sha1 = "6373db76909fe570e08d73583365ed828a74eeeb";
|
||||
};
|
||||
};
|
||||
"commander-2.12.1" = {
|
||||
"commander-2.12.2" = {
|
||||
name = "commander";
|
||||
packageName = "commander";
|
||||
version = "2.12.1";
|
||||
version = "2.12.2";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/commander/-/commander-2.12.1.tgz";
|
||||
sha512 = "36cb2mrf9piidjbqiz8krwx7r9hikgirjxzfrbyk3hd39xpmg489lia9d3cmzci80sx99428hg960sz9j5b72fn7pi928z5289ln8rw";
|
||||
url = "https://registry.npmjs.org/commander/-/commander-2.12.2.tgz";
|
||||
sha512 = "007wb3baahjcrv17kgxryqjlsyr3c3kl2y07p85m4ia78pba9xyjr3cgi95jjrwq8qq550s78hj06f7z0ab8ssrxk6w06afjsmxln84";
|
||||
};
|
||||
};
|
||||
"is-my-json-valid-2.16.1" = {
|
||||
|
@ -4356,7 +4356,7 @@ in
|
|||
})
|
||||
];
|
||||
})
|
||||
sources."interpret-1.0.4"
|
||||
sources."interpret-1.1.0"
|
||||
(sources."liftoff-2.3.0" // {
|
||||
dependencies = [
|
||||
sources."extend-3.0.1"
|
||||
|
@ -4518,7 +4518,7 @@ in
|
|||
(sources."object.defaults-1.1.0" // {
|
||||
dependencies = [
|
||||
sources."array-each-1.0.1"
|
||||
sources."array-slice-1.0.0"
|
||||
sources."array-slice-1.1.0"
|
||||
(sources."for-own-1.0.0" // {
|
||||
dependencies = [
|
||||
sources."for-in-1.0.2"
|
||||
|
@ -4835,7 +4835,7 @@ in
|
|||
})
|
||||
(sources."har-validator-5.0.3" // {
|
||||
dependencies = [
|
||||
(sources."ajv-5.5.0" // {
|
||||
(sources."ajv-5.5.1" // {
|
||||
dependencies = [
|
||||
sources."co-4.6.0"
|
||||
sources."fast-deep-equal-1.0.0"
|
||||
|
@ -6248,7 +6248,7 @@ in
|
|||
sources."supports-color-2.0.0"
|
||||
];
|
||||
})
|
||||
sources."commander-2.12.1"
|
||||
sources."commander-2.12.2"
|
||||
(sources."is-my-json-valid-2.16.1" // {
|
||||
dependencies = [
|
||||
sources."generate-function-2.0.0"
|
||||
|
|
|
@ -80,7 +80,10 @@
|
|||
, "sloc"
|
||||
, "smartdc"
|
||||
, "socket.io"
|
||||
, "stackdriver-statsd-backend"
|
||||
, "statsd"
|
||||
, "statsd-influxdb-backend"
|
||||
, "statsd-librato-backend"
|
||||
, "stylus"
|
||||
, "svgo"
|
||||
, "tern"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,19 +1,19 @@
|
|||
{ stdenv, ocaml, findlib, fetchurl, curl, ncurses }:
|
||||
{ stdenv, pkgconfig, ocaml, findlib, fetchurl, curl, ncurses }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ocurl-0.7.8";
|
||||
name = "ocurl-0.8.0";
|
||||
src = fetchurl {
|
||||
url = "https://forge.ocamlcore.org/frs/download.php/1463/${name}.tar.bz2";
|
||||
sha256 = "0yn7f3g5wva8nqxh76adpq9rihggc405jkqysfghzwnf3yymyqrr";
|
||||
url = "http://ygrek.org.ua/p/release/ocurl/${name}.tar.gz";
|
||||
sha256 = "0292knvm9g038br0dc03lcsnbjqycyiqha256dp4bxkz3vmmz4wr";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml findlib ncurses ];
|
||||
buildInputs = [ pkgconfig ocaml findlib ncurses ];
|
||||
propagatedBuildInputs = [ curl ];
|
||||
createFindlibDestdir = true;
|
||||
meta = {
|
||||
description = "OCaml bindings to libcurl";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
homepage = http://ocurl.forge.ocamlcore.org/;
|
||||
license = stdenv.lib.licenses.mit;
|
||||
homepage = "http://ygrek.org.ua/p/ocurl/";
|
||||
maintainers = with stdenv.lib.maintainers; [ bennofs ];
|
||||
platforms = ocaml.meta.platforms or [];
|
||||
};
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "zc.buildout";
|
||||
version = "2.9.5";
|
||||
version = "2.10.0";
|
||||
name = "${pname}-nix-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "dce840ea379e2ff10bae27465778708704e0a4287cde92eb6c7961f5b0277cfa";
|
||||
sha256 = "00wi0f6wpfl2gywr02x2yqvx6i1k0ll5w4lhdl0khijk4g7mk8dq";
|
||||
};
|
||||
|
||||
patches = [ ./nix.patch ];
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices, findlib, camlp4, sedlex, ocamlbuild }:
|
||||
{ stdenv, fetchFromGitHub, lib, ocaml, libelf, cf-private, CoreServices, findlib, camlp4, sedlex, ocamlbuild, ocaml_lwt }:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.59.0";
|
||||
version = "0.60.1";
|
||||
name = "flow-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "facebook";
|
||||
repo = "flow";
|
||||
rev = "v${version}";
|
||||
sha256 = "1i47k9dg3pawwkdccb57n6882q92jsmclk5ip2y6dv5hhv4s5z49";
|
||||
sha256 = "1bi0m42qkdlljkk4lh85y8ncrn8im6mbn291b3305lf4pm0x59kd";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||
cp bin/flow $out/bin/
|
||||
'';
|
||||
|
||||
buildInputs = [ ocaml libelf findlib camlp4 sedlex ocamlbuild ]
|
||||
buildInputs = [ ocaml libelf findlib camlp4 sedlex ocamlbuild ocaml_lwt ]
|
||||
++ optionals stdenv.isDarwin [ cf-private CoreServices ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -1,65 +1,96 @@
|
|||
{ stdenv, fetchFromGitHub, curl, dmd, libevent, rsync }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dub-${version}";
|
||||
version = "1.5.0";
|
||||
let
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "dub";
|
||||
rev = "v${version}";
|
||||
sha256 = "0kmirx4ijhzirjwdqmnwqhngg38zdaydpvny2p0yj3afqgkj6vq5";
|
||||
dubBuild = stdenv.mkDerivation rec {
|
||||
name = "dubBuild-${version}";
|
||||
version = "1.6.0";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dlang";
|
||||
repo = "dub";
|
||||
rev = "v${version}";
|
||||
sha256 = "1xjr5pp263lbcd4harxy1ybh7q0kzj9iyy63ji6pn66fizrgm7zk";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# Avoid that the version file is overwritten
|
||||
substituteInPlace build.sh \
|
||||
--replace source/dub/version_.d /dev/null
|
||||
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ dmd libevent rsync ];
|
||||
buildInputs = [ curl ];
|
||||
|
||||
buildPhase = ''
|
||||
export DMD=${dmd.out}/bin/dmd
|
||||
./build.sh
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
cp bin/dub $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Package and build manager for D applications and libraries";
|
||||
homepage = http://code.dlang.org/;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ThomasMader ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
|
||||
};
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# Avoid that the version file is overwritten
|
||||
substituteInPlace build.sh \
|
||||
--replace source/dub/version_.d /dev/null
|
||||
# Need to test in a fixed-output derivation, otherwise the
|
||||
# network tests would fail if sandbox mode is enabled.
|
||||
dubUnittests = stdenv.mkDerivation rec {
|
||||
name = "dubUnittests-${version}";
|
||||
version = dubBuild.version;
|
||||
|
||||
substituteInPlace build.sh \
|
||||
--replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_
|
||||
enableParallelBuilding = dubBuild.enableParallelBuilding;
|
||||
preferLocalBuild = true;
|
||||
inputString = dubBuild.outPath;
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = builtins.hashString "sha256" inputString;
|
||||
|
||||
patchShebangs build.sh
|
||||
patchShebangs test
|
||||
src = dubBuild.src;
|
||||
|
||||
# Remove unittest which is not working for now (upstream already fixed: https://github.com/dlang/dub/issues/1224)
|
||||
rm test/interactive-remove.sh
|
||||
postPatch = dubBuild.postPatch;
|
||||
|
||||
# Fix test as long as there is no upstream solution. (see https://github.com/dlang/dub/pull/1227)
|
||||
substituteInPlace test/issue884-init-defer-file-creation.sh \
|
||||
--replace "< /dev/stdin" "<(while :; do sleep 1; done)" \
|
||||
--replace "sleep 1" ""
|
||||
'';
|
||||
nativeBuildInputs = dubBuild.nativeBuildInputs;
|
||||
buildInputs = dubBuild.buildInputs;
|
||||
|
||||
nativeBuildInputs = [ dmd libevent rsync ];
|
||||
buildInputs = [ curl ];
|
||||
|
||||
buildPhase = ''
|
||||
export DMD=${dmd.out}/bin/dmd
|
||||
./build.sh
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
export DUB=$PWD/bin/dub
|
||||
buildPhase = ''
|
||||
# Can't use dub from dubBuild directly because one unittest
|
||||
# (issue895-local-configuration) needs to generate a config
|
||||
# file under ../etc relative to the dub location.
|
||||
cp ${dubBuild}/bin/dub bin/
|
||||
export DUB=$NIX_BUILD_TOP/source/bin/dub
|
||||
export DC=${dmd.out}/bin/dmd
|
||||
export HOME=$TMP
|
||||
./test/run-unittest.sh
|
||||
'';
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
echo -n $inputString > $out
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit dubUnittests;
|
||||
name = "dub-${dubBuild.version}";
|
||||
phases = "installPhase";
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
mkdir $out/bin
|
||||
cp bin/dub $out/bin
|
||||
cp -r --symbolic-link ${dubBuild}/* $out/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Package and build manager for D applications and libraries";
|
||||
homepage = http://code.dlang.org/;
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ThomasMader ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,10 @@ stdenv.mkDerivation rec {
|
|||
--add-flags "--datadir $out/share/cataclysm-dda/"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
# https://hydra.nixos.org/build/65193254
|
||||
# src/weather_data.cpp:203:1: fatal error: opening dependency file obj/tiles/weather_data.d: No such file or directory
|
||||
# make: *** [Makefile:687: obj/tiles/weather_data.o] Error 1
|
||||
enableParallelBuilding = false;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A free, post apocalyptic, zombie infested rogue-like";
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/extractor/extractor_options.cpp b/extractor/extractor_options.cpp
|
||||
index d14d8d9..c64d7fd 100644
|
||||
--- a/extractor/extractor_options.cpp
|
||||
+++ b/extractor/extractor_options.cpp
|
||||
@@ -50,7 +50,7 @@ bool ExtractorOptions::ParseArguments(int argc, char *argv[], ExtractorConfig &e
|
||||
boost::program_options::options_description config_options("Configuration");
|
||||
config_options.add_options()("profile,p",
|
||||
boost::program_options::value<boost::filesystem::path>(
|
||||
- &extractor_config.profile_path)->default_value("profile.lua"),
|
||||
+ &extractor_config.profile_path)->default_value("@out@/profiles/car.lua"),
|
||||
"Path to LUA routing profile")(
|
||||
"threads,t",
|
||||
boost::program_options::value<unsigned int>(&extractor_config.requested_num_threads)
|
|
@ -1,15 +0,0 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -127,8 +127,9 @@ if(CMAKE_BUILD_TYPE MATCHES Release)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND
|
||||
NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0" AND NOT MINGW)
|
||||
message(STATUS "Using gcc specific binutils for LTO.")
|
||||
- set(CMAKE_AR "/usr/bin/gcc-ar")
|
||||
- set(CMAKE_RANLIB "/usr/bin/gcc-ranlib")
|
||||
+ # Just let PATH do its job
|
||||
+ set(CMAKE_AR "gcc-ar")
|
||||
+ set(CMAKE_RANLIB "gcc-ranlib")
|
||||
endif()
|
||||
endif (HAS_LTO_FLAG)
|
||||
endif()
|
|
@ -1,24 +1,17 @@
|
|||
{stdenv, fetchFromGitHub, cmake, luabind, libosmpbf, stxxl, tbb, boost, expat, protobuf, bzip2, zlib, substituteAll}:
|
||||
{stdenv, fetchFromGitHub, cmake, pkgconfig, bzip2, libxml2, libzip, boost, lua, luabind, tbb, expat}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "osrm-backend-${version}";
|
||||
version = "4.9.1";
|
||||
version = "5.14.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
owner = "Project-OSRM";
|
||||
repo = "osrm-backend";
|
||||
sha256 = "1r4dwniwxgfppnb9asdh98w5qxqwkjhp9gc5fabmck0gk73cwkcc";
|
||||
sha256 = "0n7fpm8m5r93dxciagp2n8ij1wg483yb9srbzdzjqf1zzyh637sz";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./4.5.0-gcc-binutils.patch
|
||||
(substituteAll {
|
||||
src = ./4.5.0-default-profile-path.template.patch;
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ cmake luabind libosmpbf stxxl tbb boost expat protobuf bzip2 zlib ];
|
||||
buildInputs = [ cmake pkgconfig bzip2 libxml2 libzip boost lua luabind tbb expat];
|
||||
|
||||
postInstall = "mkdir -p $out/share/osrm-backend && cp -r ../profiles $out/share/osrm-backend/profiles";
|
||||
|
||||
|
@ -26,6 +19,7 @@ stdenv.mkDerivation rec {
|
|||
homepage = https://github.com/Project-OSRM/osrm-backend/wiki;
|
||||
description = "Open Source Routing Machine computes shortest paths in a graph. It was designed to run well with map data from the Openstreetmap Project";
|
||||
license = stdenv.lib.licenses.bsd2;
|
||||
maintainers = with stdenv.lib.maintainers;[ erictapen ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "194zzp1a989k2v8qzfr81gdknr8xiz16d6fdl63jx9r3mj5klmvb";
|
||||
};
|
||||
|
||||
sourceRoot = "${name}/X11";
|
||||
# Note: don't change this to set sourceRoot, or updateAutotoolsGnuConfigScriptsHook
|
||||
# on aarch64 doesn't find the files to patch and the aarch64 build fails!
|
||||
preConfigure = "cd X11";
|
||||
|
||||
buildInputs = [ libX11 xproto libXt libICE libSM libXext ];
|
||||
|
||||
|
|
|
@ -830,10 +830,10 @@ with pkgs;
|
|||
enableSharedExecutables = false;
|
||||
executableToolDepends = [ makeWrapper ];
|
||||
postInstall = ''
|
||||
exe=$libexec/bin/${drv.pname}-${drv.version}/${drv.pname}
|
||||
install -D $bin/bin/${drv.pname} $exe
|
||||
rm -rf $bin/bin $out/lib $out/share
|
||||
makeWrapper $exe $bin/bin/${drv.pname} \
|
||||
exe=$out/libexec/${drv.pname}-${drv.version}/${drv.pname}
|
||||
install -D $out/bin/${drv.pname} $exe
|
||||
rm -rf $out/{bin,lib,share}
|
||||
makeWrapper $exe $out/bin/${drv.pname} \
|
||||
--prefix PATH ":" "${nix}/bin" \
|
||||
--prefix PATH ":" "${nix-prefetch-scripts}/bin"
|
||||
mkdir -p $out/share/{bash-completion/completions,zsh/vendor-completions,fish/completions}
|
||||
|
@ -847,7 +847,7 @@ with pkgs;
|
|||
executableToolDepends = [ makeWrapper ];
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/stack2nix \
|
||||
${lib.makeBinPath [ git cabal2nix cabal-install stack ]}
|
||||
--prefix PATH ":" "${git}/bin:${cabal2nix}/bin:${cabal-install}/bin:${stack}/bin"
|
||||
'';
|
||||
});
|
||||
|
||||
|
@ -1777,17 +1777,7 @@ with pkgs;
|
|||
|
||||
dleyna-server = callPackage ../development/libraries/dleyna-server { };
|
||||
|
||||
dmd_2_067_1 = callPackage ../development/compilers/dmd/2.067.1.nix {
|
||||
stdenv = if stdenv.hostPlatform.isDarwin then
|
||||
stdenv
|
||||
else
|
||||
# Doesn't build with gcc6 on linux
|
||||
overrideCC stdenv gcc5;
|
||||
};
|
||||
|
||||
dmd = callPackage ../development/compilers/dmd {
|
||||
bootstrapDmd = dmd_2_067_1;
|
||||
};
|
||||
dmd = callPackage ../development/compilers/dmd { };
|
||||
|
||||
dmg2img = callPackage ../tools/misc/dmg2img { };
|
||||
|
||||
|
@ -7279,7 +7269,7 @@ with pkgs;
|
|||
flow = callPackage ../development/tools/analysis/flow {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices;
|
||||
inherit (darwin) cf-private;
|
||||
inherit (ocamlPackages) ocaml findlib camlp4 sedlex ocamlbuild;
|
||||
inherit (ocamlPackages) ocaml findlib camlp4 sedlex ocamlbuild ocaml_lwt;
|
||||
};
|
||||
|
||||
framac = callPackage ../development/tools/analysis/frama-c { };
|
||||
|
|
|
@ -43,10 +43,10 @@ let
|
|||
overrideWith = newArgs: origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs);
|
||||
in
|
||||
if builtins.isAttrs ff then (ff // {
|
||||
overridePythonAttrs = newArgs: makeOverridable f (overrideWith newArgs);
|
||||
overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs);
|
||||
})
|
||||
else if builtins.isFunction ff then {
|
||||
overridePythonAttrs = newArgs: makeOverridable f (overrideWith newArgs);
|
||||
overridePythonAttrs = newArgs: makeOverridablePythonPackage f (overrideWith newArgs);
|
||||
__functor = self: ff;
|
||||
}
|
||||
else ff;
|
||||
|
|
Loading…
Reference in a new issue