Merge pull request #39465 from matthewbauer/work
Various work on broken packages
This commit is contained in:
commit
d71d7c913e
12 changed files with 247 additions and 102 deletions
|
@ -2,9 +2,15 @@
|
|||
, libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2
|
||||
, glibmm, libsigcxx, lcms, boost, gettext, makeWrapper
|
||||
, gsl, python2, poppler, imagemagick, libwpg, librevenge
|
||||
, libvisio, libcdr, libexif, potrace, cmake
|
||||
, libvisio, libcdr, libexif, potrace, autoreconfHook
|
||||
, intltool
|
||||
, lib
|
||||
}:
|
||||
|
||||
# Note that originally this Nix expression used CMake to build but
|
||||
# this led to errors on MacOS of "Too many arguments". Inkscape
|
||||
# supports autoconf and we will use this for now on.
|
||||
|
||||
let
|
||||
python2Env = python2.withPackages(ps: with ps; [ numpy lxml ]);
|
||||
in
|
||||
|
@ -17,12 +23,6 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "1chng2yw8dsjxc9gf92aqv7plj11cav8ax321wmakmv5bb09cch6";
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
cp $src ${name}.tar.bz2
|
||||
tar xvjf ${name}.tar.bz2 > /dev/null
|
||||
cd ${name}
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs share/extensions
|
||||
patchShebangs fix-roff-punct
|
||||
|
@ -33,25 +33,26 @@ stdenv.mkDerivation rec {
|
|||
--replace '"python-interpreter", "python"' '"python-interpreter", "${python2Env}/bin/python"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook intltool ];
|
||||
buildInputs = [
|
||||
perl perlXMLParser libXft libpng zlib popt boehmgc
|
||||
libxml2 libxslt glib gtkmm2 glibmm libsigcxx lcms boost gettext
|
||||
makeWrapper gsl poppler imagemagick libwpg librevenge
|
||||
libvisio libcdr libexif potrace cmake python2Env
|
||||
libvisio libcdr libexif potrace python2Env
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
preConfigure = ''
|
||||
intltoolize -f
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Make sure PyXML modules can be found at run-time.
|
||||
rm "$out/share/icons/hicolor/icon-theme.cache"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkscape
|
||||
install_name_tool -change $out/lib/libinkscape_base.dylib $out/lib/inkscape/libinkscape_base.dylib $out/bin/inkview
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
license = "GPL";
|
||||
homepage = https://www.inkscape.org;
|
||||
description = "Vector graphics editor";
|
||||
|
@ -62,5 +63,6 @@ stdenv.mkDerivation rec {
|
|||
|
||||
If you want to import .eps files install ps2edit.
|
||||
'';
|
||||
maintainers = with maintainers; [ matthewbauer ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,19 +1,27 @@
|
|||
{ stdenv, fetchurl, pkgconfig, gnum4, glib, libsigcxx }:
|
||||
{ stdenv, fetchurl, fetchpatch, pkgconfig, gnum4, glib, libsigcxx }:
|
||||
|
||||
let
|
||||
ver_maj = "2.54";
|
||||
ver_min = "1";
|
||||
ver_maj = "2.56";
|
||||
ver_min = "0";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "glibmm-${ver_maj}.${ver_min}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/glibmm/${ver_maj}/${name}.tar.xz";
|
||||
sha256 = "0jkapw18icz59cmlmsl00nwwz0wh291kb4hc9z9hxmq45drqrhkw";
|
||||
sha256 = "1abrkqhca5p8n6ly3vp1232rny03s7lrd8f8iz2m2m141nxgqx3f";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
patchFlags = "-p0";
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/macports/macports-ports/e864b2340be9ef003d8ff4aef92e7151d06287dd/devel/glibmm/files/0001-ustring-Fix-wchar-conversion-on-macOS-with-libc.patch";
|
||||
sha256 = "02qvnailw1i59cjbj3cy7y02kfcivsvkdjrf4njkp4plarayyqp9";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig gnum4 ];
|
||||
propagatedBuildInputs = [ glib libsigcxx ];
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ matthewbauer ];
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
, libsoup, libpulseaudio, libintl
|
||||
, darwin, lame, mpg123, twolame
|
||||
, gtkSupport ? false, gtk3 ? null
|
||||
, ncurses
|
||||
}:
|
||||
|
||||
assert gtkSupport -> gtk3 != null;
|
||||
|
@ -26,6 +27,7 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ matthewbauer ];
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
|
@ -39,11 +41,14 @@ stdenv.mkDerivation rec {
|
|||
|
||||
nativeBuildInputs = [ pkgconfig python meson ninja gettext ];
|
||||
|
||||
NIX_LDFLAGS = "-lncurses";
|
||||
|
||||
buildInputs = [
|
||||
gst-plugins-base orc bzip2
|
||||
libdv libvpx speex flac taglib
|
||||
cairo gdk_pixbuf aalib libcaca
|
||||
libsoup libshout lame mpg123 twolame libintl
|
||||
ncurses
|
||||
]
|
||||
++ optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Cocoa ]
|
||||
++ optionals stdenv.isLinux [ libv4l libpulseaudio libavc1394 libiec61883 ];
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{ stdenv, fetchurl, meson, ninja, pkgconfig, python
|
||||
, gst-plugins-base, orc, gettext
|
||||
, a52dec, libcdio, libdvdread
|
||||
, libmad, libmpeg2, x264, libintl
|
||||
, libmad, libmpeg2, x264, libintl, lib
|
||||
, darwin
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gst-plugins-ugly-1.14.0";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
meta = with lib; {
|
||||
description = "Gstreamer Ugly Plugins";
|
||||
homepage = "https://gstreamer.freedesktop.org";
|
||||
longDescription = ''
|
||||
|
@ -18,6 +19,7 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
license = licenses.lgpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ matthewbauer ];
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
|
@ -34,5 +36,6 @@ stdenv.mkDerivation rec {
|
|||
a52dec libcdio libdvdread
|
||||
libmad libmpeg2 x264
|
||||
libintl
|
||||
];
|
||||
] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks;
|
||||
[ IOKit CoreFoundation DiskArbitration ]);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||
description = "A library that implements DVD navigation features such as DVD menus";
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = [ stdenv.lib.maintainers.wmertens ];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
};
|
||||
|
||||
passthru = { inherit libdvdread; };
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, pkgconfig, libusb1 }:
|
||||
{ stdenv, fetchurl, pkgconfig, libusb1, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libmtp-1.1.15";
|
||||
|
@ -10,6 +10,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
|
||||
buildInputs = [ libiconv ];
|
||||
propagatedBuildInputs = [ libusb1 ];
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
|
@ -24,7 +25,7 @@ stdenv.mkDerivation rec {
|
|||
in the form of a library suitable primarily for POSIX compliant operating
|
||||
systems. We implement MTP Basic, the stuff proposed for standardization.
|
||||
'';
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl }:
|
||||
{ stdenv, fetchurl, lib, darwin }:
|
||||
|
||||
# Based on https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD
|
||||
let
|
||||
|
@ -12,19 +12,23 @@ stdenv.mkDerivation {
|
|||
sha256 = "0zi47asv1qmb09g321m02q684i3c90vci0mgkdh1mlmx2rbg1d1d";
|
||||
};
|
||||
|
||||
postPatch = "sed 's,/bin/rm,rm,g' -i genMakefiles"
|
||||
+ stdenv.lib.optionalString (stdenv ? glibc) ''
|
||||
|
||||
postPatch = ''
|
||||
sed 's,/bin/rm,rm,g' -i genMakefiles
|
||||
sed \
|
||||
-e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \
|
||||
-i config.linux
|
||||
'' + stdenv.lib.optionalString (stdenv ? glibc) ''
|
||||
substituteInPlace liveMedia/include/Locale.hh \
|
||||
--replace '<xlocale.h>' '<locale.h>'
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
sed \
|
||||
-e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \
|
||||
-i config.linux
|
||||
|
||||
./genMakefiles linux
|
||||
./genMakefiles ${{
|
||||
x86_64-darwin = "macosx";
|
||||
i686-linux = "linux";
|
||||
x86_64-linux = "linux-64bit";
|
||||
aarch64-linux = "linux-64bit";
|
||||
}.${stdenv.system}}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
@ -35,10 +39,12 @@ stdenv.mkDerivation {
|
|||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
nativeBuildInputs = lib.optional stdenv.isDarwin darwin.cctools;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Set of C++ libraries for multimedia streaming, using open standard protocols (RTP/RTCP, RTSP, SIP)";
|
||||
homepage = http://www.live555.com/liveMedia/;
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,9 +9,8 @@ args:
|
|||
let
|
||||
args_ = {
|
||||
|
||||
qmakeFlags =
|
||||
(args.qmakeFlags or [])
|
||||
++ [ ("CONFIG+=" + (if debug then "debug" else "release")) ];
|
||||
qmakeFlags = [ ("CONFIG+=" + (if debug then "debug" else "release")) ]
|
||||
++ (args.qmakeFlags or []);
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
optional (!debug) "-DQT_NO_DEBUG"
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
, libcap
|
||||
, pciutils
|
||||
, systemd
|
||||
|
||||
, enableProprietaryCodecs ? true
|
||||
|
||||
, gn, darwin, openbsm
|
||||
, lib, stdenv # lib.optional, needsPax
|
||||
}:
|
||||
|
||||
|
@ -25,7 +24,7 @@ qtModule {
|
|||
name = "qtwebengine";
|
||||
qtInputs = [ qtdeclarative qtquickcontrols qtlocation qtwebchannel ];
|
||||
nativeBuildInputs = [
|
||||
bison coreutils flex git gperf ninja pkgconfig python2 which
|
||||
bison coreutils flex git gperf ninja pkgconfig python2 which gn
|
||||
];
|
||||
doCheck = true;
|
||||
outputs = [ "bin" "dev" "out" ];
|
||||
|
@ -61,8 +60,50 @@ qtModule {
|
|||
|
||||
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
|
||||
src/3rdparty/chromium/gpu/config/gpu_info_collector_linux.cc
|
||||
''
|
||||
+ optionalString stdenv.isDarwin ''
|
||||
# Remove annoying xcode check
|
||||
substituteInPlace mkspecs/features/platform.prf \
|
||||
--replace "lessThan(QMAKE_XCODE_VERSION, 7.3)" false
|
||||
substituteInPlace src/core/config/mac_osx.pri \
|
||||
--replace /usr ${stdenv.cc} \
|
||||
--replace "isEmpty(QMAKE_MAC_SDK_VERSION)" false
|
||||
|
||||
# FIXME Needed with old Apple SDKs
|
||||
# Abandon all hope ye who try to make sense of this.
|
||||
substituteInPlace src/3rdparty/chromium/base/mac/foundation_util.mm \
|
||||
--replace "NSArray<NSString*>*" "NSArray*"
|
||||
substituteInPlace src/3rdparty/chromium/base/mac/sdk_forward_declarations.h \
|
||||
--replace "NSDictionary<VNImageOption, id>*" "NSDictionary*" \
|
||||
--replace "NSArray<VNRequest*>*" "NSArray*" \
|
||||
--replace "typedef NSString* VNImageOption NS_STRING_ENUM" "typedef NSString* VNImageOption"
|
||||
|
||||
cat <<EOF > src/3rdparty/chromium/build/mac/find_sdk.py
|
||||
#!/usr/bin/env python
|
||||
print("10.10.0")
|
||||
print("")
|
||||
EOF
|
||||
|
||||
cat <<EOF > src/3rdparty/chromium/build/config/mac/sdk_info.py
|
||||
#!/usr/bin/env python
|
||||
print('xcode_version="9.1"')
|
||||
print('xcode_version_int=9')
|
||||
print('xcode_build="9B55"')
|
||||
print('machine_os_build="17E199"')
|
||||
print('sdk_path=""')
|
||||
print('sdk_version="10.10"')
|
||||
print('sdk_platform_path=""')
|
||||
print('sdk_build="17B41"')
|
||||
EOF
|
||||
|
||||
# Apple has some secret stuff they don't share with OpenBSM
|
||||
substituteInPlace src/3rdparty/chromium/base/mac/mach_port_broker.mm \
|
||||
--replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]"
|
||||
substituteInPlace src/3rdparty/chromium/sandbox/mac/bootstrap_sandbox.cc \
|
||||
--replace "audit_token_to_pid(msg.trailer.msgh_audit)" "msg.trailer.msgh_audit.val[5]"
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10";
|
||||
|
||||
preConfigure = ''
|
||||
export NINJAFLAGS=-j$NIX_BUILD_CORES
|
||||
|
@ -70,13 +111,9 @@ qtModule {
|
|||
if [ -d "$PWD/tools/qmake" ]; then
|
||||
QMAKEPATH="$PWD/tools/qmake''${QMAKEPATH:+:}$QMAKEPATH"
|
||||
fi
|
||||
'';
|
||||
'';
|
||||
|
||||
qmakeFlags =
|
||||
[
|
||||
# Use system Ninja because bootstrapping it is fragile
|
||||
"WEBENGINE_CONFIG+=use_system_ninja"
|
||||
] ++ optional enableProprietaryCodecs "WEBENGINE_CONFIG+=use_proprietary_codecs";
|
||||
qmakeFlags = optional enableProprietaryCodecs "-- -proprietary-codecs";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
# Image formats
|
||||
|
@ -90,9 +127,10 @@ qtModule {
|
|||
|
||||
# Text rendering
|
||||
harfbuzz icu
|
||||
]
|
||||
++ optionals (!stdenv.isDarwin) [
|
||||
dbus zlib minizip snappy nss protobuf jsoncpp libevent
|
||||
|
||||
libevent
|
||||
] ++ optionals (!stdenv.isDarwin) [
|
||||
dbus zlib minizip snappy nss protobuf jsoncpp
|
||||
|
||||
# Audio formats
|
||||
alsaLib
|
||||
|
@ -106,17 +144,44 @@ qtModule {
|
|||
# X11 libs
|
||||
xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst
|
||||
xorg.libXcomposite xorg.libXdamage libdrm
|
||||
];
|
||||
]
|
||||
|
||||
# FIXME These dependencies shouldn't be needed but can't find a way
|
||||
# around it. Chromium pulls this in while bootstrapping GN.
|
||||
++ lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [
|
||||
libobjc
|
||||
cctools
|
||||
|
||||
# frameworks
|
||||
ApplicationServices
|
||||
Foundation
|
||||
AppKit
|
||||
ImageCaptureCore
|
||||
CoreBluetooth
|
||||
IOBluetooth
|
||||
CoreWLAN
|
||||
Quartz
|
||||
Cocoa
|
||||
|
||||
openbsm
|
||||
libunwind
|
||||
]);
|
||||
|
||||
dontUseNinjaBuild = true;
|
||||
dontUseNinjaInstall = true;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString stdenv.isLinux ''
|
||||
cat > $out/libexec/qt.conf <<EOF
|
||||
[Paths]
|
||||
Prefix = ..
|
||||
EOF
|
||||
|
||||
paxmark m $out/libexec/QtWebEngineProcess
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A web engine based on the Chromium web browser";
|
||||
maintainers = with maintainers; [ matthewbauer ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, fetchurl, orc, pkgconfig }:
|
||||
{ stdenv, fetchurl, orc, pkgconfig, fetchpatch, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "schroedinger-1.0.11";
|
||||
|
@ -13,15 +13,23 @@ stdenv.mkDerivation {
|
|||
|
||||
outputs = [ "out" "dev" "devdoc" ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||
buildInputs = [ orc ];
|
||||
|
||||
doCheck = true;
|
||||
doCheck = (!stdenv.isDarwin);
|
||||
|
||||
patchFlags = "-p0";
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/macports/macports-ports/master/multimedia/schroedinger/files/patch-testsuite-Makefile.am.diff";
|
||||
sha256 = "0cc8ymvgjgwy7ghca2dd8m8pxpinf27s2i8krf2m3fzv2ckq09v3";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://diracvideo.org/;
|
||||
maintainers = [ maintainers.spwhitt ];
|
||||
license = [ licenses.mpl11 licenses.lgpl2 licenses.mit ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,77 +1,124 @@
|
|||
{ stdenv, lib, fetchgit, fetchurl, libevent, ninja, python }:
|
||||
{ stdenv, lib, fetchgit, fetchurl, fetchpatch
|
||||
, libevent, ninja, python, darwin }:
|
||||
|
||||
let
|
||||
depsGit = {
|
||||
"tools/gn" = fetchgit {
|
||||
url = "https://chromium.googlesource.com/chromium/src/tools/gn";
|
||||
rev = "d0c518db129975ce88ff1de26c857873b0619c4b";
|
||||
sha256 = "0l15vzmjyx6bwlz1qhn3fy7yx3qzzxr3drnkj3l0p0fmyxza52vx";
|
||||
rev = "0fa417a0d2d8484e9a5a636e3301da322f586601";
|
||||
sha256 = "0pigcl14yc4aak6q1ghfjxdz2ah4fg4m2r5y3asw2rz6mpr5y9z0";
|
||||
};
|
||||
"base" = fetchgit {
|
||||
url = "https://chromium.googlesource.com/chromium/src/base";
|
||||
rev = "bc6e3ce8ca01b894751e1f7b22b561e3ae2e7f17";
|
||||
sha256 = "1yl49v6nxbrfms52xf7fiwh7d4301m2aj744pa3hzzh989c5j6g5";
|
||||
rev = "ab1d7c3b92ce9c9bc756bdefb8338360d1a33a1e";
|
||||
sha256 = "15wis6qg9ka62k6v1vamg0bp3v5vkpapg485jsn4bbfcaqp6di0f";
|
||||
};
|
||||
"build" = fetchgit {
|
||||
url = "https://chromium.googlesource.com/chromium/src/build";
|
||||
rev = "e934a19ae908081fba13769924e4ea45a7a451ce";
|
||||
sha256 = "0jhy418vaiin7djg9zvk83f8zhasigki4442x5j7gkmgmgmyc4am";
|
||||
rev = "8d44c08a4c9997695db8098198bdd5026bc7a6f9";
|
||||
sha256 = "19sajgf55xfmvnwvy2ss7g6pyljp751cfsws30w415m6m00lmpxl";
|
||||
};
|
||||
"config" = fetchgit {
|
||||
url = "https://chromium.googlesource.com/chromium/src/build/config";
|
||||
rev = "df16c6a2c070704b0a25efe46ee9af16de1e65b3";
|
||||
sha256 = "1x18syzz1scwhd8lf448hy5lnfpq118l403x9qmwm0np318w09wg";
|
||||
rev = "14116c0cdcb9e28995ca8bb384a12e5c9dbd1dbb";
|
||||
sha256 = "04nif0lm4wcy05b7xhal023874s4r0iq067q57cgwdm72i2gml40";
|
||||
};
|
||||
"testing/gtest" = fetchgit {
|
||||
url = "https://chromium.googlesource.com/chromium/testing/gtest";
|
||||
rev = "585ec31ea716f08233a815e680fc0d4699843938";
|
||||
sha256 = "0csn1cza66851nmxxiw42smsm3422mx67vcyykwn0a71lcjng6rc";
|
||||
};
|
||||
"third_party/apple_apsl" = fetchurl {
|
||||
url = "https://chromium.googlesource.com/chromium/src/third_party/+archive/8e6ccb8c74db6dfa15dd21401ace3ac96c054cf7/apple_apsl.tar.gz";
|
||||
sha256 = "0sc7b7zdw7f9piyyijl7xq3v1fzflqlck1apwm8kvgdhkyz3l63k";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gn";
|
||||
version = "0.0.0.20170629";
|
||||
sourceRoot = ".";
|
||||
in stdenv.mkDerivation {
|
||||
name = "gn";
|
||||
version = "20180423";
|
||||
sourceRoot = ".";
|
||||
|
||||
unpackPhase = ''
|
||||
${lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (n: v: ''
|
||||
mkdir -p $sourceRoot/${n}
|
||||
unpackPhase = ''
|
||||
${lib.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList (n: v: ''
|
||||
mkdir -p $sourceRoot/${n}
|
||||
if [ -d ${v} ]; then
|
||||
cp -r ${v}/* $sourceRoot/${n}
|
||||
'') depsGit)}
|
||||
'';
|
||||
else
|
||||
mkdir -p $sourceRoot/${n}
|
||||
pushd $sourceRoot/${n}
|
||||
unpackFile ${v}
|
||||
popd
|
||||
fi
|
||||
'') depsGit)}
|
||||
|
||||
postPatch = ''
|
||||
# Patch shebands (for sandbox build)
|
||||
chmod u+w -R build
|
||||
patchShebangs build
|
||||
chmod u+w -R $sourceRoot
|
||||
'';
|
||||
|
||||
# Patch out Chromium-bundled libevent
|
||||
chmod u+w tools/gn/bootstrap tools/gn/bootstrap/bootstrap.py
|
||||
sed -i -e '/static_libraries.*libevent/,/^ *\]\?[})]$/d' \
|
||||
tools/gn/bootstrap/bootstrap.py
|
||||
'';
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/Eloston/ungoogled-chromium/master/resources/patches/ungoogled-chromium/macos/fix-gn-bootstrap.patch";
|
||||
sha256 = "1h8jgxznm7zrxlzb4wcfx4zx4lyvfrmpd0r7cd7h0s23wn8ibb3a";
|
||||
})
|
||||
];
|
||||
|
||||
NIX_LDFLAGS = "-levent";
|
||||
postPatch = ''
|
||||
# Disable libevent bootstrapping (we will provide it).
|
||||
sed -i -e '/static_libraries.*libevent/,/^ *\]\?[})]$/d' \
|
||||
tools/gn/bootstrap/bootstrap.py
|
||||
|
||||
nativeBuildInputs = [ ninja python ];
|
||||
buildInputs = [ libevent ];
|
||||
# FIXME Needed with old Apple SDKs
|
||||
substituteInPlace base/mac/foundation_util.mm \
|
||||
--replace "NSArray<NSString*>*" "NSArray*"
|
||||
substituteInPlace base/mac/sdk_forward_declarations.h \
|
||||
--replace "NSDictionary<VNImageOption, id>*" "NSDictionary*" \
|
||||
--replace "NSArray<VNRequest*>*" "NSArray*" \
|
||||
--replace "typedef NSString* VNImageOption NS_STRING_ENUM" "typedef NSString* VNImageOption"
|
||||
|
||||
buildPhase = ''
|
||||
python tools/gn/bootstrap/bootstrap.py -s
|
||||
'';
|
||||
# Patch shebangs (for sandbox build)
|
||||
patchShebangs build
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -vD out/Release/gn "$out/bin/gn"
|
||||
'';
|
||||
# FIXME again this shouldn't be necessary but I can't figure out a better way
|
||||
NIX_CFLAGS_COMPILE = "-DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_10_10 -DMAC_OS_X_VERSION_MIN_REQUIRED=MAC_OS_X_VERSION_10_10";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A meta-build system that generates NinjaBuild files";
|
||||
homepage = https://chromium.googlesource.com/chromium/src/tools/gn;
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.stesie ];
|
||||
};
|
||||
}
|
||||
NIX_LDFLAGS = "-levent";
|
||||
|
||||
nativeBuildInputs = [ ninja python ];
|
||||
buildInputs = [ libevent ]
|
||||
|
||||
# FIXME These dependencies shouldn't be needed but can't find a way
|
||||
# around it. Chromium pulls this in while bootstrapping GN.
|
||||
++ lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [
|
||||
libobjc
|
||||
cctools
|
||||
|
||||
# frameworks
|
||||
ApplicationServices
|
||||
Foundation
|
||||
AppKit
|
||||
ImageCaptureCore
|
||||
CoreBluetooth
|
||||
IOBluetooth
|
||||
CoreWLAN
|
||||
Quartz
|
||||
Cocoa
|
||||
]);
|
||||
|
||||
buildPhase = ''
|
||||
python tools/gn/bootstrap/bootstrap.py -s
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -vD out/Release/gn "$out/bin/gn"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A meta-build system that generates NinjaBuild files";
|
||||
homepage = https://chromium.googlesource.com/chromium/src/tools/gn;
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ stesie matthewbauer ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue