Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 274e095f761b
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf669a884ca0
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Jan 27, 2020

  1. ldc: fix build and skip impure test

    Fixes #76973
    
    This moves the path configuration to a separate derivation and skips
    an impure test that depends on the current year.
    
    (cherry picked from commit 4b102f0)
    
    cc #78552
    
     Conflicts:
    	pkgs/development/compilers/ldc/default.nix
    thefloweringash authored and veprbl committed Jan 27, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cf669a8 View commit details
Showing with 10 additions and 8 deletions.
  1. +10 −8 pkgs/development/compilers/ldc/default.nix
18 changes: 10 additions & 8 deletions pkgs/development/compilers/ldc/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, cmake, ninja, llvm_5, llvm_8, curl, tzdata
, python, libconfig, lit, gdb, unzip, darwin, bash
, callPackage, makeWrapper, targetPackages
, callPackage, makeWrapper, runCommand, targetPackages
, bootstrapVersion ? false
, version ? "1.16.0"
, ldcSha256 ? "00kk6pijn1ay2kkrp6b5ismawxr10azwij89k1rkszavqq6rsva2"
@@ -18,6 +18,11 @@ let
else
"";

pathConfig = runCommand "ldc-lib-paths" {} ''
mkdir $out
echo ${tzdata}/share/zoneinfo/ > $out/TZDatabaseDirFile
echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > $out/LibcurlPathFile
'';
in

stdenv.mkDerivation rec {
@@ -42,17 +47,14 @@ stdenv.mkDerivation rec {
rm ldc-${version}-src/tests/d2/dmd-testsuite/fail_compilation/mixin_gc.d
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/xtest46_gc.d
rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/testptrref_gc.d
# test depends on current year
rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/ddocYear.d
''

+ stdenv.lib.optionalString (!bootstrapVersion && stdenv.hostPlatform.isDarwin) ''
# https://github.com/NixOS/nixpkgs/issues/34817
rm -r ldc-${version}-src/tests/plugins/addFuncEntryCall
''

+ stdenv.lib.optionalString (!bootstrapVersion) ''
echo ${tzdata}/share/zoneinfo/ > ldc-${version}-src/TZDatabaseDirFile
echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > ldc-${version}-src/LibcurlPathFile
'';

postPatch = ''
@@ -108,7 +110,7 @@ stdenv.mkDerivation rec {
buildInputs = [ curl tzdata ];

cmakeFlagsString = stdenv.lib.optionalString (!bootstrapVersion) ''
"-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J$PWD"
"-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}"
"-DCMAKE_BUILD_TYPE=Release"
'';