commit
5edcf11a0c
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, lib, fetchgit, makeDesktopItem, pkgconfig, makeWrapper
|
{ stdenv, lib, fetchgit, makeDesktopItem, pkgconfig, makeWrapper
|
||||||
# Build
|
# Build
|
||||||
, python2, autoconf213, yasm, perl, ccache
|
, python2, autoconf213, yasm, perl
|
||||||
, unzip, gnome2, gnum4
|
, unzip, gnome2, gnum4
|
||||||
|
|
||||||
# Runtime
|
# Runtime
|
||||||
@ -41,7 +41,7 @@ in stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
gnum4 makeWrapper perl pkgconfig python2 ccache
|
gnum4 makeWrapper perl pkgconfig python2
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@ -54,7 +54,6 @@ in stdenv.mkDerivation rec {
|
|||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
export MOZCONFIG=$PWD/.mozconfig
|
export MOZCONFIG=$PWD/.mozconfig
|
||||||
export MOZ_NOSPAM=1
|
export MOZ_NOSPAM=1
|
||||||
export HOME=$PWD # Needed by ccache
|
|
||||||
|
|
||||||
cp $src/doc/mozconfig.example $MOZCONFIG
|
cp $src/doc/mozconfig.example $MOZCONFIG
|
||||||
# Need to modify it
|
# Need to modify it
|
||||||
@ -65,7 +64,8 @@ in stdenv.mkDerivation rec {
|
|||||||
--replace "mk_add_options AUTOCONF=/usr/bin/autoconf-2.13" "mk_add_options AUTOCONF=${autoconf213}/bin/autoconf" \
|
--replace "mk_add_options AUTOCONF=/usr/bin/autoconf-2.13" "mk_add_options AUTOCONF=${autoconf213}/bin/autoconf" \
|
||||||
--replace 'mk_add_options MOZ_OBJDIR=$HOME/build/wbobjects/' "" \
|
--replace 'mk_add_options MOZ_OBJDIR=$HOME/build/wbobjects/' "" \
|
||||||
--replace "ac_add_options --x-libraries=/usr/lib64" "ac_add_options --x-libraries=${lib.makeLibraryPath [ xorg.libX11 ]}" \
|
--replace "ac_add_options --x-libraries=/usr/lib64" "ac_add_options --x-libraries=${lib.makeLibraryPath [ xorg.libX11 ]}" \
|
||||||
--replace "_BUILD_64=1" "_BUILD_64=${lib.optionalString stdenv.hostPlatform.is64bit "1"}"
|
--replace "_BUILD_64=1" "_BUILD_64=${lib.optionalString stdenv.hostPlatform.is64bit "1"}" \
|
||||||
|
--replace "--enable-ccache" "--disable-ccache"
|
||||||
|
|
||||||
echo >> $MOZCONFIG '
|
echo >> $MOZCONFIG '
|
||||||
#
|
#
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{stdenv, fetchurl, zlib, openssl, libre, librem, pkgconfig, gst_all_1
|
{stdenv, fetchurl, zlib, openssl, libre, librem, pkgconfig, gst_all_1
|
||||||
, cairo, mpg123, alsaLib, SDL, libv4l, celt, libsndfile, srtp, ffmpeg_3
|
, cairo, mpg123, alsaLib, SDL, libv4l, celt, libsndfile, srtp, ffmpeg_3
|
||||||
, gsm, speex, portaudio, spandsp, libuuid, ccache, libvpx
|
, gsm, speex, portaudio, spandsp, libuuid, libvpx
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.6.5";
|
version = "0.6.5";
|
||||||
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [zlib openssl libre librem cairo mpg123
|
buildInputs = [zlib openssl libre librem cairo mpg123
|
||||||
alsaLib SDL libv4l celt libsndfile srtp ffmpeg_3 gsm speex portaudio spandsp libuuid
|
alsaLib SDL libv4l celt libsndfile srtp ffmpeg_3 gsm speex portaudio spandsp libuuid
|
||||||
ccache libvpx
|
libvpx
|
||||||
] ++ (with gst_all_1; [ gstreamer gst-libav gst-plugins-base gst-plugins-bad gst-plugins-good ]);
|
] ++ (with gst_all_1; [ gstreamer gst-libav gst-plugins-base gst-plugins-bad gst-plugins-good ]);
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"LIBRE_MK=${libre}/share/re/re.mk"
|
"LIBRE_MK=${libre}/share/re/re.mk"
|
||||||
|
@ -1,23 +1,64 @@
|
|||||||
{ stdenv, fetchFromGitHub, asciidoc-full, gperf, perl, autoreconfHook, zlib, makeWrapper }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, substituteAll
|
||||||
|
, binutils
|
||||||
|
, asciidoc
|
||||||
|
, cmake
|
||||||
|
, perl
|
||||||
|
, zstd
|
||||||
|
, xcodebuild
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
|
|
||||||
let ccache = stdenv.mkDerivation rec {
|
let ccache = stdenv.mkDerivation rec {
|
||||||
pname = "ccache";
|
pname = "ccache";
|
||||||
version = "3.7.12";
|
version = "4.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ccache";
|
owner = pname;
|
||||||
repo = "ccache";
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1xnv4g4n1jk1i98sa53k8w6q7hbwbw62svs30lssppysbrv8x3gz";
|
sha256 = "1frcplrv61m2iwc6jwycpbcz1101xl6s4sh8p87prdj98l60lyrx";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ asciidoc-full autoreconfHook gperf perl ];
|
# TODO: Remove patches from upstream in next release
|
||||||
|
patches = [
|
||||||
|
# Fix badly named man page filename
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/ccache/ccache/commit/223e706fb24ce86eb0ad86079a97e6f345b9ef40.patch";
|
||||||
|
sha256 = "1h7amp3ka45a79zwlxh8qnzx6n371gnfpfgijcqljps7skhl5gjg";
|
||||||
|
})
|
||||||
|
# Build and install man page by default
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/ccache/ccache/commit/294ff2face26448afa68e3ef7b68bf4898d6dc77.patch";
|
||||||
|
sha256 = "0rx69qn41bgksc4m3p59nk5d6rz72rwnfska9mh5j62pzfm8axja";
|
||||||
|
})
|
||||||
|
# Fixes use of undeclared identifier 'CLONE_NOOWNERCOPY' on darwin
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/ccache/ccache/commit/411c010c3a5ee690cd42b23ffcf026ae009e2897.patch";
|
||||||
|
sha256 = "062s424d0d0psp6wjhmfnfn1s5dsrz403hdid5drm6l2san0jhq0";
|
||||||
|
})
|
||||||
|
] ++ lib.optional stdenv.isDarwin (substituteAll {
|
||||||
|
src = ./force-objdump-on-darwin.patch;
|
||||||
|
objdump = "${binutils.bintools}/bin/objdump";
|
||||||
|
});
|
||||||
|
|
||||||
buildInputs = [ zlib ];
|
nativeBuildInputs = [ asciidoc cmake perl ];
|
||||||
|
|
||||||
|
buildInputs = [ zstd ];
|
||||||
|
|
||||||
outputs = [ "out" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
|
|
||||||
doCheck = !stdenv.isDarwin;
|
doCheck = true;
|
||||||
|
checkInputs = lib.optional stdenv.isDarwin xcodebuild;
|
||||||
|
checkPhase = ''
|
||||||
|
export HOME=$(mktemp -d)
|
||||||
|
ctest --output-on-failure ${lib.optionalString stdenv.isDarwin ''
|
||||||
|
-E '^(test.nocpp2|test.modules)$'
|
||||||
|
''}
|
||||||
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
# A derivation that provides gcc and g++ commands, but that
|
# A derivation that provides gcc and g++ commands, but that
|
||||||
@ -63,9 +104,10 @@ let ccache = stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Compiler cache for fast recompilation of C/C++ code";
|
description = "Compiler cache for fast recompilation of C/C++ code";
|
||||||
homepage = "https://ccache.dev/";
|
homepage = "https://ccache.dev";
|
||||||
downloadPage = "https://ccache.dev/download.html";
|
downloadPage = "https://ccache.dev/download.html";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with maintainers; [ metadark r-burns ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
diff --git a/test/run b/test/run
|
||||||
|
index 9623e49d..3df1c5a8 100755
|
||||||
|
--- a/test/run
|
||||||
|
+++ b/test/run
|
||||||
|
@@ -126,23 +126,17 @@ file_size() {
|
||||||
|
objdump_cmd() {
|
||||||
|
local file="$1"
|
||||||
|
|
||||||
|
- if $HOST_OS_APPLE; then
|
||||||
|
- xcrun dwarfdump -r 0 "$file"
|
||||||
|
- elif $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then
|
||||||
|
+ if $HOST_OS_WINDOWS || $HOST_OS_CYGWIN; then
|
||||||
|
# For some reason objdump only shows the basename of the file, so fall
|
||||||
|
# back to brute force and ignorance.
|
||||||
|
strings "$1"
|
||||||
|
else
|
||||||
|
- objdump -W "$file"
|
||||||
|
+ @objdump@ -W "$file"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
objdump_grep_cmd() {
|
||||||
|
- if $HOST_OS_APPLE; then
|
||||||
|
- fgrep -q "\"$1\""
|
||||||
|
- else
|
||||||
|
- fgrep -q ": $1"
|
||||||
|
- fi
|
||||||
|
+ fgrep -q ": $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
expect_stat() {
|
@ -10986,7 +10986,9 @@ in
|
|||||||
|
|
||||||
cc-tool = callPackage ../development/tools/misc/cc-tool { };
|
cc-tool = callPackage ../development/tools/misc/cc-tool { };
|
||||||
|
|
||||||
ccache = callPackage ../development/tools/misc/ccache { };
|
ccache = callPackage ../development/tools/misc/ccache {
|
||||||
|
asciidoc = asciidoc-full;
|
||||||
|
};
|
||||||
|
|
||||||
# Wrapper that works as gcc or g++
|
# Wrapper that works as gcc or g++
|
||||||
# It can be used by setting in nixpkgs config like this, for example:
|
# It can be used by setting in nixpkgs config like this, for example:
|
||||||
@ -11008,12 +11010,25 @@ in
|
|||||||
# };
|
# };
|
||||||
# You can use a different directory, but whichever directory you choose
|
# You can use a different directory, but whichever directory you choose
|
||||||
# should be owned by user root, group nixbld with permissions 0770.
|
# should be owned by user root, group nixbld with permissions 0770.
|
||||||
ccacheWrapper = makeOverridable ({ extraConfig ? "", cc ? stdenv.cc }:
|
ccacheWrapper = makeOverridable ({ extraConfig, cc }:
|
||||||
cc.override { cc = ccache.links {
|
cc.override {
|
||||||
|
cc = ccache.links {
|
||||||
|
inherit extraConfig;
|
||||||
|
unwrappedCC = cc.cc;
|
||||||
|
};
|
||||||
|
}) {
|
||||||
|
extraConfig = "";
|
||||||
|
inherit (stdenv) cc;
|
||||||
|
};
|
||||||
|
|
||||||
|
ccacheStdenv = lowPrio (makeOverridable ({ extraConfig, stdenv }:
|
||||||
|
overrideCC stdenv (buildPackages.ccacheWrapper.override {
|
||||||
inherit extraConfig;
|
inherit extraConfig;
|
||||||
unwrappedCC = cc.cc;
|
inherit (stdenv) cc;
|
||||||
}; }) {};
|
})) {
|
||||||
ccacheStdenv = lowPrio (overrideCC stdenv buildPackages.ccacheWrapper);
|
extraConfig = "";
|
||||||
|
inherit stdenv;
|
||||||
|
});
|
||||||
|
|
||||||
cccc = callPackage ../development/tools/analysis/cccc { };
|
cccc = callPackage ../development/tools/analysis/cccc { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user