forked from mirrors/nixpkgs
pkgs/development/compilers: stdenv.lib -> lib
This commit is contained in:
parent
bbaff89ceb
commit
acc5f7b18a
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "4th";
|
||||
|
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
|
|||
"MANDIR=${placeholder "out"}/share/man"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A portable Forth compiler";
|
||||
homepage = "https://thebeez.home.xs4all.nl/4tH/index.html";
|
||||
license = licenses.lgpl3;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{stdenv, fetchurl, ant, jre, jdk}:
|
||||
{lib, stdenv, fetchurl, ant, jre, jdk}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abcl";
|
||||
version = "1.8.0";
|
||||
|
@ -31,9 +31,9 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
inherit version;
|
||||
description = "A JVM-based Common Lisp implementation";
|
||||
license = stdenv.lib.licenses.gpl3 ;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = lib.licenses.gpl3 ;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = lib.platforms.linux;
|
||||
homepage = "https://common-lisp.net/project/armedbear/";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchsvn }:
|
||||
{ lib, stdenv, fetchsvn }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "acme";
|
||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||
--replace "= gcc" "?= gcc"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A multi-platform cross assembler for 6502/6510/65816 CPUs";
|
||||
homepage = "https://sourceforge.net/projects/acme-crossass/";
|
||||
license = licenses.gpl2Plus;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
sourcePerArch:
|
||||
|
||||
{ swingSupport ? true # not used for now
|
||||
, stdenv
|
||||
, lib, stdenv
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
|
@ -43,11 +43,11 @@ let cpuName = stdenv.hostPlatform.parsed.cpu.name;
|
|||
|
||||
passthru.home = result;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
license = licenses.gpl2Classpath;
|
||||
description = "AdoptOpenJDK, prebuilt OpenJDK binary";
|
||||
platforms = [ "x86_64-darwin" ]; # some inherit jre.meta.platforms
|
||||
maintainers = with stdenv.lib.maintainers; [ taku0 ];
|
||||
maintainers = with lib.maintainers; [ taku0 ];
|
||||
};
|
||||
|
||||
}; in result
|
||||
|
|
|
@ -69,7 +69,7 @@ let result = stdenv.mkDerivation rec {
|
|||
|
||||
passthru.home = result;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
license = licenses.gpl2Classpath;
|
||||
description = "AdoptOpenJDK, prebuilt OpenJDK binary";
|
||||
platforms = lib.mapAttrsToList (arch: _: arch + "-linux") sourcePerArch; # some inherit jre.meta.platforms
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, cargo, rustc, autoreconfHook, jdk, glib, xulrunner, zip, pkg-config, npapi_sdk, bash, bc }:
|
||||
{ lib, stdenv, fetchFromGitHub, cargo, rustc, autoreconfHook, jdk, glib, xulrunner, zip, pkg-config, npapi_sdk, bash, bc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "adoptopenjdk-icedtea-web";
|
||||
|
@ -58,6 +58,6 @@ stdenv.mkDerivation rec {
|
|||
based on the NetX project.
|
||||
'';
|
||||
homepage = "https://github.com/adoptopenjdk/icedtea-web";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ fetchgit, stdenv, gmp, which, flex, bison, makeWrapper
|
||||
{ fetchgit, lib, stdenv, gmp, which, flex, bison, makeWrapper
|
||||
, autoconf, automake, libtool, jdk, perl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation {
|
|||
broken = true;
|
||||
homepage = "http://www.aldor.org/";
|
||||
description = "Programming language with an expressive type system";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
license = lib.licenses.asl20;
|
||||
|
||||
longDescription = ''
|
||||
Aldor is a programming language with an expressive type system well-suited
|
||||
|
@ -47,6 +47,6 @@ stdenv.mkDerivation {
|
|||
and powerful properties of functional, object-oriented and aspect-oriented styles.
|
||||
'';
|
||||
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{stdenv, gcc, glibc, fetchurl, fetchgit, libtool, autoconf, automake, file, gnumake, which, zsh, m4, pkg-config, perl, gnome2, gtk2, pango, sqlite, libxml2, zlib, gmp, smlnj }:
|
||||
{lib, stdenv, gcc, glibc, fetchurl, fetchgit, libtool, autoconf, automake, file, gnumake, which, zsh, m4, pkg-config, perl, gnome2, gtk2, pango, sqlite, libxml2, zlib, gmp, smlnj }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "aliceml-1.4-7d44dc8e";
|
||||
|
@ -50,8 +50,8 @@ stdenv.mkDerivation {
|
|||
programming.
|
||||
'';
|
||||
homepage = "https://www.ps.uni-saarland.de/alice/";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = [ stdenv.lib.maintainers.doublec ];
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.doublec ];
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, makeWrapper, jre }:
|
||||
{ lib, stdenv, fetchurl, makeWrapper, jre }:
|
||||
|
||||
let
|
||||
playerglobal_ver = "27.0";
|
||||
|
@ -47,7 +47,7 @@ in stdenv.mkDerivation rec {
|
|||
|
||||
fixupPhase = ":";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Flex SDK for Adobe Flash / ActionScript";
|
||||
homepage = "https://flex.apache.org/";
|
||||
license = with licenses; [ asl20 ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, icestorm }:
|
||||
{ lib, stdenv, fetchFromGitHub, icestorm }:
|
||||
|
||||
with builtins;
|
||||
|
||||
|
@ -37,8 +37,8 @@ stdenv.mkDerivation rec {
|
|||
the IceStorm [2] icepack command.
|
||||
'';
|
||||
homepage = "https://github.com/cseed/arachne-pnr";
|
||||
license = stdenv.lib.licenses.mit;
|
||||
maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ shell thoughtpolice ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, perl }:
|
||||
{ lib, stdenv, fetchurl, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "asn1c";
|
||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "http://lionet.info/asn1c/compiler.html";
|
||||
description = "Open Source ASN.1 Compiler";
|
||||
license = licenses.bsd2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{stdenv, fetchurl, jre}:
|
||||
{lib, stdenv, fetchurl, jre}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "aspectj";
|
||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
homepage = "http://www.eclipse.org/aspectj/";
|
||||
description = "A seamless aspect-oriented extension to the Java programming language";
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
license = stdenv.lib.licenses.epl10;
|
||||
platforms = lib.platforms.unix;
|
||||
license = lib.licenses.epl10;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, gmp }:
|
||||
{ lib, stdenv, fetchurl, gmp }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ats";
|
||||
|
@ -16,10 +16,10 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
description = "Functional programming language with dependent types";
|
||||
homepage = "http://www.ats-lang.org";
|
||||
license = stdenv.lib.licenses.gpl3Plus;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
# TODO: it looks like ATS requires gcc specifically. Someone with more knowledge
|
||||
# will need to experiment.
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.thoughtpolice ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, gmp
|
||||
{ lib, stdenv, fetchurl, gmp
|
||||
, withEmacsSupport ? true
|
||||
, withContrib ? true }:
|
||||
|
||||
|
@ -10,14 +10,14 @@ let
|
|||
sha256 = "184m4hz2xszhcfc6w9fw9qibhmcvgjmikwfwkb345xypr59jm93d";
|
||||
};
|
||||
|
||||
postInstallContrib = stdenv.lib.optionalString withContrib
|
||||
postInstallContrib = lib.optionalString withContrib
|
||||
''
|
||||
local contribDir=$out/lib/ats2-postiats-*/ ;
|
||||
mkdir -p $contribDir ;
|
||||
tar -xzf "${contrib}" --strip-components 1 -C $contribDir ;
|
||||
'';
|
||||
|
||||
postInstallEmacs = stdenv.lib.optionalString withEmacsSupport
|
||||
postInstallEmacs = lib.optionalString withEmacsSupport
|
||||
''
|
||||
local siteLispDir=$out/share/emacs/site-lisp/ats2 ;
|
||||
mkdir -p $siteLispDir ;
|
||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = [ gmp ];
|
||||
|
||||
setupHook = with stdenv.lib;
|
||||
setupHook = with lib;
|
||||
let
|
||||
hookFiles =
|
||||
[ ./setup-hook.sh ]
|
||||
|
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
postInstall = postInstallContrib + postInstallEmacs;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Functional programming language with dependent types";
|
||||
homepage = "http://www.ats-lang.org";
|
||||
license = licenses.gpl3Plus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, zlib, jdk, CoreServices, Foundation }:
|
||||
{ lib, stdenv, fetchFromGitHub, zlib, jdk, CoreServices, Foundation }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "avian";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
buildInputs = [ zlib jdk ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Foundation ];
|
||||
++ lib.optionals stdenv.isDarwin [ CoreServices Foundation ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
|
@ -36,8 +36,8 @@ stdenv.mkDerivation rec {
|
|||
building self-contained applications.
|
||||
'';
|
||||
homepage = "https://readytalk.github.io/avian/";
|
||||
license = stdenv.lib.licenses.isc;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
maintainers = [ stdenv.lib.maintainers.earldouglas ];
|
||||
license = lib.licenses.isc;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = [ lib.maintainers.earldouglas ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, autoconf, automake }:
|
||||
{ lib, stdenv, fetchurl, autoconf, automake }:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "avra-1.3.0";
|
||||
|
||||
|
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
|
|||
automake -a
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Assembler for the Atmel AVR microcontroller family";
|
||||
homepage = "http://avra.sourceforge.net/";
|
||||
license = licenses.gpl2Plus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ fetchurl, stdenv, autoconf, automake, libtool, gmp
|
||||
{ fetchurl, lib, stdenv, autoconf, automake, libtool, gmp
|
||||
, darwin
|
||||
}:
|
||||
|
||||
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ autoconf automake libtool ];
|
||||
|
||||
buildInputs = stdenv.lib.optional stdenv.isDarwin
|
||||
buildInputs = lib.optional stdenv.isDarwin
|
||||
darwin.apple_sdk.frameworks.ApplicationServices
|
||||
;
|
||||
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
preConfigure =
|
||||
# For libuv on darwin
|
||||
stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
lib.optionalString stdenv.isDarwin ''
|
||||
export LIBTOOLIZE=libtoolize
|
||||
'' +
|
||||
# Help libgc's configure.
|
||||
|
@ -50,9 +50,9 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
description = "Efficient Scheme compiler";
|
||||
homepage = "http://www-sop.inria.fr/indes/fp/Bigloo/";
|
||||
license = stdenv.lib.licenses.gpl2Plus;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||
|
||||
longDescription = ''
|
||||
Bigloo is a Scheme implementation devoted to one goal: enabling
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, cmake, python3, fetchFromGitHub, fetchpatch, emscripten }:
|
||||
{ lib, stdenv, cmake, python3, fetchFromGitHub, fetchpatch, emscripten }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "binaryen";
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ cmake python3 ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/WebAssembly/binaryen";
|
||||
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
|
||||
platforms = platforms.all;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, autoconf
|
||||
|
@ -97,10 +97,10 @@ in stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
description = "Toolchain for the Bluespec Hardware Definition Language";
|
||||
homepage = "https://github.com/B-Lang-org/bsc";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
# darwin fails at https://github.com/B-Lang-org/bsc/pull/35#issuecomment-583731562
|
||||
# aarch64 fails, as GHC fails with "ghc: could not execute: opt"
|
||||
maintainers = with stdenv.lib.maintainers; [ jcumming thoughtpolice ];
|
||||
maintainers = with lib.maintainers; [ jcumming thoughtpolice ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix
|
||||
# to make potential future updates simpler
|
||||
|
||||
{ stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
|
||||
{ lib, stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
|
||||
ocaml-version, version, src,
|
||||
patches ? [],
|
||||
ocaml ? (import ./ocaml.nix {
|
||||
version = ocaml-version;
|
||||
inherit stdenv;
|
||||
inherit lib stdenv;
|
||||
src = "${src}/ocaml";
|
||||
}),
|
||||
custom-ninja ? (ninja.overrideAttrs (attrs: {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
|
||||
{ lib, stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
|
||||
let
|
||||
build-bs-platform = import ./build-bs-platform.nix;
|
||||
in
|
||||
(build-bs-platform rec {
|
||||
inherit stdenv runCommand fetchFromGitHub ninja nodejs python3;
|
||||
inherit lib stdenv runCommand fetchFromGitHub ninja nodejs python3;
|
||||
version = "8.2.0";
|
||||
ocaml-version = "4.06.1";
|
||||
|
||||
|
@ -17,7 +17,7 @@ in
|
|||
fetchSubmodules = true;
|
||||
};
|
||||
}).overrideAttrs (attrs: {
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code";
|
||||
homepage = "https://bucklescript.github.io";
|
||||
license = licenses.lgpl3;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, src, version }:
|
||||
{ lib, stdenv, src, version }:
|
||||
stdenv.mkDerivation rec {
|
||||
inherit src version;
|
||||
name = "ocaml-${version}+bs";
|
||||
|
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
|||
make -j9 world.opt
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
branch = "4.06";
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, perl, coreutils }:
|
||||
{ lib, stdenv, fetchurl, perl, coreutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "berkeley_upc-2.22.0";
|
||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ coreutils ];
|
||||
buildInputs = [ perl ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A compiler for the Berkely Unified Parallel C language";
|
||||
longDescription = ''
|
||||
Unified Parallel C (UPC) is an extension of the C programming language
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, gcc }:
|
||||
{ lib, stdenv, fetchFromGitHub, gcc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cakelisp";
|
||||
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||
--replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
|
||||
substituteInPlace src/ModuleManager.cpp \
|
||||
--replace '"/usr/bin/g++"' '"${gcc}/bin/g++"'
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace Build.sh --replace '--export-dynamic' '-export_dynamic'
|
||||
substituteInPlace runtime/HotReloading.cake --replace '--export-dynamic' '-export_dynamic'
|
||||
substituteInPlace Bootstrap.cake --replace '--export-dynamic' '-export_dynamic'
|
||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||
install -Dm755 bin/cakelisp -t $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A performance-oriented Lisp-like language";
|
||||
homepage = "https://github.com/makuto/cakelisp";
|
||||
license = licenses.gpl3Plus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, makeWrapper, clang, haskellPackages }:
|
||||
{ lib, stdenv, fetchFromGitHub, makeWrapper, clang, haskellPackages }:
|
||||
|
||||
haskellPackages.mkDerivation rec {
|
||||
|
||||
|
@ -39,10 +39,10 @@ haskellPackages.mkDerivation rec {
|
|||
|
||||
description = "A statically typed lisp, without a GC, for real-time applications";
|
||||
homepage = "https://github.com/carp-lang/Carp";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = with stdenv.lib.maintainers; [ jluttine ];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ jluttine ];
|
||||
|
||||
# Windows not (yet) supported.
|
||||
platforms = with stdenv.lib.platforms; unix ++ darwin;
|
||||
platforms = with lib.platforms; unix ++ darwin;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}"];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://cc65.github.io/";
|
||||
description = "C compiler for processors of 6502 family";
|
||||
longDescription = ''
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, runCommand, bootstrap_cmds, coreutils, glibc, m4, runtimeShell }:
|
||||
{ lib, stdenv, fetchurl, runCommand, bootstrap_cmds, coreutils, glibc, m4, runtimeShell }:
|
||||
|
||||
let
|
||||
options = rec {
|
||||
|
@ -101,7 +101,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Clozure Common Lisp";
|
||||
homepage = "https://ccl.clozure.com/";
|
||||
maintainers = with maintainers; [ raskin muflax tohl ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub
|
||||
{ lib, stdenv, fetchFromGitHub
|
||||
, coreutils, cctools
|
||||
, ncurses, libiconv, libX11, libuuid
|
||||
}:
|
||||
|
@ -15,12 +15,12 @@ stdenv.mkDerivation rec {
|
|||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ coreutils ] ++ stdenv.lib.optional stdenv.isDarwin cctools;
|
||||
nativeBuildInputs = [ coreutils ] ++ lib.optional stdenv.isDarwin cctools;
|
||||
buildInputs = [ ncurses libiconv libX11 libuuid ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation";
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation";
|
||||
|
||||
/*
|
||||
** We patch out a very annoying 'feature' in ./configure, which
|
||||
|
@ -70,9 +70,9 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
description = "A powerful and incredibly fast R6RS Scheme compiler";
|
||||
homepage = "https://cisco.github.io/ChezScheme/";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice ];
|
||||
platforms = lib.platforms.unix;
|
||||
badPlatforms = [ "aarch64-linux" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, makeWrapper, darwin, bootstrap-chicken ? null }:
|
||||
{ lib, stdenv, fetchurl, makeWrapper, darwin, bootstrap-chicken ? null }:
|
||||
|
||||
let
|
||||
version = "4.13.0";
|
||||
|
@ -8,7 +8,6 @@ let
|
|||
else if (isFreeBSD || isOpenBSD) then "bsd"
|
||||
else if isSunOS then "solaris"
|
||||
else "linux"; # Should be a sane default
|
||||
lib = stdenv.lib;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "chicken";
|
||||
|
@ -70,9 +69,9 @@ stdenv.mkDerivation {
|
|||
|
||||
meta = {
|
||||
homepage = "http://www.call-cc.org/";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ corngood ];
|
||||
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; # Maybe other Unix
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ corngood ];
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin; # Maybe other Unix
|
||||
description = "A portable compiler for the Scheme programming language";
|
||||
longDescription = ''
|
||||
CHICKEN is a compiler for the Scheme programming language.
|
||||
|
|
|
@ -20,8 +20,8 @@ eggDerivation {
|
|||
meta = {
|
||||
description = "Generate nix-expression from CHICKEN scheme eggs";
|
||||
homepage = "https://github.com/the-kenny/egg2nix";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = with stdenv.lib.maintainers; [ corngood ];
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ corngood ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, chicken, makeWrapper }:
|
||||
{ lib, stdenv, chicken, makeWrapper }:
|
||||
{ name, src
|
||||
, buildInputs ? []
|
||||
, chickenInstallFlags ? []
|
||||
|
@ -8,7 +8,7 @@
|
|||
let
|
||||
libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/";
|
||||
overrides = import ./overrides.nix;
|
||||
baseName = stdenv.lib.getName name;
|
||||
baseName = lib.getName name;
|
||||
override = if builtins.hasAttr baseName overrides
|
||||
then
|
||||
builtins.getAttr baseName overrides
|
||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation ({
|
|||
propagatedBuildInputs = buildInputs;
|
||||
buildInputs = [ makeWrapper chicken ];
|
||||
|
||||
CSC_OPTIONS = stdenv.lib.concatStringsSep " " cscOptions;
|
||||
CSC_OPTIONS = lib.concatStringsSep " " cscOptions;
|
||||
|
||||
CHICKEN_REPOSITORY = libPath;
|
||||
CHICKEN_INSTALL_PREFIX = "$out";
|
||||
|
@ -28,7 +28,7 @@ stdenv.mkDerivation ({
|
|||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
chicken-install -p $out ${stdenv.lib.concatStringsSep " " chickenInstallFlags}
|
||||
chicken-install -p $out ${lib.concatStringsSep " " chickenInstallFlags}
|
||||
|
||||
for f in $out/bin/*
|
||||
do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, makeWrapper, darwin, bootstrap-chicken ? null }:
|
||||
{ lib, stdenv, fetchurl, makeWrapper, darwin, bootstrap-chicken ? null }:
|
||||
|
||||
let
|
||||
version = "5.2.0";
|
||||
|
@ -8,7 +8,6 @@ let
|
|||
else if (isFreeBSD || isOpenBSD) then "bsd"
|
||||
else if isSunOS then "solaris"
|
||||
else "linux"; # Should be a sane default
|
||||
lib = stdenv.lib;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "chicken";
|
||||
|
@ -51,9 +50,9 @@ stdenv.mkDerivation {
|
|||
|
||||
meta = {
|
||||
homepage = "http://www.call-cc.org/";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
maintainers = with stdenv.lib.maintainers; [ corngood ];
|
||||
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; # Maybe other Unix
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ corngood ];
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin; # Maybe other Unix
|
||||
description = "A portable compiler for the Scheme programming language";
|
||||
longDescription = ''
|
||||
CHICKEN is a compiler for the Scheme programming language.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, eggDerivation, fetchFromGitHub, chickenEggs }:
|
||||
{ lib, stdenv, eggDerivation, fetchFromGitHub, chickenEggs }:
|
||||
|
||||
# Note: This mostly reimplements the default.nix already contained in
|
||||
# the tarball. Is there a nicer way than duplicating code?
|
||||
|
@ -22,8 +22,8 @@ eggDerivation {
|
|||
meta = {
|
||||
description = "Generate nix-expression from CHICKEN scheme eggs";
|
||||
homepage = "https://github.com/the-kenny/egg2nix";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = with stdenv.lib.maintainers; [ corngood ];
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ corngood ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, chicken, makeWrapper }:
|
||||
{ lib, stdenv, chicken, makeWrapper }:
|
||||
{ name, src
|
||||
, buildInputs ? []
|
||||
, chickenInstallFlags ? []
|
||||
|
@ -7,7 +7,7 @@
|
|||
|
||||
let
|
||||
overrides = import ./overrides.nix;
|
||||
baseName = stdenv.lib.getName name;
|
||||
baseName = lib.getName name;
|
||||
override = if builtins.hasAttr baseName overrides
|
||||
then
|
||||
builtins.getAttr baseName overrides
|
||||
|
@ -19,14 +19,14 @@ stdenv.mkDerivation ({
|
|||
propagatedBuildInputs = buildInputs;
|
||||
buildInputs = [ makeWrapper chicken ];
|
||||
|
||||
CSC_OPTIONS = stdenv.lib.concatStringsSep " " cscOptions;
|
||||
CSC_OPTIONS = lib.concatStringsSep " " cscOptions;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
export CHICKEN_INSTALL_PREFIX=$out
|
||||
export CHICKEN_INSTALL_REPOSITORY=$out/lib/chicken/${toString chicken.binaryVersion}
|
||||
chicken-install ${stdenv.lib.concatStringsSep " " chickenInstallFlags}
|
||||
chicken-install ${lib.concatStringsSep " " chickenInstallFlags}
|
||||
|
||||
for f in $out/bin/*
|
||||
do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ciao";
|
||||
|
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
|||
./ciao-boot.sh install
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://ciao-lang.org/";
|
||||
description = "A general purpose, multi-paradigm programming language in the Prolog family";
|
||||
license = licenses.lgpl21;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, fetchFromGitLab
|
||||
{ lib, stdenv, fetchFromGitHub, fetchFromGitLab
|
||||
, llvmPackages
|
||||
, cmake, boehmgc, gmp, zlib, ncurses, boost, libelf
|
||||
, python, git, sbcl
|
||||
|
@ -72,14 +72,14 @@ stdenv.mkDerivation rec {
|
|||
|
||||
buildInputs = with llvmPackages;
|
||||
(
|
||||
builtins.map (x: stdenv.lib.overrideDerivation x
|
||||
builtins.map (x: lib.overrideDerivation x
|
||||
(x: {NIX_CFLAGS_COMPILE= (x.NIX_CFLAGS_COMPILE or "") + " -frtti"; }))
|
||||
[ llvm clang clang-unwrapped clang ]) ++
|
||||
[
|
||||
gmp zlib ncurses
|
||||
boost boehmgc libelf
|
||||
(boost.override {enableStatic = true; enableShared = false;})
|
||||
(stdenv.lib.overrideDerivation boehmgc
|
||||
(lib.overrideDerivation boehmgc
|
||||
(x: {configureFlags = (x.configureFlags or []) ++ ["--enable-static"];}))
|
||||
];
|
||||
|
||||
|
@ -120,9 +120,9 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
inherit version;
|
||||
description = "A Common Lisp implementation based on LLVM with C++ integration";
|
||||
license = stdenv.lib.licenses.lgpl21Plus ;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = lib.licenses.lgpl21Plus ;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = lib.platforms.linux;
|
||||
# Large, long to build, a private build of clang is needed, a prerelease.
|
||||
hydraPlatforms = [];
|
||||
homepage = "https://github.com/drmeister/clasp";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "clean-3.0";
|
||||
|
@ -45,8 +45,8 @@ stdenv.mkDerivation {
|
|||
'';
|
||||
|
||||
homepage = "http://wiki.clean.cs.ru.nl/Clean";
|
||||
license = stdenv.lib.licenses.lgpl21;
|
||||
maintainers = [ stdenv.lib.maintainers.kkallio ];
|
||||
license = lib.licenses.lgpl21;
|
||||
maintainers = [ lib.maintainers.kkallio ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, jre, makeWrapper }:
|
||||
{ lib, stdenv, fetchurl, jre, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "closure-compiler";
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||
--add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A tool for making JavaScript download and run faster";
|
||||
homepage = "https://developers.google.com/closure/compiler/";
|
||||
license = licenses.asl20;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, python, runtimeShell }:
|
||||
{ lib, stdenv, fetchurl, python, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "cmdstan-2.17.1";
|
||||
|
@ -36,7 +36,7 @@ stdenv.mkDerivation {
|
|||
likelihood estimation with Optimization (L-BFGS).
|
||||
'';
|
||||
homepage = "https://mc-stan.org/interfaces/cmdstan.html";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{stdenv, fetchurl}:
|
||||
{lib, stdenv, fetchurl}:
|
||||
|
||||
let
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
|
@ -36,9 +36,9 @@ stdenv.mkDerivation {
|
|||
which runs on most major Unix platforms. It mainly conforms to the
|
||||
ANSI Common Lisp standard.
|
||||
'';
|
||||
license = stdenv.lib.licenses.free; # public domain
|
||||
license = lib.licenses.free; # public domain
|
||||
homepage = "http://www.cons.org/cmucl/";
|
||||
maintainers = [stdenv.lib.maintainers.tohl];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [lib.maintainers.tohl];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, makeWrapper, gcc, asciidoc, autoreconfHook }:
|
||||
{ lib, stdenv, fetchurl, makeWrapper, gcc, asciidoc, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "colm";
|
||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
|||
--prefix PATH ":" ${gcc}/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A programming language for the analysis and transformation of computer languages";
|
||||
homepage = "http://www.colm.net/open-source/colm";
|
||||
license = licenses.gpl2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, fetchpatch, makeWrapper
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, makeWrapper
|
||||
, coqPackages, ocamlPackages, coq2html
|
||||
, tools ? stdenv.cc
|
||||
, version ? "3.8"
|
||||
|
@ -8,7 +8,7 @@ let
|
|||
ocaml-pkgs = with ocamlPackages; [ ocaml findlib menhir ];
|
||||
ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
|
||||
inherit (coqPackages) coq flocq;
|
||||
inherit (stdenv.lib) optional optionalString;
|
||||
inherit (lib) optional optionalString;
|
||||
in
|
||||
|
||||
let param = {
|
||||
|
@ -83,7 +83,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
outputs = [ "out" "lib" "doc" "man" ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Formally verified C compiler";
|
||||
homepage = "https://compcert.org";
|
||||
license = licenses.inria-compcert;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchzip
|
||||
, pkg-config
|
||||
, autoPatchelfHook
|
||||
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
|||
isClang = true;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description =
|
||||
"Accelerate Complex C++ Applications on Heterogeneous Compute Systems using Open Standards";
|
||||
homepage = "https://www.codeplay.com/products/computesuite/computecpp";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, libffi
|
||||
}:
|
||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||
installPhase = ''
|
||||
make BACKEND=elf64 install prefix=$out
|
||||
'';
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Simple imperative language, statically typed with type inference and genericity";
|
||||
homepage = "https://tibleiz.net/copper/";
|
||||
license = licenses.bsd2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, stdenv
|
||||
{ config, lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, which
|
||||
|
@ -90,7 +90,7 @@ stdenv.mkDerivation rec {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/dotnet/core/";
|
||||
description = ".NET is a general purpose development platform";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
|
|
|
@ -63,7 +63,7 @@ let
|
|||
commonBuildInputs = extraBuildInputs: [
|
||||
boehmgc libatomic_ops pcre libevent libyaml zlib libxml2 openssl
|
||||
] ++ extraBuildInputs
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
generic = (
|
||||
{ version
|
||||
|
|
|
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
|
|||
gtk2 glib fontconfig freetype unixODBC alsaLib
|
||||
];
|
||||
|
||||
rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
|
||||
rpath = "${lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
|
||||
|
||||
unpackPhase = ''
|
||||
sh $src --keep --noexec
|
||||
|
@ -232,7 +232,7 @@ stdenv.mkDerivation rec {
|
|||
majorVersion = lib.versions.majorMinor version;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A compiler for NVIDIA GPUs, math libraries, and tools";
|
||||
homepage = "https://developer.nvidia.com/cuda-toolkit";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
|
@ -27,7 +27,7 @@ stdenv.mkDerivation {
|
|||
|
||||
checkTarget = "tests";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Lisp-flavoured C";
|
||||
longDescription = ''
|
||||
Dale is a system (no GC) programming language that uses
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub }:
|
||||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dasm";
|
||||
|
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
|
|||
checkTarget = "test";
|
||||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Assembler for 6502 and other 8-bit microprocessors";
|
||||
homepage = "https://dasm-assembler.github.io";
|
||||
license = licenses.gpl2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dev86";
|
||||
|
@ -16,6 +16,6 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
description = "Linux 8086 development environment";
|
||||
homepage = "http://v3.sk/~lkundrak/dev86/";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ let
|
|||
name = "dmd.conf";
|
||||
text = (lib.generators.toINI {} {
|
||||
Environment = {
|
||||
DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${stdenv.lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"}'';
|
||||
DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"}'';
|
||||
};
|
||||
});
|
||||
};
|
||||
|
@ -77,16 +77,16 @@ stdenv.mkDerivation rec {
|
|||
postPatch = ''
|
||||
substituteInPlace dmd/test/dshell/test6952.d --replace "/usr/bin/env bash" "${bash}/bin/bash"
|
||||
''
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
substituteInPlace phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
|
||||
''
|
||||
+ stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper unzip which gdb git ]
|
||||
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Foundation
|
||||
]);
|
||||
|
||||
|
@ -163,7 +163,7 @@ stdenv.mkDerivation rec {
|
|||
substitute ${dmdConfFile} "$out/bin/dmd.conf" --subst-var out
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Official reference compiler for the D language";
|
||||
homepage = "http://dlang.org/";
|
||||
# Everything is now Boost licensed, even the backend.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
}:
|
||||
|
||||
assert builtins.elem type [ "aspnetcore" "netcore" "sdk"];
|
||||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, libunwind
|
||||
, openssl
|
||||
|
@ -41,7 +41,7 @@ let
|
|||
in stdenv.mkDerivation rec {
|
||||
inherit pname version;
|
||||
|
||||
rpath = stdenv.lib.makeLibraryPath [
|
||||
rpath = lib.makeLibraryPath [
|
||||
curl
|
||||
icu
|
||||
libunwind
|
||||
|
@ -70,7 +70,7 @@ in stdenv.mkDerivation rec {
|
|||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = stdenv.lib.optionalString stdenv.isLinux ''
|
||||
postFixup = lib.optionalString stdenv.isLinux ''
|
||||
patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $out/dotnet
|
||||
patchelf --set-rpath "${rpath}" $out/dotnet
|
||||
find $out -type f -name "*.so" -exec patchelf --set-rpath '$ORIGIN:${rpath}' {} \;
|
||||
|
@ -82,7 +82,7 @@ in stdenv.mkDerivation rec {
|
|||
$out/bin/dotnet --info
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://dotnet.github.io/";
|
||||
description = builtins.getAttr type descriptions;
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, fetchpatch
|
||||
{ lib, stdenv, fetchurl, fetchpatch
|
||||
, libtool, autoconf, automake
|
||||
, gmp, mpfr, libffi, makeWrapper
|
||||
, noUnicode ? false
|
||||
|
@ -23,7 +23,7 @@ let
|
|||
];
|
||||
propagatedBuildInputs = [
|
||||
libffi gmp mpfr gcc
|
||||
] ++ stdenv.lib.optionals useBoehmgc [
|
||||
] ++ lib.optionals useBoehmgc [
|
||||
# replaces ecl's own gc which other packages can depend on, thus propagated
|
||||
boehmgc
|
||||
];
|
||||
|
@ -42,7 +42,7 @@ stdenv.mkDerivation {
|
|||
"--with-libffi-prefix=${libffi.dev}"
|
||||
]
|
||||
++
|
||||
(stdenv.lib.optional (! noUnicode)
|
||||
(lib.optional (! noUnicode)
|
||||
"--enable-unicode")
|
||||
;
|
||||
|
||||
|
@ -77,8 +77,8 @@ stdenv.mkDerivation {
|
|||
meta = {
|
||||
inherit (s) version;
|
||||
description = "Lisp implementation aiming to be small, fast and easy to embed";
|
||||
license = stdenv.lib.licenses.mit ;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
license = lib.licenses.mit ;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{stdenv, fetchurl
|
||||
{lib, stdenv, fetchurl
|
||||
, libtool, autoconf, automake
|
||||
, texinfo
|
||||
, gmp, mpfr, libffi, makeWrapper
|
||||
|
@ -22,7 +22,7 @@ let
|
|||
propagatedBuildInputs = [
|
||||
libffi gmp mpfr gcc
|
||||
# replaces ecl's own gc which other packages can depend on, thus propagated
|
||||
] ++ stdenv.lib.optionals useBoehmgc [
|
||||
] ++ lib.optionals useBoehmgc [
|
||||
# replaces ecl's own gc which other packages can depend on, thus propagated
|
||||
boehmgc
|
||||
];
|
||||
|
@ -76,7 +76,7 @@ stdenv.mkDerivation {
|
|||
"--with-libffi-prefix=${libffi.dev}"
|
||||
]
|
||||
++
|
||||
(stdenv.lib.optional (! noUnicode)
|
||||
(lib.optional (! noUnicode)
|
||||
"--enable-unicode")
|
||||
;
|
||||
|
||||
|
@ -94,8 +94,8 @@ stdenv.mkDerivation {
|
|||
inherit (s) version;
|
||||
description = "Lisp implementation aiming to be small, fast and easy to embed";
|
||||
homepage = "https://common-lisp.net/project/ecl/";
|
||||
license = stdenv.lib.licenses.mit ;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = lib.licenses.mit ;
|
||||
maintainers = [lib.maintainers.raskin];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, symlinkJoin
|
||||
, makeWrapper
|
||||
|
@ -84,8 +84,8 @@ stdenv.mkDerivation rec {
|
|||
arbitrary special cases. Output is the C subset of C++.
|
||||
'';
|
||||
homepage = "http://eli-project.sourceforge.net/";
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = with stdenv.lib.maintainers; [ timokau ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
license = lib.licenses.gpl2;
|
||||
maintainers = with lib.maintainers; [ timokau ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ let
|
|||
|
||||
elm-test = patchBinwrap [elmi-to-json]
|
||||
nodePkgs.elm-test // {
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Runs elm-test suites from Node.js";
|
||||
homepage = "https://github.com/rtfeldman/node-test-runner";
|
||||
license = licenses.bsd3;
|
||||
|
@ -128,7 +128,7 @@ let
|
|||
|
||||
elm-verify-examples = patchBinwrap [elmi-to-json]
|
||||
nodePkgs.elm-verify-examples // {
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Verify examples in your docs";
|
||||
homepage = "https://github.com/stoeffel/elm-verify-examples";
|
||||
license = licenses.bsd3;
|
||||
|
@ -153,7 +153,7 @@ let
|
|||
mkdir -p unpacked_bin
|
||||
ln -sf ${elm-instrument}/bin/elm-instrument unpacked_bin/elm-instrument
|
||||
'';
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Work in progress - Code coverage tooling for Elm";
|
||||
homepage = "https://github.com/zwilias/elm-coverage";
|
||||
license = licenses.bsd3;
|
||||
|
@ -163,7 +163,7 @@ let
|
|||
|
||||
create-elm-app = patchNpmElm (patchBinwrap [elmi-to-json]
|
||||
nodePkgs.create-elm-app) // {
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Create Elm apps with no build configuration";
|
||||
homepage = "https://github.com/halfzebra/create-elm-app";
|
||||
license = licenses.mit;
|
||||
|
@ -173,7 +173,7 @@ let
|
|||
|
||||
elm-review = patchBinwrap [elmRustPackages.elm-json]
|
||||
nodePkgs.elm-review // {
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Analyzes Elm projects, to help find mistakes before your users find them";
|
||||
homepage = "https://package.elm-lang.org/packages/jfmengels/elm-review/${nodePkgs.elm-review.version}";
|
||||
license = licenses.bsd3;
|
||||
|
@ -182,7 +182,7 @@ let
|
|||
};
|
||||
|
||||
elm-language-server = nodePkgs."@elm-tooling/elm-language-server" // {
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Language server implementation for Elm";
|
||||
homepage = "https://github.com/elm-tooling/elm-language-server";
|
||||
license = licenses.mit;
|
||||
|
@ -191,7 +191,7 @@ let
|
|||
};
|
||||
|
||||
elm-optimize-level-2 = nodePkgs."elm-optimize-level-2" // {
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "A second level of optimization for the Javascript that the Elm Compiler produces";
|
||||
homepage = "https://github.com/mdgriffith/elm-optimize-level-2";
|
||||
license = licenses.bsd3;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ mkDerivation, fetchgit, ansi-terminal, ansi-wl-pprint, array, base, binary
|
||||
, bytestring, cmark, containers, directory, filepath, free, HUnit
|
||||
, indents, json, mtl, optparse-applicative, parsec, process
|
||||
, QuickCheck, quickcheck-io, split, stdenv, tasty, tasty-golden
|
||||
, QuickCheck, quickcheck-io, split, lib, stdenv, tasty, tasty-golden
|
||||
, tasty-hunit, tasty-quickcheck, text
|
||||
}:
|
||||
mkDerivation {
|
||||
|
@ -36,5 +36,5 @@ mkDerivation {
|
|||
doHaddock = false;
|
||||
homepage = "https://elm-lang.org";
|
||||
description = "A source code formatter for Elm";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
, bytestring, Cabal, cmark, containers, directory, elm-format
|
||||
, fetchgit, filepath, free, HUnit, indents, json, mtl
|
||||
, optparse-applicative, parsec, process, QuickCheck, quickcheck-io
|
||||
, split, stdenv, tasty, tasty-golden, tasty-hunit, tasty-quickcheck
|
||||
, split, lib, stdenv, tasty, tasty-golden, tasty-hunit, tasty-quickcheck
|
||||
, text
|
||||
}:
|
||||
mkDerivation {
|
||||
|
@ -30,5 +30,5 @@ mkDerivation {
|
|||
];
|
||||
homepage = "https://elm-lang.org";
|
||||
description = "Instrumentation library for Elm";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
, file-embed, filelock, filepath, ghc-prim, haskeline, HTTP
|
||||
, http-client, http-client-tls, http-types, language-glsl, mtl
|
||||
, network, parsec, process, raw-strings-qq, scientific, SHA
|
||||
, snap-core, snap-server, stdenv, template-haskell, time
|
||||
, snap-core, snap-server, lib, stdenv, template-haskell, time
|
||||
, unordered-containers, utf8-string, vector, zip-archive
|
||||
}:
|
||||
mkDerivation {
|
||||
|
@ -27,5 +27,5 @@ mkDerivation {
|
|||
];
|
||||
homepage = "https://elm-lang.org";
|
||||
description = "The `elm` command line interface";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ mkDerivation, aeson, base, binary, bytestring, containers
|
||||
, directory, fetchgit, filepath, ghc-prim, hpack
|
||||
, optparse-applicative, stdenv, text, unliftio
|
||||
, optparse-applicative, lib, stdenv, text, unliftio
|
||||
, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
|
@ -23,5 +23,5 @@ mkDerivation {
|
|||
testHaskellDepends = [ base ];
|
||||
prePatch = "hpack";
|
||||
homepage = "https://github.com/stoeffel/elmi-to-json#readme";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ mkDerivation, base, concatenative, mtl, parsec, stdenv }:
|
||||
{ mkDerivation, base, concatenative, mtl, parsec, lib, stdenv }:
|
||||
mkDerivation {
|
||||
pname = "indents";
|
||||
version = "0.3.3";
|
||||
|
@ -7,5 +7,5 @@ mkDerivation {
|
|||
doCheck = false;
|
||||
homepage = "http://patch-tag.com/r/salazar/indents";
|
||||
description = "indentation sensitive parser-combinators for parsec";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, python3, nodejs, closurecompiler
|
||||
{ lib, stdenv, fetchFromGitHub, python3, nodejs, closurecompiler
|
||||
, jre, binaryen
|
||||
, llvmPackages_11
|
||||
, symlinkJoin, makeWrapper
|
||||
|
@ -101,7 +101,7 @@ stdenv.mkDerivation rec {
|
|||
popd
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/emscripten-core/emscripten";
|
||||
description = "An LLVM-to-JavaScript Compiler";
|
||||
platforms = platforms.all;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }:
|
||||
{ lib, stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = src.rev;
|
||||
|
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
|
|||
ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Embedded Qt Lisp (ECL+Qt)";
|
||||
maintainers = with maintainers; [ raskin ];
|
||||
platforms = platforms.linux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, glib, git,
|
||||
{ lib, stdenv, fetchurl, glib, git,
|
||||
rlwrap, curl, pkg-config, perl, makeWrapper, tzdata, ncurses,
|
||||
pango, cairo, gtk2, gdk-pixbuf, gtkglext,
|
||||
mesa, xorg, openssl, unzip }:
|
||||
|
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
|
|||
# out of known libraries. The side effect is that find-lib
|
||||
# will work only on the known libraries. There does not seem
|
||||
# to be a generic solution here.
|
||||
find $(echo ${stdenv.lib.makeLibraryPath (with xorg; [
|
||||
find $(echo ${lib.makeLibraryPath (with xorg; [
|
||||
glib libX11 pango cairo gtk2 gdk-pixbuf gtkglext
|
||||
mesa libXmu libXt libICE libSM ])} | sed -e 's#:# #g') -name \*.so.\* > $TMPDIR/so.lst
|
||||
|
||||
|
@ -68,7 +68,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
cp ./factor $out/bin
|
||||
wrapProgram $out/bin/factor --prefix LD_LIBRARY_PATH : \
|
||||
"${stdenv.lib.makeLibraryPath (with xorg; [ glib
|
||||
"${lib.makeLibraryPath (with xorg; [ glib
|
||||
libX11 pango cairo gtk2 gdk-pixbuf gtkglext
|
||||
mesa libXmu libXt libICE libSM openssl])}"
|
||||
|
||||
|
@ -93,7 +93,7 @@ stdenv.mkDerivation rec {
|
|||
cp misc/fuel/*.el $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "https://factorcode.org";
|
||||
license = licenses.bsd2;
|
||||
description = "A concatenative, stack-based programming language";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchzip
|
||||
}:
|
||||
|
||||
|
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
|
|||
cp docs/*.txt $doc/share/doc/fasmg
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "x86(-64) macro assembler to binary, MZ, PE, COFF, and ELF";
|
||||
homepage = "https://flatassembler.net";
|
||||
license = licenses.bsd3;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchzip, unzip, bison, flex, gperf, zlib }:
|
||||
{ lib, stdenv, fetchzip, unzip, bison, flex, gperf, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "flasm";
|
||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
|||
install -Dm755 flasm -t $out/bin
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Assembler and disassembler for Flash (SWF) bytecode";
|
||||
homepage = "http://flasm.sourceforge.net/";
|
||||
license = licenses.bsd2;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
, coreutils
|
||||
, git
|
||||
, runCommand
|
||||
, stdenv
|
||||
, lib, stdenv
|
||||
, fetchurl
|
||||
, alsaLib
|
||||
, dbus
|
||||
|
@ -137,7 +137,7 @@ runCommand drvName
|
|||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
passthru = { unwrapped = flutter; };
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Flutter is Google's SDK for building mobile, web and desktop with Dart";
|
||||
longDescription = ''
|
||||
Flutter is Google’s UI toolkit for building beautiful,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, gawk }:
|
||||
{ lib, stdenv, fetchurl, gawk }:
|
||||
|
||||
let startFPC = import ./binary.nix { inherit stdenv fetchurl; }; in
|
||||
|
||||
|
@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
|||
bootstrap = startFPC;
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Free Pascal Compiler from a source distribution";
|
||||
homepage = "https://www.freepascal.org";
|
||||
maintainers = [ maintainers.raskin ];
|
||||
|
|
|
@ -97,7 +97,7 @@ stdenv.mkDerivation rec {
|
|||
--prefix PATH ':' "${lib.makeBinPath [ fpc gdb gnumake binutils ]}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Graphical IDE for the FreePascal language";
|
||||
homepage = "https://www.lazarus.freepascal.org";
|
||||
license = licenses.gpl2Plus ;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Temporarily avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
|
||||
|
||||
{ stdenv, fetchurl, mono, pkg-config, dotnetbuildhelpers, autoconf, automake, which }:
|
||||
{ lib, stdenv, fetchurl, mono, pkg-config, dotnetbuildhelpers, autoconf, automake, which }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fsharp";
|
||||
|
@ -41,8 +41,8 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
description = "A functional CLI language";
|
||||
homepage = "https://fsharp.org/";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
|
||||
platforms = with stdenv.lib.platforms; unix;
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice raskin ];
|
||||
platforms = with lib.platforms; unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Temporaririly avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
|
||||
|
||||
{ stdenv, fetchurl, pkg-config, autoconf, automake, which, mono, msbuild, dotnetbuildhelpers, dotnetPackages }:
|
||||
{ lib, stdenv, fetchurl, pkg-config, autoconf, automake, which, mono, msbuild, dotnetbuildhelpers, dotnetPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fsharp";
|
||||
|
@ -119,8 +119,8 @@ EOF
|
|||
meta = {
|
||||
description = "A functional CLI language";
|
||||
homepage = "https://fsharp.org/";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
|
||||
platforms = with stdenv.lib.platforms; unix;
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ thoughtpolice raskin ];
|
||||
platforms = with lib.platforms; unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles }:
|
||||
{ lib, stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fstar";
|
||||
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
|||
installShellCompletion --zsh --name _fstar.exe .completion/zsh/__fstar.exe
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "ML-like functional programming language aimed at program verification";
|
||||
homepage = "https://www.fstar-lang.org";
|
||||
license = licenses.asl20;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ stdenv, fetchzip, fpc , lang ? "en" } :
|
||||
assert stdenv.lib.assertOneOf "lang" lang ["cn" "de" "en" "fr" "tr"];
|
||||
{ lib, stdenv, fetchzip, fpc , lang ? "en" } :
|
||||
assert lib.assertOneOf "lang" lang ["cn" "de" "en" "fr" "tr"];
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gavrasm";
|
||||
version = "4.5";
|
||||
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||
cp LiesMich.Txt $out/doc
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
homepage = "http://www.avr-asm-tutorial.net/gavrasm";
|
||||
description = "AVR Assembler for ATMEL AVR-Processors";
|
||||
license = licenses.unfree;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
|
@ -39,11 +39,11 @@ stdenv.mkDerivation rec {
|
|||
find $out -type f | while read f; do
|
||||
patchelf "$f" > /dev/null 2>&1 || continue
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
|
@ -37,11 +37,11 @@ stdenv.mkDerivation rec {
|
|||
find $out -type f | while read f; do
|
||||
patchelf "$f" > /dev/null 2>&1 || continue
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
|
@ -37,11 +37,11 @@ stdenv.mkDerivation rec {
|
|||
find $out -type f | while read f; do
|
||||
patchelf "$f" > /dev/null 2>&1 || continue
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
|
@ -37,11 +37,11 @@ stdenv.mkDerivation rec {
|
|||
find $out -type f | while read f; do
|
||||
patchelf "$f" > /dev/null 2>&1 || continue
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, ncurses5
|
||||
, python27
|
||||
|
@ -39,11 +39,11 @@ stdenv.mkDerivation rec {
|
|||
find $out -type f | while read f; do
|
||||
patchelf "$f" > /dev/null 2>&1 || continue
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
|
||||
patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
|
||||
homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
|
||||
license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
{ lib, stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langAda ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
|
@ -48,7 +48,7 @@ assert langAda -> gnatboot != null;
|
|||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "10";
|
||||
|
@ -90,7 +90,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
inherit patches;
|
||||
|
||||
outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
|
||||
outputs = [ "out" "man" "info" ] ++ lib.optional (!langJit) "lib";
|
||||
setOutputFlags = false;
|
||||
NIX_NO_SELF_RPATH = true;
|
||||
|
||||
|
@ -100,7 +100,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
|
@ -134,13 +134,13 @@ stdenv.mkDerivation ({
|
|||
-e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
|
||||
done
|
||||
''
|
||||
+ stdenv.lib.optionalString (targetPlatform.libc == "musl")
|
||||
+ lib.optionalString (targetPlatform.libc == "musl")
|
||||
''
|
||||
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||
''
|
||||
)
|
||||
else "")
|
||||
+ stdenv.lib.optionalString targetPlatform.isAvr ''
|
||||
+ lib.optionalString targetPlatform.isAvr ''
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=false'
|
||||
)
|
||||
|
@ -177,20 +177,21 @@ stdenv.mkDerivation ({
|
|||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit lib;
|
||||
inherit version hostPlatform gnatboot langAda langGo;
|
||||
};
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags = import ../common/configure-flags.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
targetPackages
|
||||
crossStageStatic libcCross
|
||||
|
@ -262,7 +263,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
meta = {
|
||||
homepage = "https://gcc.gnu.org/";
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}"
|
||||
+ (if stripped then "" else " (with debugging info)");
|
||||
|
||||
|
@ -275,13 +276,13 @@ stdenv.mkDerivation ({
|
|||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ synthetica ];
|
||||
maintainers = with lib.maintainers; [ synthetica ];
|
||||
|
||||
platforms =
|
||||
stdenv.lib.platforms.linux ++
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
lib.platforms.linux ++
|
||||
lib.platforms.freebsd ++
|
||||
lib.platforms.illumos ++
|
||||
lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
{ lib, stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
|
@ -58,7 +58,7 @@ assert langGo -> langCC;
|
|||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "4";
|
||||
|
@ -190,17 +190,18 @@ stdenv.mkDerivation ({
|
|||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit lib;
|
||||
inherit version hostPlatform langJava langGo;
|
||||
};
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags = import ../common/configure-flags.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
targetPackages
|
||||
crossStageStatic libcCross
|
||||
|
@ -289,7 +290,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
meta = {
|
||||
homepage = "https://gcc.gnu.org/";
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}"
|
||||
+ (if stripped then "" else " (with debugging info)");
|
||||
|
||||
|
@ -302,13 +303,13 @@ stdenv.mkDerivation ({
|
|||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ peti veprbl ];
|
||||
maintainers = with lib.maintainers; [ peti veprbl ];
|
||||
|
||||
platforms =
|
||||
stdenv.lib.platforms.linux ++
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
lib.platforms.linux ++
|
||||
lib.platforms.freebsd ++
|
||||
lib.platforms.illumos ++
|
||||
lib.platforms.darwin;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
{ lib, stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
|
@ -58,7 +58,7 @@ assert langGo -> langCC;
|
|||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "4";
|
||||
|
@ -203,17 +203,18 @@ stdenv.mkDerivation ({
|
|||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit lib;
|
||||
inherit version hostPlatform langJava langGo;
|
||||
};
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags = import ../common/configure-flags.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
targetPackages
|
||||
crossStageStatic libcCross
|
||||
|
@ -301,7 +302,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
meta = {
|
||||
homepage = "https://gcc.gnu.org/";
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}"
|
||||
+ (if stripped then "" else " (with debugging info)");
|
||||
|
||||
|
@ -314,13 +315,13 @@ stdenv.mkDerivation ({
|
|||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ peti veprbl ];
|
||||
maintainers = with lib.maintainers; [ peti veprbl ];
|
||||
|
||||
platforms =
|
||||
stdenv.lib.platforms.linux ++
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
lib.platforms.linux ++
|
||||
lib.platforms.freebsd ++
|
||||
lib.platforms.illumos ++
|
||||
lib.platforms.darwin;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, targetPackages, fetchurl, fetchpatch, fetchFromGitHub, noSysDirs
|
||||
{ lib, stdenv, targetPackages, fetchurl, fetchpatch, fetchFromGitHub, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langAda ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
|
@ -61,7 +61,7 @@ assert langAda -> gnatboot != null;
|
|||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "6";
|
||||
|
@ -148,7 +148,7 @@ stdenv.mkDerivation ({
|
|||
prePatch =
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
stdenv.lib.optionalString hostPlatform.isDarwin ''
|
||||
lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
|
@ -177,7 +177,7 @@ stdenv.mkDerivation ({
|
|||
-e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
|
||||
done
|
||||
''
|
||||
+ stdenv.lib.optionalString (targetPlatform.libc == "musl")
|
||||
+ lib.optionalString (targetPlatform.libc == "musl")
|
||||
''
|
||||
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||
''
|
||||
|
@ -219,20 +219,21 @@ stdenv.mkDerivation ({
|
|||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit lib;
|
||||
inherit version hostPlatform gnatboot langJava langAda langGo;
|
||||
};
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags = import ../common/configure-flags.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
targetPackages
|
||||
crossStageStatic libcCross
|
||||
|
@ -320,7 +321,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
meta = {
|
||||
homepage = "https://gcc.gnu.org/";
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}"
|
||||
+ (if stripped then "" else " (with debugging info)");
|
||||
|
||||
|
@ -333,13 +334,13 @@ stdenv.mkDerivation ({
|
|||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ peti ];
|
||||
maintainers = with lib.maintainers; [ peti ];
|
||||
|
||||
platforms =
|
||||
stdenv.lib.platforms.linux ++
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
lib.platforms.linux ++
|
||||
lib.platforms.freebsd ++
|
||||
lib.platforms.illumos ++
|
||||
lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
{ lib, stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
|
@ -45,7 +45,7 @@ assert langGo -> langCC;
|
|||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "7";
|
||||
|
@ -97,7 +97,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
inherit patches;
|
||||
|
||||
outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
|
||||
outputs = [ "out" "man" "info" ] ++ lib.optional (!langJit) "lib";
|
||||
setOutputFlags = false;
|
||||
NIX_NO_SELF_RPATH = true;
|
||||
|
||||
|
@ -107,7 +107,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
|
@ -141,13 +141,13 @@ stdenv.mkDerivation ({
|
|||
-e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
|
||||
done
|
||||
''
|
||||
+ stdenv.lib.optionalString (targetPlatform.libc == "musl")
|
||||
+ lib.optionalString (targetPlatform.libc == "musl")
|
||||
''
|
||||
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||
''
|
||||
)
|
||||
else "")
|
||||
+ stdenv.lib.optionalString targetPlatform.isAvr ''
|
||||
+ lib.optionalString targetPlatform.isAvr ''
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=false'
|
||||
)
|
||||
|
@ -183,21 +183,22 @@ stdenv.mkDerivation ({
|
|||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
|
||||
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit lib;
|
||||
inherit version hostPlatform langGo;
|
||||
};
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags = import ../common/configure-flags.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
targetPackages
|
||||
crossStageStatic libcCross
|
||||
|
@ -272,7 +273,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
meta = {
|
||||
homepage = "https://gcc.gnu.org/";
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}"
|
||||
+ (if stripped then "" else " (with debugging info)");
|
||||
|
||||
|
@ -285,13 +286,13 @@ stdenv.mkDerivation ({
|
|||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ ];
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
|
||||
platforms =
|
||||
stdenv.lib.platforms.linux ++
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
lib.platforms.linux ++
|
||||
lib.platforms.freebsd ++
|
||||
lib.platforms.illumos ++
|
||||
lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
{ lib, stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
, langObjCpp ? stdenv.targetPlatform.isDarwin
|
||||
|
@ -45,7 +45,7 @@ assert langGo -> langCC;
|
|||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "8";
|
||||
|
@ -87,7 +87,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
inherit patches;
|
||||
|
||||
outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
|
||||
outputs = [ "out" "man" "info" ] ++ lib.optional (!langJit) "lib";
|
||||
setOutputFlags = false;
|
||||
NIX_NO_SELF_RPATH = true;
|
||||
|
||||
|
@ -97,7 +97,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
|
@ -131,13 +131,13 @@ stdenv.mkDerivation ({
|
|||
-e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
|
||||
done
|
||||
''
|
||||
+ stdenv.lib.optionalString (targetPlatform.libc == "musl")
|
||||
+ lib.optionalString (targetPlatform.libc == "musl")
|
||||
''
|
||||
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||
''
|
||||
)
|
||||
else "")
|
||||
+ stdenv.lib.optionalString targetPlatform.isAvr ''
|
||||
+ lib.optionalString targetPlatform.isAvr ''
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=false'
|
||||
)
|
||||
|
@ -173,20 +173,21 @@ stdenv.mkDerivation ({
|
|||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit lib;
|
||||
inherit version hostPlatform langGo;
|
||||
};
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags = import ../common/configure-flags.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
targetPackages
|
||||
crossStageStatic libcCross
|
||||
|
@ -257,7 +258,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
meta = {
|
||||
homepage = "https://gcc.gnu.org/";
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}"
|
||||
+ (if stripped then "" else " (with debugging info)");
|
||||
|
||||
|
@ -270,13 +271,13 @@ stdenv.mkDerivation ({
|
|||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ synthetica ];
|
||||
maintainers = with lib.maintainers; [ synthetica ];
|
||||
|
||||
platforms =
|
||||
stdenv.lib.platforms.linux ++
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
lib.platforms.linux ++
|
||||
lib.platforms.freebsd ++
|
||||
lib.platforms.illumos ++
|
||||
lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
{ lib, stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, langAda ? false
|
||||
, langObjC ? stdenv.targetPlatform.isDarwin
|
||||
|
@ -54,7 +54,7 @@ assert langAda -> gnatboot != null;
|
|||
# threadsCross is just for MinGW
|
||||
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
|
||||
|
||||
with stdenv.lib;
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let majorVersion = "9";
|
||||
|
@ -103,7 +103,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
inherit patches;
|
||||
|
||||
outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
|
||||
outputs = [ "out" "man" "info" ] ++ lib.optional (!langJit) "lib";
|
||||
setOutputFlags = false;
|
||||
NIX_NO_SELF_RPATH = true;
|
||||
|
||||
|
@ -113,7 +113,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
# This should kill all the stdinc frameworks that gcc and friends like to
|
||||
# insert into default search paths.
|
||||
prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
|
||||
prePatch = lib.optionalString hostPlatform.isDarwin ''
|
||||
substituteInPlace gcc/config/darwin-c.c \
|
||||
--replace 'if (stdinc)' 'if (0)'
|
||||
|
||||
|
@ -147,13 +147,13 @@ stdenv.mkDerivation ({
|
|||
-e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
|
||||
done
|
||||
''
|
||||
+ stdenv.lib.optionalString (targetPlatform.libc == "musl")
|
||||
+ lib.optionalString (targetPlatform.libc == "musl")
|
||||
''
|
||||
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||
''
|
||||
)
|
||||
else "")
|
||||
+ stdenv.lib.optionalString targetPlatform.isAvr ''
|
||||
+ lib.optionalString targetPlatform.isAvr ''
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=false'
|
||||
)
|
||||
|
@ -190,20 +190,21 @@ stdenv.mkDerivation ({
|
|||
|
||||
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
NIX_LDFLAGS = lib.optionalString hostPlatform.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = import ../common/pre-configure.nix {
|
||||
inherit (stdenv) lib;
|
||||
inherit lib;
|
||||
inherit version hostPlatform gnatboot langAda langGo langJit;
|
||||
};
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
configurePlatforms = [ "build" "host" ] ++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
configureFlags = import ../common/configure-flags.nix {
|
||||
inherit
|
||||
lib
|
||||
stdenv
|
||||
targetPackages
|
||||
crossStageStatic libcCross
|
||||
|
@ -276,7 +277,7 @@ stdenv.mkDerivation ({
|
|||
|
||||
meta = {
|
||||
homepage = "https://gcc.gnu.org/";
|
||||
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
|
||||
description = "GNU Compiler Collection, version ${version}"
|
||||
+ (if stripped then "" else " (with debugging info)");
|
||||
|
||||
|
@ -289,13 +290,13 @@ stdenv.mkDerivation ({
|
|||
compiler used in the GNU system including the GNU/Linux variant.
|
||||
'';
|
||||
|
||||
maintainers = with stdenv.lib.maintainers; [ synthetica ];
|
||||
maintainers = with lib.maintainers; [ synthetica ];
|
||||
|
||||
platforms =
|
||||
stdenv.lib.platforms.linux ++
|
||||
stdenv.lib.platforms.freebsd ++
|
||||
stdenv.lib.platforms.illumos ++
|
||||
stdenv.lib.platforms.darwin;
|
||||
lib.platforms.linux ++
|
||||
lib.platforms.freebsd ++
|
||||
lib.platforms.illumos ++
|
||||
lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, targetPackages
|
||||
|
||||
, crossStageStatic, libcCross
|
||||
|
@ -24,8 +24,8 @@
|
|||
, langJit
|
||||
}:
|
||||
|
||||
assert cloog != null -> stdenv.lib.versionOlder version "5";
|
||||
assert langJava -> stdenv.lib.versionOlder version "7";
|
||||
assert cloog != null -> lib.versionOlder version "5";
|
||||
assert langJava -> lib.versionOlder version "7";
|
||||
|
||||
# Note [Windows Exception Handling]
|
||||
# sjlj (short jump long jump) exception handling makes no sense on x86_64,
|
||||
|
@ -171,7 +171,7 @@ let
|
|||
++ lib.optional javaAwtGtk "--enable-java-awt=gtk"
|
||||
++ lib.optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}"
|
||||
|
||||
++ (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; })
|
||||
++ (import ../common/platform-flags.nix { inherit (stdenv) targetPlatform; inherit lib; })
|
||||
++ lib.optionals (targetPlatform != hostPlatform) crossConfigureFlags
|
||||
++ lib.optional (targetPlatform != hostPlatform) "--disable-bootstrap"
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ in
|
|||
EXTRA_FLAGS_FOR_TARGET = let
|
||||
mkFlags = dep: langD: lib.optionals (targetPlatform != hostPlatform && dep != null && !langD) ([
|
||||
"-O2 -idirafter ${lib.getDev dep}${dep.incdir or "/include"}"
|
||||
] ++ stdenv.lib.optionals (! crossStageStatic) [
|
||||
] ++ lib.optionals (! crossStageStatic) [
|
||||
"-B${lib.getLib dep}${dep.libdir or "/lib"}"
|
||||
]);
|
||||
in mkFlags libcCross langD
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchgit, mpfr, m4, binutils, emacs, zlib, which
|
||||
{ lib, stdenv, fetchgit, mpfr, m4, binutils, emacs, zlib, which
|
||||
, texinfo, libX11, xorgproto, libXi, gmp, readline, strace
|
||||
, libXext, libXt, libXaw, libXmu } :
|
||||
|
||||
|
@ -45,7 +45,7 @@ stdenv.mkDerivation {
|
|||
|
||||
meta = {
|
||||
description = "GNU Common Lisp compiler working via GCC";
|
||||
maintainers = [ stdenv.lib.maintainers.raskin ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.raskin ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, mpfr, m4, binutils, emacs, zlib, which
|
||||
{ lib, stdenv, fetchurl, mpfr, m4, binutils, emacs, zlib, which
|
||||
, texinfo, libX11, xorgproto, libXi, gmp
|
||||
, libXext, libXt, libXaw, libXmu } :
|
||||
|
||||
|
@ -42,7 +42,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
NIX_CFLAGS_COMPILE = "-fgnu89-inline";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "GNU Common Lisp compiler working via GCC";
|
||||
maintainers = [ maintainers.raskin ];
|
||||
license = licenses.gpl2;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, m4 }:
|
||||
{ lib, stdenv, fetchurl, m4 }:
|
||||
|
||||
let
|
||||
version = "0.7.3";
|
||||
|
@ -13,7 +13,7 @@ stdenv.mkDerivation {
|
|||
|
||||
buildInputs = [ m4 ];
|
||||
|
||||
configureFlags = stdenv.lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
|
||||
configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/emacs/site-lisp
|
||||
|
@ -23,7 +23,7 @@ stdenv.mkDerivation {
|
|||
meta = {
|
||||
description = "The Forth implementation of the GNU project";
|
||||
homepage = "https://www.gnu.org/software/gforth/";
|
||||
license = stdenv.lib.licenses.gpl3;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
license = lib.licenses.gpl3;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgsBuildTarget, targetPackages
|
||||
{ lib, stdenv, pkgsBuildTarget, targetPackages
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
(if useLLVM then "perf-cross" else "perf-cross-ncg")
|
||||
|
||||
, # Whether to disable the large address space allocator
|
||||
|
@ -51,7 +51,7 @@ let
|
|||
inherit (bootPkgs) ghc;
|
||||
|
||||
# TODO(@Ericson2314) Make unconditional
|
||||
targetPrefix = stdenv.lib.optionalString
|
||||
targetPrefix = lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
|
||||
|
@ -69,32 +69,32 @@ let
|
|||
# to actually link to our new Libc. The iOS simulator is a special
|
||||
# exception because we can’t actually run simulators binaries
|
||||
# ourselves.
|
||||
+ stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
+ lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_SPHINX_HTML = NO
|
||||
BUILD_SPHINX_PDF = NO
|
||||
'' + stdenv.lib.optionalString dontStrip ''
|
||||
'' + lib.optionalString dontStrip ''
|
||||
STRIP_CMD = :
|
||||
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||
'' + lib.optionalString enableRelocatedStaticLibs ''
|
||||
GhcLibHcOpts += -fPIC
|
||||
GhcRtsHcOpts += -fPIC
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
EXTRA_CC_OPTS += -std=gnu99
|
||||
'';
|
||||
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
||||
libDeps = platform: lib.optional enableTerminfo ncurses
|
||||
++ [libffi]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ lib.optional (!enableIntegerSimple) gmp
|
||||
++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
] ++ lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
|
||||
targetCC = builtins.head toolsForTarget;
|
||||
|
||||
|
@ -128,7 +128,7 @@ stdenv.mkDerivation (rec {
|
|||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -138,13 +138,13 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
echo -n "${buildMK dontStrip}" > mk/build.mk
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||
'' + lib.optionalString targetPlatform.isMusl ''
|
||||
echo "patching llvm-targets for musl targets..."
|
||||
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||
|
@ -164,29 +164,29 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ]
|
||||
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
] ++ stdenv.lib.optionals (libffi != null) [
|
||||
] ++ lib.optionals (libffi != null) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
|
||||
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
|
||||
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
"--with-iconv-includes=${libiconv}/include"
|
||||
"--with-iconv-libraries=${libiconv}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||
] ++ lib.optionals (targetPlatform != hostPlatform) [
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++ stdenv.lib.optionals useLdGold [
|
||||
] ++ lib.optionals useLdGold [
|
||||
"CFLAGS=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
|
@ -207,18 +207,18 @@ stdenv.mkDerivation (rec {
|
|||
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
|
||||
|
||||
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
|
||||
++ lib.optional useLLVM llvmPackages.llvm;
|
||||
|
||||
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
|
||||
depsTargetTarget = map lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
|
||||
postInstall = ''
|
||||
# Install the bash completion file.
|
||||
|
@ -228,7 +228,7 @@ stdenv.mkDerivation (rec {
|
|||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
@ -245,14 +245,14 @@ stdenv.mkDerivation (rec {
|
|||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||
maintainers = with lib.maintainers; [ marcweber andres peti ];
|
||||
timeout = 24 * 3600;
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);
|
||||
|
||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
|
||||
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
|
||||
dontPatchELF = true;
|
||||
noAuditTmpdir = true;
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl, perl, gcc
|
||||
, ncurses6, gmp, glibc, libiconv, numactl
|
||||
, llvmPackages
|
||||
|
@ -16,12 +16,12 @@ assert stdenv.targetPlatform == stdenv.hostPlatform;
|
|||
let
|
||||
useLLVM = !stdenv.targetPlatform.isx86;
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath ([
|
||||
libPath = lib.makeLibraryPath ([
|
||||
ncurses6 gmp
|
||||
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv
|
||||
++ stdenv.lib.optional (stdenv.hostPlatform.isAarch64) numactl);
|
||||
] ++ lib.optional (stdenv.hostPlatform.isDarwin) libiconv
|
||||
++ lib.optional (stdenv.hostPlatform.isAarch64) numactl);
|
||||
|
||||
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
|
||||
libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY"
|
||||
+ "LD_LIBRARY_PATH";
|
||||
|
||||
glibcDynLinker = assert stdenv.isLinux;
|
||||
|
@ -29,7 +29,7 @@ let
|
|||
# Could be stdenv.cc.bintools.dynamicLinker, keeping as-is to avoid rebuild.
|
||||
''"$(cat $NIX_CC/nix-support/dynamic-linker)"''
|
||||
else
|
||||
"${stdenv.lib.getLib glibc}/lib/ld-linux*";
|
||||
"${lib.getLib glibc}/lib/ld-linux*";
|
||||
|
||||
in
|
||||
|
||||
|
@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
|
|||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
propagatedBuildInputs = stdenv.lib.optionals useLLVM [ llvmPackages.llvm ];
|
||||
propagatedBuildInputs = lib.optionals useLLVM [ llvmPackages.llvm ];
|
||||
|
||||
# Cannot patchelf beforehand due to relative RPATHs that anticipate
|
||||
# the final install location/
|
||||
|
@ -73,7 +73,7 @@ stdenv.mkDerivation rec {
|
|||
postUnpack =
|
||||
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
||||
# during linking
|
||||
stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
for exe in $(find . -type f -executable); do
|
||||
|
@ -92,20 +92,20 @@ stdenv.mkDerivation rec {
|
|||
''
|
||||
find . -name integer-gmp.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
find . -name base.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
|
||||
'' +
|
||||
# aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
|
||||
# FFI_LIB_DIR is a good indication of places it must be needed.
|
||||
stdenv.lib.optionalString stdenv.hostPlatform.isAarch64 ''
|
||||
lib.optionalString stdenv.hostPlatform.isAarch64 ''
|
||||
find . -name package.conf.in \
|
||||
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
|
||||
'' +
|
||||
# Rename needed libraries and binaries, fix interpreter
|
||||
stdenv.lib.optionalString stdenv.isLinux ''
|
||||
lib.optionalString stdenv.isLinux ''
|
||||
find . -type f -perm -0100 -exec patchelf \
|
||||
--replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.6 libncurses.so \
|
||||
--replace-needed libncurses${lib.optionalString stdenv.is64bit "w"}.so.6 libncurses.so \
|
||||
--interpreter ${glibcDynLinker} {} \;
|
||||
|
||||
sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
|
||||
|
@ -117,21 +117,21 @@ stdenv.mkDerivation rec {
|
|||
# (`__strdup` is defined to be an alias of `strdup` anyway[1]).
|
||||
# [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
|
||||
# Use objcopy magic to make the change:
|
||||
stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
|
||||
'';
|
||||
|
||||
# fix for `configure: error: Your linker is affected by binutils #16177`
|
||||
preConfigure = stdenv.lib.optionalString
|
||||
preConfigure = lib.optionalString
|
||||
stdenv.targetPlatform.isAarch32
|
||||
"LD=ld.gold";
|
||||
|
||||
configurePlatforms = [ ];
|
||||
configureFlags = [
|
||||
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
|
||||
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
|
||||
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
|
||||
"--with-gmp-libraries=${lib.getLib gmp}/lib"
|
||||
"--with-gmp-includes=${lib.getDev gmp}/include"
|
||||
] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
|
||||
++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
|
||||
|
||||
# No building is necessary, but calling make without flags ironically
|
||||
# calls install-strip ...
|
||||
|
@ -139,7 +139,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
postFixup = stdenv.lib.optionalString stdenv.isLinux
|
||||
postFixup = lib.optionalString stdenv.isLinux
|
||||
(if stdenv.hostPlatform.isAarch64 then
|
||||
# Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs
|
||||
# are 2 directories deep from $out/lib, so pooling symlinks there makes
|
||||
|
@ -167,7 +167,7 @@ stdenv.mkDerivation rec {
|
|||
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
|
||||
fi
|
||||
done
|
||||
'') + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'') + lib.optionalString stdenv.isDarwin ''
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
for exe in $(find "$out" -type f -executable); do
|
||||
isScript $exe && continue
|
||||
|
@ -179,7 +179,7 @@ stdenv.mkDerivation rec {
|
|||
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
|
||||
done
|
||||
'' +
|
||||
stdenv.lib.optionalString minimal ''
|
||||
lib.optionalString minimal ''
|
||||
# Remove profiling files
|
||||
find $out -type f -name '*.p_o' -delete
|
||||
find $out -type f -name '*.p_hi' -delete
|
||||
|
@ -215,8 +215,8 @@ stdenv.mkDerivation rec {
|
|||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = ["x86_64-linux" "armv7l-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
|
||||
maintainers = with stdenv.lib.maintainers; [ lostnet ];
|
||||
maintainers = with lib.maintainers; [ lostnet ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgsBuildTarget, targetPackages
|
||||
{ lib, stdenv, pkgsBuildTarget, targetPackages
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
(if useLLVM then "perf-cross" else "perf-cross-ncg")
|
||||
|
||||
, # Whether to disable the large address space allocator
|
||||
|
@ -51,7 +51,7 @@ let
|
|||
inherit (bootPkgs) ghc;
|
||||
|
||||
# TODO(@Ericson2314) Make unconditional
|
||||
targetPrefix = stdenv.lib.optionalString
|
||||
targetPrefix = lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
|
||||
|
@ -62,30 +62,30 @@ let
|
|||
endif
|
||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
|
||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
'' + lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_SPHINX_HTML = NO
|
||||
BUILD_SPHINX_PDF = NO
|
||||
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||
'' + lib.optionalString enableRelocatedStaticLibs ''
|
||||
GhcLibHcOpts += -fPIC
|
||||
GhcRtsHcOpts += -fPIC
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
EXTRA_CC_OPTS += -std=gnu99
|
||||
'';
|
||||
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
||||
libDeps = platform: lib.optional enableTerminfo ncurses
|
||||
++ [libffi]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ lib.optional (!enableIntegerSimple) gmp
|
||||
++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
] ++ lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
|
||||
targetCC = builtins.head toolsForTarget;
|
||||
|
||||
|
@ -110,7 +110,7 @@ stdenv.mkDerivation (rec {
|
|||
# https://gitlab.haskell.org/ghc/ghc/-/issues/18549
|
||||
patches = [
|
||||
./issue-18549.patch
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# Make Block.h compile with c++ compilers. Remove with the next release
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/97d0b0a367e4c6a52a17c3299439ac7de129da24.patch";
|
||||
|
@ -130,7 +130,7 @@ stdenv.mkDerivation (rec {
|
|||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -140,13 +140,13 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
echo -n "${buildMK}" > mk/build.mk
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||
'' + lib.optionalString targetPlatform.isMusl ''
|
||||
echo "patching llvm-targets for musl targets..."
|
||||
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||
|
@ -166,29 +166,29 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ]
|
||||
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
] ++ stdenv.lib.optionals (libffi != null) [
|
||||
] ++ lib.optionals (libffi != null) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
|
||||
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
|
||||
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
"--with-iconv-includes=${libiconv}/include"
|
||||
"--with-iconv-libraries=${libiconv}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||
] ++ lib.optionals (targetPlatform != hostPlatform) [
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++ stdenv.lib.optionals useLdGold [
|
||||
] ++ lib.optionals useLdGold [
|
||||
"CFLAGS=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
|
@ -209,18 +209,18 @@ stdenv.mkDerivation (rec {
|
|||
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
|
||||
|
||||
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
|
||||
++ lib.optional useLLVM llvmPackages.llvm;
|
||||
|
||||
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
|
||||
depsTargetTarget = map lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
|
||||
postInstall = ''
|
||||
# Install the bash completion file.
|
||||
|
@ -230,7 +230,7 @@ stdenv.mkDerivation (rec {
|
|||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
@ -247,12 +247,12 @@ stdenv.mkDerivation (rec {
|
|||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||
maintainers = with lib.maintainers; [ marcweber andres peti ];
|
||||
timeout = 24 * 3600;
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
noAuditTmpdir = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgsBuildTarget, targetPackages
|
||||
{ lib, stdenv, pkgsBuildTarget, targetPackages
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
(if useLLVM then "perf-cross" else "perf-cross-ncg")
|
||||
|
||||
, # Whether to disable the large address space allocator
|
||||
|
@ -51,7 +51,7 @@ let
|
|||
inherit (bootPkgs) ghc;
|
||||
|
||||
# TODO(@Ericson2314) Make unconditional
|
||||
targetPrefix = stdenv.lib.optionalString
|
||||
targetPrefix = lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
|
||||
|
@ -62,30 +62,30 @@ let
|
|||
endif
|
||||
DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
|
||||
INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
|
||||
'' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
'' + lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_SPHINX_HTML = NO
|
||||
BUILD_SPHINX_PDF = NO
|
||||
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||
'' + lib.optionalString enableRelocatedStaticLibs ''
|
||||
GhcLibHcOpts += -fPIC
|
||||
GhcRtsHcOpts += -fPIC
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
EXTRA_CC_OPTS += -std=gnu99
|
||||
'';
|
||||
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
||||
libDeps = platform: lib.optional enableTerminfo ncurses
|
||||
++ [libffi]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ lib.optional (!enableIntegerSimple) gmp
|
||||
++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
] ++ lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
|
||||
targetCC = builtins.head toolsForTarget;
|
||||
|
||||
|
@ -107,7 +107,7 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
outputs = [ "out" "doc" ];
|
||||
|
||||
patches = stdenv.lib.optionals stdenv.isDarwin [
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
# Make Block.h compile with c++ compilers. Remove with the next release
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/97d0b0a367e4c6a52a17c3299439ac7de129da24.patch";
|
||||
|
@ -127,7 +127,7 @@ stdenv.mkDerivation (rec {
|
|||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -137,13 +137,13 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
echo -n "${buildMK}" > mk/build.mk
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||
'' + lib.optionalString targetPlatform.isMusl ''
|
||||
echo "patching llvm-targets for musl targets..."
|
||||
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||
|
@ -163,29 +163,29 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ]
|
||||
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
] ++ stdenv.lib.optionals (libffi != null) [
|
||||
] ++ lib.optionals (libffi != null) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
|
||||
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
|
||||
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
"--with-iconv-includes=${libiconv}/include"
|
||||
"--with-iconv-libraries=${libiconv}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||
] ++ lib.optionals (targetPlatform != hostPlatform) [
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++ stdenv.lib.optionals useLdGold [
|
||||
] ++ lib.optionals useLdGold [
|
||||
"CFLAGS=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
|
@ -206,18 +206,18 @@ stdenv.mkDerivation (rec {
|
|||
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
|
||||
|
||||
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
|
||||
++ lib.optional useLLVM llvmPackages.llvm;
|
||||
|
||||
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
|
||||
depsTargetTarget = map lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
|
||||
postInstall = ''
|
||||
# Install the bash completion file.
|
||||
|
@ -227,7 +227,7 @@ stdenv.mkDerivation (rec {
|
|||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
@ -244,12 +244,12 @@ stdenv.mkDerivation (rec {
|
|||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||
maintainers = with lib.maintainers; [ marcweber andres peti ];
|
||||
timeout = 24 * 3600;
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
noAuditTmpdir = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, substituteAll
|
||||
{ lib, stdenv, substituteAll
|
||||
, fetchurl, perl, gcc, llvm
|
||||
, ncurses5, gmp, glibc, libiconv
|
||||
, llvmPackages
|
||||
|
@ -10,11 +10,11 @@ assert stdenv.targetPlatform == stdenv.hostPlatform;
|
|||
let
|
||||
useLLVM = !stdenv.targetPlatform.isx86;
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath ([
|
||||
libPath = lib.makeLibraryPath ([
|
||||
ncurses5 gmp
|
||||
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
|
||||
] ++ lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
|
||||
|
||||
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
|
||||
libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY"
|
||||
+ "LD_LIBRARY_PATH";
|
||||
|
||||
glibcDynLinker = assert stdenv.isLinux;
|
||||
|
@ -22,7 +22,7 @@ let
|
|||
# Could be stdenv.cc.bintools.dynamicLinker, keeping as-is to avoid rebuild.
|
||||
''"$(cat $NIX_CC/nix-support/dynamic-linker)"''
|
||||
else
|
||||
"${stdenv.lib.getLib glibc}/lib/ld-linux*";
|
||||
"${lib.getLib glibc}/lib/ld-linux*";
|
||||
|
||||
in
|
||||
|
||||
|
@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
|
|||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
propagatedBuildInputs = stdenv.lib.optionals useLLVM [ llvmPackages.llvm ];
|
||||
propagatedBuildInputs = lib.optionals useLLVM [ llvmPackages.llvm ];
|
||||
|
||||
# Cannot patchelf beforehand due to relative RPATHs that anticipate
|
||||
# the final install location/
|
||||
|
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
|
|||
postUnpack =
|
||||
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
||||
# during linking
|
||||
stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
for exe in $(find . -type f -executable); do
|
||||
|
@ -97,14 +97,14 @@ stdenv.mkDerivation rec {
|
|||
''
|
||||
find . -name integer-gmp.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
find . -name base.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
|
||||
'' +
|
||||
# Rename needed libraries and binaries, fix interpreter
|
||||
stdenv.lib.optionalString stdenv.isLinux ''
|
||||
lib.optionalString stdenv.isLinux ''
|
||||
find . -type f -perm -0100 -exec patchelf \
|
||||
--replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
|
||||
--replace-needed libncurses${lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
|
||||
--replace-needed libtinfo.so libtinfo.so.5 \
|
||||
--interpreter ${glibcDynLinker} {} \;
|
||||
|
||||
|
@ -117,7 +117,7 @@ stdenv.mkDerivation rec {
|
|||
# (`__strdup` is defined to be an alias of `strdup` anyway[1]).
|
||||
# [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
|
||||
# Use objcopy magic to make the change:
|
||||
stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
|
||||
'';
|
||||
|
||||
|
@ -130,10 +130,10 @@ stdenv.mkDerivation rec {
|
|||
src = ./gcc-clang-wrapper.sh;
|
||||
};
|
||||
in
|
||||
[ "--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
|
||||
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
|
||||
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${gcc-clang-wrapper}"
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
|
||||
[ "--with-gmp-libraries=${lib.getLib gmp}/lib"
|
||||
"--with-gmp-includes=${lib.getDev gmp}/include"
|
||||
] ++ lib.optional stdenv.isDarwin "--with-gcc=${gcc-clang-wrapper}"
|
||||
++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
|
||||
|
||||
# Stripping combined with patchelf breaks the executables (they die
|
||||
# with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
|
||||
|
@ -145,14 +145,14 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
preFixup = stdenv.lib.optionalString stdenv.isLinux ''
|
||||
preFixup = lib.optionalString stdenv.isLinux ''
|
||||
for p in $(find "$out" -type f -executable); do
|
||||
if isELF "$p"; then
|
||||
echo "Patchelfing $p"
|
||||
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
|
||||
fi
|
||||
done
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
for exe in $(find "$out" -type f -executable); do
|
||||
isScript $exe && continue
|
||||
|
@ -186,6 +186,6 @@ stdenv.mkDerivation rec {
|
|||
enableShared = true;
|
||||
};
|
||||
|
||||
meta.license = stdenv.lib.licenses.bsd3;
|
||||
meta.license = lib.licenses.bsd3;
|
||||
meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin" "armv7l-linux" "aarch64-linux"];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv
|
||||
{ lib, stdenv
|
||||
, fetchurl, perl, gcc
|
||||
, ncurses5, ncurses6, gmp, glibc, libiconv
|
||||
, llvmPackages
|
||||
|
@ -14,11 +14,11 @@ let
|
|||
|
||||
ourNcurses = if useNcurses6 then ncurses6 else ncurses5;
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath ([
|
||||
libPath = lib.makeLibraryPath ([
|
||||
ourNcurses gmp
|
||||
] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
|
||||
] ++ lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
|
||||
|
||||
libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
|
||||
libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY"
|
||||
+ "LD_LIBRARY_PATH";
|
||||
|
||||
glibcDynLinker = assert stdenv.isLinux;
|
||||
|
@ -26,7 +26,7 @@ let
|
|||
# Could be stdenv.cc.bintools.dynamicLinker, keeping as-is to avoid rebuild.
|
||||
''"$(cat $NIX_CC/nix-support/dynamic-linker)"''
|
||||
else
|
||||
"${stdenv.lib.getLib glibc}/lib/ld-linux*";
|
||||
"${lib.getLib glibc}/lib/ld-linux*";
|
||||
|
||||
in
|
||||
|
||||
|
@ -61,7 +61,7 @@ stdenv.mkDerivation rec {
|
|||
or (throw "cannot bootstrap GHC on this platform"));
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
propagatedBuildInputs = stdenv.lib.optionals useLLVM [ llvmPackages.llvm ];
|
||||
propagatedBuildInputs = lib.optionals useLLVM [ llvmPackages.llvm ];
|
||||
|
||||
# Cannot patchelf beforehand due to relative RPATHs that anticipate
|
||||
# the final install location/
|
||||
|
@ -70,7 +70,7 @@ stdenv.mkDerivation rec {
|
|||
postUnpack =
|
||||
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
|
||||
# during linking
|
||||
stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
for exe in $(find . -type f -executable); do
|
||||
|
@ -90,17 +90,17 @@ stdenv.mkDerivation rec {
|
|||
''
|
||||
find . -name integer-gmp.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
find . -name base.buildinfo \
|
||||
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
|
||||
'' +
|
||||
# Rename needed libraries and binaries, fix interpreter
|
||||
stdenv.lib.optionalString stdenv.isLinux ''
|
||||
lib.optionalString stdenv.isLinux ''
|
||||
find . -type f -perm -0100 \
|
||||
-exec patchelf \
|
||||
--replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
|
||||
--replace-needed libncurses${lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
|
||||
${ # This isn't required for x86_64-linux where we use ncurses6
|
||||
stdenv.lib.optionalString (!useNcurses6) "--replace-needed libtinfo.so libtinfo.so.5"
|
||||
lib.optionalString (!useNcurses6) "--replace-needed libtinfo.so libtinfo.so.5"
|
||||
} \
|
||||
--interpreter ${glibcDynLinker} {} \;
|
||||
|
||||
|
@ -113,16 +113,16 @@ stdenv.mkDerivation rec {
|
|||
# (`__strdup` is defined to be an alias of `strdup` anyway[1]).
|
||||
# [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
|
||||
# Use objcopy magic to make the change:
|
||||
stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
|
||||
'';
|
||||
|
||||
configurePlatforms = [ ];
|
||||
configureFlags = [
|
||||
"--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
|
||||
"--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
|
||||
] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
|
||||
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
|
||||
"--with-gmp-libraries=${lib.getLib gmp}/lib"
|
||||
"--with-gmp-includes=${lib.getDev gmp}/include"
|
||||
] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
|
||||
++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
|
||||
|
||||
# No building is necessary, but calling make without flags ironically
|
||||
# calls install-strip ...
|
||||
|
@ -130,14 +130,14 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# On Linux, use patchelf to modify the executables so that they can
|
||||
# find editline/gmp.
|
||||
postFixup = stdenv.lib.optionalString stdenv.isLinux ''
|
||||
postFixup = lib.optionalString stdenv.isLinux ''
|
||||
for p in $(find "$out" -type f -executable); do
|
||||
if isELF "$p"; then
|
||||
echo "Patchelfing $p"
|
||||
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
|
||||
fi
|
||||
done
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# not enough room in the object files for the full path to libiconv :(
|
||||
for exe in $(find "$out" -type f -executable); do
|
||||
isScript $exe && continue
|
||||
|
@ -171,6 +171,6 @@ stdenv.mkDerivation rec {
|
|||
enableShared = true;
|
||||
};
|
||||
|
||||
meta.license = stdenv.lib.licenses.bsd3;
|
||||
meta.license = lib.licenses.bsd3;
|
||||
meta.platforms = ["x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgsBuildTarget, targetPackages
|
||||
{ lib, stdenv, pkgsBuildTarget, targetPackages
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
(if useLLVM then "perf-cross" else "perf-cross-ncg")
|
||||
|
||||
, # Whether to disable the large address space allocator
|
||||
|
@ -48,7 +48,7 @@ let
|
|||
inherit (bootPkgs) ghc;
|
||||
|
||||
# TODO(@Ericson2314) Make unconditional
|
||||
targetPrefix = stdenv.lib.optionalString
|
||||
targetPrefix = lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
|
||||
|
@ -66,28 +66,28 @@ let
|
|||
# to actually link to our new Libc. The iOS simulator is a special
|
||||
# exception because we can’t actually run simulators binaries
|
||||
# ourselves.
|
||||
+ stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
+ lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_SPHINX_HTML = NO
|
||||
BUILD_SPHINX_PDF = NO
|
||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||
'' + lib.optionalString enableRelocatedStaticLibs ''
|
||||
GhcLibHcOpts += -fPIC
|
||||
GhcRtsHcOpts += -fPIC
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
EXTRA_CC_OPTS += -std=gnu99
|
||||
'';
|
||||
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
||||
libDeps = platform: lib.optional enableTerminfo ncurses
|
||||
++ [libffi]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ lib.optional (!enableIntegerSimple) gmp
|
||||
++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
] ++ lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
|
||||
targetCC = builtins.head toolsForTarget;
|
||||
|
||||
|
@ -136,7 +136,7 @@ stdenv.mkDerivation (rec {
|
|||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -146,13 +146,13 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
echo -n "${buildMK}" > mk/build.mk
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||
'' + lib.optionalString targetPlatform.isMusl ''
|
||||
echo "patching llvm-targets for musl targets..."
|
||||
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||
|
@ -172,23 +172,23 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ]
|
||||
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetPackages.libffi.dev}/include" "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
] ++ lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetPackages.libffi.dev}/include" "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
"--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||
] ++ lib.optionals (targetPlatform != hostPlatform) [
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++ stdenv.lib.optionals useLdGold [
|
||||
] ++ lib.optionals useLdGold [
|
||||
"CFLAGS=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
|
@ -209,14 +209,14 @@ stdenv.mkDerivation (rec {
|
|||
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
|
||||
|
||||
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
|
||||
++ lib.optional useLLVM llvmPackages.llvm;
|
||||
|
||||
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
|
||||
depsTargetTarget = map lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
# See #63511 - the only unstripped file is the debug rts which isn't meant to
|
||||
# be stripped.
|
||||
|
@ -224,7 +224,7 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
checkTarget = "test";
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
|
||||
postInstall = ''
|
||||
# Install the bash completion file.
|
||||
|
@ -234,11 +234,11 @@ stdenv.mkDerivation (rec {
|
|||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
''
|
||||
# Temporary work-around for https://github.com/NixOS/nixpkgs/issues/66277
|
||||
+ stdenv.lib.optionalString hostPlatform.isAarch64 ''
|
||||
+ lib.optionalString hostPlatform.isAarch64 ''
|
||||
rm -rf "$doc/share/doc/ghc/html/libraries"
|
||||
'';
|
||||
|
||||
|
@ -255,12 +255,12 @@ stdenv.mkDerivation (rec {
|
|||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||
maintainers = with lib.maintainers; [ marcweber andres peti ];
|
||||
timeout = 24 * 3600;
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
noAuditTmpdir = true;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgsBuildTarget, targetPackages
|
||||
{ lib, stdenv, pkgsBuildTarget, targetPackages
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
(if useLLVM then "perf-cross" else "perf-cross-ncg")
|
||||
|
||||
, # Whether to disable the large address space allocator
|
||||
|
@ -48,7 +48,7 @@ let
|
|||
inherit (bootPkgs) ghc;
|
||||
|
||||
# TODO(@Ericson2314) Make unconditional
|
||||
targetPrefix = stdenv.lib.optionalString
|
||||
targetPrefix = lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
|
||||
|
@ -66,30 +66,30 @@ let
|
|||
# to actually link to our new Libc. The iOS simulator is a special
|
||||
# exception because we can’t actually run simulators binaries
|
||||
# ourselves.
|
||||
+ stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
+ lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_SPHINX_HTML = NO
|
||||
BUILD_SPHINX_PDF = NO
|
||||
'' + stdenv.lib.optionalString dontStrip ''
|
||||
'' + lib.optionalString dontStrip ''
|
||||
STRIP_CMD = :
|
||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||
'' + lib.optionalString enableRelocatedStaticLibs ''
|
||||
GhcLibHcOpts += -fPIC
|
||||
GhcRtsHcOpts += -fPIC
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
EXTRA_CC_OPTS += -std=gnu99
|
||||
'';
|
||||
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
||||
libDeps = platform: lib.optional enableTerminfo ncurses
|
||||
++ [libffi]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ lib.optional (!enableIntegerSimple) gmp
|
||||
++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
] ++ lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
|
||||
targetCC = builtins.head toolsForTarget;
|
||||
|
||||
|
@ -123,7 +123,7 @@ stdenv.mkDerivation (rec {
|
|||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -133,13 +133,13 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
echo -n "${buildMK dontStrip}" > mk/build.mk
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||
'' + lib.optionalString targetPlatform.isMusl ''
|
||||
echo "patching llvm-targets for musl targets..."
|
||||
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||
|
@ -159,29 +159,29 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ]
|
||||
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
] ++ stdenv.lib.optionals (libffi != null) [
|
||||
] ++ lib.optionals (libffi != null) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
|
||||
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
|
||||
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
"--with-iconv-includes=${libiconv}/include"
|
||||
"--with-iconv-libraries=${libiconv}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||
] ++ lib.optionals (targetPlatform != hostPlatform) [
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++ stdenv.lib.optionals useLdGold [
|
||||
] ++ lib.optionals useLdGold [
|
||||
"CFLAGS=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
|
@ -202,18 +202,18 @@ stdenv.mkDerivation (rec {
|
|||
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
|
||||
|
||||
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
|
||||
++ lib.optional useLLVM llvmPackages.llvm;
|
||||
|
||||
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
|
||||
depsTargetTarget = map lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
|
||||
postInstall = ''
|
||||
# Install the bash completion file.
|
||||
|
@ -223,7 +223,7 @@ stdenv.mkDerivation (rec {
|
|||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
@ -240,14 +240,14 @@ stdenv.mkDerivation (rec {
|
|||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||
maintainers = with lib.maintainers; [ marcweber andres peti ];
|
||||
timeout = 24 * 3600;
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);
|
||||
|
||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
|
||||
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
|
||||
dontPatchELF = true;
|
||||
noAuditTmpdir = true;
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgsBuildTarget, targetPackages
|
||||
{ lib, stdenv, pkgsBuildTarget, targetPackages
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
(if useLLVM then "perf-cross" else "perf-cross-ncg")
|
||||
|
||||
, # Whether to disable the large address space allocator
|
||||
|
@ -51,7 +51,7 @@ let
|
|||
inherit (bootPkgs) ghc;
|
||||
|
||||
# TODO(@Ericson2314) Make unconditional
|
||||
targetPrefix = stdenv.lib.optionalString
|
||||
targetPrefix = lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
|
||||
|
@ -69,32 +69,32 @@ let
|
|||
# to actually link to our new Libc. The iOS simulator is a special
|
||||
# exception because we can’t actually run simulators binaries
|
||||
# ourselves.
|
||||
+ stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
+ lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_SPHINX_HTML = NO
|
||||
BUILD_SPHINX_PDF = NO
|
||||
'' + stdenv.lib.optionalString dontStrip ''
|
||||
'' + lib.optionalString dontStrip ''
|
||||
STRIP_CMD = :
|
||||
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||
'' + lib.optionalString enableRelocatedStaticLibs ''
|
||||
GhcLibHcOpts += -fPIC
|
||||
GhcRtsHcOpts += -fPIC
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
EXTRA_CC_OPTS += -std=gnu99
|
||||
'';
|
||||
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
||||
libDeps = platform: lib.optional enableTerminfo ncurses
|
||||
++ [libffi]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ lib.optional (!enableIntegerSimple) gmp
|
||||
++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
] ++ lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
|
||||
targetCC = builtins.head toolsForTarget;
|
||||
|
||||
|
@ -128,7 +128,7 @@ stdenv.mkDerivation (rec {
|
|||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -138,13 +138,13 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
echo -n "${buildMK dontStrip}" > mk/build.mk
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||
'' + lib.optionalString targetPlatform.isMusl ''
|
||||
echo "patching llvm-targets for musl targets..."
|
||||
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||
|
@ -164,29 +164,29 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ]
|
||||
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
] ++ stdenv.lib.optionals (libffi != null) [
|
||||
] ++ lib.optionals (libffi != null) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
|
||||
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
|
||||
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
"--with-iconv-includes=${libiconv}/include"
|
||||
"--with-iconv-libraries=${libiconv}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||
] ++ lib.optionals (targetPlatform != hostPlatform) [
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++ stdenv.lib.optionals useLdGold [
|
||||
] ++ lib.optionals useLdGold [
|
||||
"CFLAGS=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
|
@ -207,18 +207,18 @@ stdenv.mkDerivation (rec {
|
|||
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
|
||||
|
||||
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
|
||||
++ lib.optional useLLVM llvmPackages.llvm;
|
||||
|
||||
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
|
||||
depsTargetTarget = map lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
|
||||
postInstall = ''
|
||||
# Install the bash completion file.
|
||||
|
@ -228,7 +228,7 @@ stdenv.mkDerivation (rec {
|
|||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
@ -245,14 +245,14 @@ stdenv.mkDerivation (rec {
|
|||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||
maintainers = with lib.maintainers; [ marcweber andres peti ];
|
||||
timeout = 24 * 3600;
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);
|
||||
|
||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
|
||||
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
|
||||
dontPatchELF = true;
|
||||
noAuditTmpdir = true;
|
||||
})
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, pkgsBuildTarget, targetPackages
|
||||
{ lib, stdenv, pkgsBuildTarget, targetPackages
|
||||
|
||||
# build-tools
|
||||
, bootPkgs
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||
# library instead of the faster but GPLed integer-gmp library.
|
||||
enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
enableIntegerSimple ? !(lib.any (lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
|
||||
|
||||
, # If enabled, use -fPIC when compiling static libs.
|
||||
enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
|
||||
|
@ -35,7 +35,7 @@
|
|||
|
||||
, # What flavour to build. An empty string indicates no
|
||||
# specific flavour and falls back to ghc default values.
|
||||
ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
|
||||
(if useLLVM then "perf-cross" else "perf-cross-ncg")
|
||||
|
||||
, # Whether to disable the large address space allocator
|
||||
|
@ -51,7 +51,7 @@ let
|
|||
inherit (bootPkgs) ghc;
|
||||
|
||||
# TODO(@Ericson2314) Make unconditional
|
||||
targetPrefix = stdenv.lib.optionalString
|
||||
targetPrefix = lib.optionalString
|
||||
(targetPlatform != hostPlatform)
|
||||
"${targetPlatform.config}-";
|
||||
|
||||
|
@ -69,32 +69,32 @@ let
|
|||
# to actually link to our new Libc. The iOS simulator is a special
|
||||
# exception because we can’t actually run simulators binaries
|
||||
# ourselves.
|
||||
+ stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
+ lib.optionalString (targetPlatform != hostPlatform) ''
|
||||
Stage1Only = ${if (targetPlatform.system == hostPlatform.system && !targetPlatform.isiOS) then "NO" else "YES"}
|
||||
CrossCompilePrefix = ${targetPrefix}
|
||||
HADDOCK_DOCS = NO
|
||||
BUILD_SPHINX_HTML = NO
|
||||
BUILD_SPHINX_PDF = NO
|
||||
'' + stdenv.lib.optionalString dontStrip ''
|
||||
'' + lib.optionalString dontStrip ''
|
||||
STRIP_CMD = :
|
||||
'' + stdenv.lib.optionalString (!enableProfiledLibs) ''
|
||||
'' + lib.optionalString (!enableProfiledLibs) ''
|
||||
GhcLibWays = "v dyn"
|
||||
'' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
|
||||
'' + lib.optionalString enableRelocatedStaticLibs ''
|
||||
GhcLibHcOpts += -fPIC
|
||||
GhcRtsHcOpts += -fPIC
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
EXTRA_CC_OPTS += -std=gnu99
|
||||
'';
|
||||
|
||||
# Splicer will pull out correct variations
|
||||
libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
|
||||
libDeps = platform: lib.optional enableTerminfo ncurses
|
||||
++ [libffi]
|
||||
++ stdenv.lib.optional (!enableIntegerSimple) gmp
|
||||
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
++ lib.optional (!enableIntegerSimple) gmp
|
||||
++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
|
||||
|
||||
toolsForTarget = [
|
||||
pkgsBuildTarget.targetPackages.stdenv.cc
|
||||
] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
] ++ lib.optional useLLVM buildLlvmPackages.llvm;
|
||||
|
||||
targetCC = builtins.head toolsForTarget;
|
||||
|
||||
|
@ -119,7 +119,7 @@ stdenv.mkDerivation (rec {
|
|||
postPatch = "patchShebangs .";
|
||||
|
||||
# GHC is a bit confused on its cross terminology.
|
||||
preConfigure = stdenv.lib.optionalString stdenv.isAarch64 ''
|
||||
preConfigure = lib.optionalString stdenv.isAarch64 ''
|
||||
# Aarch64 allow backward bootstrapping since earlier versions are unstable.
|
||||
find . -name \*\.cabal\* -exec sed -i -e 's/\(base.*\)4.14/\14.16/' {} \; \
|
||||
-exec sed -i -e 's/\(prim.*\)0.6/\10.8/' {} \;
|
||||
|
@ -132,7 +132,7 @@ stdenv.mkDerivation (rec {
|
|||
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
|
||||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
|
||||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
|
||||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}"
|
||||
export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
|
||||
export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
|
||||
export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
|
||||
|
@ -142,13 +142,13 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
echo -n "${buildMK dontStrip}" > mk/build.mk
|
||||
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
|
||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||
'' + lib.optionalString (!stdenv.isDarwin) ''
|
||||
export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" -no_dtrace_dof"
|
||||
'' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
'' + lib.optionalString targetPlatform.useAndroidPrebuilt ''
|
||||
sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
|
||||
'' + stdenv.lib.optionalString targetPlatform.isMusl ''
|
||||
'' + lib.optionalString targetPlatform.isMusl ''
|
||||
echo "patching llvm-targets for musl targets..."
|
||||
echo "Cloning these existing '*-linux-gnu*' targets:"
|
||||
grep linux-gnu llvm-targets | sed 's/^/ /'
|
||||
|
@ -168,29 +168,29 @@ stdenv.mkDerivation (rec {
|
|||
|
||||
# TODO(@Ericson2314): Always pass "--target" and always prefix.
|
||||
configurePlatforms = [ "build" "host" ]
|
||||
++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
|
||||
++ lib.optional (targetPlatform != hostPlatform) "target";
|
||||
|
||||
# `--with` flags for libraries needed for RTS linker
|
||||
configureFlags = [
|
||||
"--datadir=$doc/share/doc/ghc"
|
||||
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
|
||||
] ++ stdenv.lib.optionals (libffi != null) [
|
||||
] ++ lib.optionals (libffi != null) [
|
||||
"--with-system-libffi"
|
||||
"--with-ffi-includes=${targetPackages.libffi.dev}/include"
|
||||
"--with-ffi-libraries=${targetPackages.libffi.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
|
||||
"--with-gmp-includes=${targetPackages.gmp.dev}/include"
|
||||
"--with-gmp-libraries=${targetPackages.gmp.out}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
] ++ lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
|
||||
"--with-iconv-includes=${libiconv}/include"
|
||||
"--with-iconv-libraries=${libiconv}/lib"
|
||||
] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
|
||||
] ++ lib.optionals (targetPlatform != hostPlatform) [
|
||||
"--enable-bootstrap-with-devel-snapshot"
|
||||
] ++ stdenv.lib.optionals useLdGold [
|
||||
] ++ lib.optionals useLdGold [
|
||||
"CFLAGS=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
|
||||
"CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
|
||||
] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
|
||||
] ++ lib.optionals (disableLargeAddressSpace) [
|
||||
"--disable-large-address-space"
|
||||
];
|
||||
|
||||
|
@ -211,18 +211,18 @@ stdenv.mkDerivation (rec {
|
|||
buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
|
||||
|
||||
propagatedBuildInputs = [ targetPackages.stdenv.cc ]
|
||||
++ stdenv.lib.optional useLLVM llvmPackages.llvm;
|
||||
++ lib.optional useLLVM llvmPackages.llvm;
|
||||
|
||||
depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
|
||||
depsTargetTarget = map lib.getDev (libDeps targetPlatform);
|
||||
depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform);
|
||||
|
||||
# required, because otherwise all symbols from HSffi.o are stripped, and
|
||||
# that in turn causes GHCi to abort
|
||||
stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
hardeningDisable = [ "format" ] ++ lib.optional stdenv.targetPlatform.isMusl "pie";
|
||||
|
||||
postInstall = ''
|
||||
# Install the bash completion file.
|
||||
|
@ -232,7 +232,7 @@ stdenv.mkDerivation (rec {
|
|||
for i in "$out/bin/"*; do
|
||||
test ! -h $i || continue
|
||||
egrep --quiet '^#!' <(head -n 1 $i) || continue
|
||||
sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
sed -i -e '2i export PATH="$PATH:${lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
|
||||
done
|
||||
'';
|
||||
|
||||
|
@ -249,14 +249,14 @@ stdenv.mkDerivation (rec {
|
|||
meta = {
|
||||
homepage = "http://haskell.org/ghc";
|
||||
description = "The Glasgow Haskell Compiler";
|
||||
maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
|
||||
maintainers = with lib.maintainers; [ marcweber andres peti ];
|
||||
timeout = 24 * 3600;
|
||||
inherit (ghc.meta) license platforms;
|
||||
};
|
||||
|
||||
dontStrip = (targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm);
|
||||
|
||||
} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
|
||||
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt{
|
||||
dontPatchELF = true;
|
||||
noAuditTmpdir = true;
|
||||
})
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue