depot/third_party/nixpkgs/pkgs/by-name/dt/dtools/package.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

48 lines
951 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, ldc
, curl
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dtools";
version = "2.109.1";
src = fetchFromGitHub {
owner = "dlang";
repo = "tools";
rev = "v${finalAttrs.version}";
hash = "sha256-Pfj8Kwf5AlcrHhLs5A/0vIFWLZaNR3ro+esbs7oWN9I=";
name = "dtools";
};
patches = [
# Disable failing tests
./disabled-tests.diff
# Fix LDC arm64 build
./fix-ldc-arm64.diff
];
nativeBuildInputs = [ ldc ];
buildInputs = [ curl ];
makeFlags = [
"CC=${stdenv.cc}/bin/cc"
"DMD=${ldc.out}/bin/ldmd2"
"INSTALL_DIR=$(out)"
];
enableParallelBuilding = true;
doCheck = true;
checkTarget = "test_rdmd";
meta = with lib; {
description = "Ancillary tools for the D programming language";
homepage = "https://github.com/dlang/tools";
license = licenses.boost;
maintainers = with maintainers; [ jtbx ];
platforms = platforms.unix;
};
})