diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-12-05 13:04:44 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-12-05 13:07:26 +0100 |
commit | 689d6303e895687ba4813952ceb55bbf63c8ef47 (patch) | |
tree | ff2f300658083e9c7c59833f70e17f59375a6bba /pkgs/development/tools | |
parent | a9b59003600e8d4891966e079c660212651c3b55 (diff) | |
parent | fd7953d95f478c8cb0ac9db3718adb793142e31d (diff) | |
download | nixlib-689d6303e895687ba4813952ceb55bbf63c8ef47.tar nixlib-689d6303e895687ba4813952ceb55bbf63c8ef47.tar.gz nixlib-689d6303e895687ba4813952ceb55bbf63c8ef47.tar.bz2 nixlib-689d6303e895687ba4813952ceb55bbf63c8ef47.tar.lz nixlib-689d6303e895687ba4813952ceb55bbf63c8ef47.tar.xz nixlib-689d6303e895687ba4813952ceb55bbf63c8ef47.tar.zst nixlib-689d6303e895687ba4813952ceb55bbf63c8ef47.zip |
Merge branch 'master' into staging
The haskell split got reverted (again). Hydra: ?compare=1416012
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/analysis/flow/default.nix | 8 | ||||
-rw-r--r-- | pkgs/development/tools/build-managers/dub/default.nix | 121 |
2 files changed, 80 insertions, 49 deletions
diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix index 2f794c583e53..be967e1f86c8 100644 --- a/pkgs/development/tools/analysis/flow/default.nix +++ b/pkgs/development/tools/analysis/flow/default.nix @@ -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; { diff --git a/pkgs/development/tools/build-managers/dub/default.nix b/pkgs/development/tools/build-managers/dub/default.nix index 007ce5b07cde..89996b3d30dc 100644 --- a/pkgs/development/tools/build-managers/dub/default.nix +++ b/pkgs/development/tools/build-managers/dub/default.nix @@ -1,65 +1,96 @@ { stdenv, fetchFromGitHub, curl, dmd, libevent, rsync }: -stdenv.mkDerivation rec { - name = "dub-${version}"; - version = "1.5.0"; - - src = fetchFromGitHub { - owner = "dlang"; - repo = "dub"; - rev = "v${version}"; - sha256 = "0kmirx4ijhzirjwdqmnwqhngg38zdaydpvny2p0yj3afqgkj6vq5"; - }; +let - postPatch = '' - # Avoid that the version file is overwritten - substituteInPlace build.sh \ - --replace source/dub/version_.d /dev/null + dubBuild = stdenv.mkDerivation rec { + name = "dubBuild-${version}"; + version = "1.6.0"; - substituteInPlace build.sh \ - --replace MACOSX_DEPLOYMENT_TARGET MACOSX_DEPLOYMENT_TARGET_ + enableParallelBuilding = true; - patchShebangs build.sh - patchShebangs test + src = fetchFromGitHub { + owner = "dlang"; + repo = "dub"; + rev = "v${version}"; + sha256 = "1xjr5pp263lbcd4harxy1ybh7q0kzj9iyy63ji6pn66fizrgm7zk"; + }; - # Remove unittest which is not working for now (upstream already fixed: https://github.com/dlang/dub/issues/1224) - rm test/interactive-remove.sh + postPatch = '' + # Avoid that the version file is overwritten + substituteInPlace build.sh \ + --replace source/dub/version_.d /dev/null - # 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" "" - ''; + patchShebangs . + ''; - nativeBuildInputs = [ dmd libevent rsync ]; - buildInputs = [ curl ]; + nativeBuildInputs = [ dmd libevent rsync ]; + buildInputs = [ curl ]; - buildPhase = '' - export DMD=${dmd.out}/bin/dmd - ./build.sh - ''; + 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" ]; + }; + }; + + # 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; + + enableParallelBuilding = dubBuild.enableParallelBuilding; + preferLocalBuild = true; + inputString = dubBuild.outPath; + outputHashAlgo = "sha256"; + outputHash = builtins.hashString "sha256" inputString; + + src = dubBuild.src; - doCheck = false; + postPatch = dubBuild.postPatch; - checkPhase = '' - export DUB=$PWD/bin/dub + nativeBuildInputs = dubBuild.nativeBuildInputs; + buildInputs = dubBuild.buildInputs; + + 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; - }; } |