Merge pull request #144663 from SuperSandro2000/cleanup

This commit is contained in:
Sandro 2021-11-05 21:28:07 +01:00 committed by GitHub
commit d3d0c7fdfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 54 deletions

View File

@ -11,7 +11,7 @@
, ncurses
, readline
, withGui ? false
, gtk3 ? null
, gtk3
, wrapGAppsHook
, withTeensyduino ? false
/* Packages needed for Teensyduino */
@ -31,7 +31,6 @@
, udev
}:
assert withGui -> gtk3 != null && wrapGAppsHook != null;
assert withTeensyduino -> withGui;
let
externalDownloads = import ./downloads.nix {
@ -76,12 +75,12 @@ let
else if stdenv.hostPlatform.isAarch32 then "linuxarm"
else throw "${stdenv.hostPlatform.system} is not supported in teensy";
flavor = (if withTeensyduino then "teensyduino" else "arduino")
pname = (if withTeensyduino then "teensyduino" else "arduino")
+ lib.optionalString (!withGui) "-core";
in
stdenv.mkDerivation rec {
inherit pname;
version = "1.8.16";
name = "${flavor}-${version}";
src = fetchFromGitHub {
owner = "arduino";
@ -103,8 +102,7 @@ stdenv.mkDerivation rec {
# Used because teensyduino requires jars be a specific size
arduino_dist_src = fetchurl {
url = "https://downloads.arduino.cc/arduino-${version}-${teensy_architecture}.tar.xz";
sha256 =
{
sha256 = {
linux64 = "sha256-VK+Skl2xjqPWYEEKt1CCLwBZRxoyRfYQ3/60Byen9po=";
linux32 = "sha256-fjqV4avddmWAdFqMuUNUcDguxv3SI45m5QHFiWP8EKE=";
linuxarm = "sha256-Br8vUN7njI7VCH+ZvUh44l8LcgW+61+Q0x2AiXxIhTM=";
@ -157,7 +155,7 @@ stdenv.mkDerivation rec {
javaPath = lib.makeBinPath [ jdk ];
# Everything else will be patched into rpath
rpath = (lib.makeLibraryPath [ zlib libusb-compat-0_1 libusb1 readline ncurses5 stdenv.cc.cc ]);
rpath = lib.makeLibraryPath [ zlib libusb-compat-0_1 libusb1 readline ncurses5 stdenv.cc.cc ];
installPhase = ''
mkdir -p $out/share/arduino

View File

@ -53,8 +53,7 @@ stdenv.mkDerivation rec {
export MAN_PAGE_DATE=$(date '+%Y-%m-%d' -d "@$SOURCE_DATE_EPOCH")
'';
configureFlags =
[
configureFlags = [
"--with-libxml2=${libxml2.dev}"
"--with-libxml2-cflags=-I${libxml2.dev}/include/libxml2"
# Make sure to use a static value for the timeout. If we do not set a value
@ -64,12 +63,11 @@ stdenv.mkDerivation rec {
# If you are curious about the number 78, it has been cargo-culted from
# Debian: https://salsa.debian.org/debian/autogen/-/blob/master/debian/rules#L21
"--enable-timeout=78"
]
++ (lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
# the configure check for regcomp wants to run a host program
"libopts_cv_with_libregex=yes"
#"MAKEINFO=${buildPackages.texinfo}/bin/makeinfo"
])
]
# See: https://sourceforge.net/p/autogen/bugs/187/
++ lib.optionals stdenv.isDarwin [ "ac_cv_func_utimensat=no" ];

View File

@ -1,13 +1,10 @@
{ config, stdenv, lib, fetchurl, pkg-config, zlib, expat, openssl, autoconf
, libjpeg, libpng, libtiff, freetype, fontconfig, libpaper, jbig2dec
, libiconv, ijs, lcms2, fetchpatch, callPackage, bash, buildPackages
, cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups ? null
, x11Support ? cupsSupport, xlibsWrapper ? null # with CUPS, X11 only adds very little
, cupsSupport ? config.ghostscript.cups or (!stdenv.isDarwin), cups
, x11Support ? cupsSupport, xlibsWrapper # with CUPS, X11 only adds very little
}:
assert x11Support -> xlibsWrapper != null;
assert cupsSupport -> cups != null;
let
fonts = stdenv.mkDerivation {
name = "ghostscript-fonts";
@ -65,8 +62,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config autoconf zlib ]
++ lib.optional cupsSupport cups;
buildInputs =
[ zlib expat openssl
buildInputs = [
zlib expat openssl
libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec
libiconv ijs lcms2 bash
]
@ -150,7 +147,6 @@ stdenv.mkDerivation rec {
meta = {
homepage = "https://www.ghostscript.com/";
description = "PostScript interpreter (mainline version)";
longDescription = ''
Ghostscript is the name of a set of tools that provides (i) an
interpreter for the PostScript language and the PDF file format,
@ -159,9 +155,7 @@ stdenv.mkDerivation rec {
operations in the PostScript language, and (iii) a wide variety
of output drivers for various file formats and printers.
'';
license = lib.licenses.agpl3;
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.viric ];
mainProgram = "gs";

View File

@ -2,7 +2,8 @@
{ lib, stdenv, fetchFromGitLab, autoreconfHook, pkg-config, cairo, expat, flex
, fontconfig, gd, gettext, gts, libdevil, libjpeg, libpng, libtool, pango, bash
, bison, fetchpatch, xorg, ApplicationServices, python3 }:
, bison, fetchpatch, xorg, ApplicationServices, python3, withXorg ? true
}:
let
inherit (lib) optional optionals optionalString;
@ -51,12 +52,12 @@ stdenv.mkDerivation {
buildInputs = [
libpng libjpeg expat fontconfig gd gts libdevil pango bash
] ++ optionals (xorg != null) (with xorg; [ libXrender libXaw libXpm ])
++ optionals (stdenv.isDarwin) [ ApplicationServices ];
] ++ optionals withXorg (with xorg; [ libXrender libXaw libXpm ])
++ optionals stdenv.isDarwin [ ApplicationServices ];
hardeningDisable = [ "fortify" ];
CPPFLAGS = lib.optionalString (xorg != null && stdenv.isDarwin)
CPPFLAGS = lib.optionalString (withXorg && stdenv.isDarwin)
"-I${cairo.dev}/include/cairo";
configureFlags = [
@ -81,7 +82,7 @@ stdenv.mkDerivation {
preAutoreconf = "./autogen.sh";
postFixup = optionalString (xorg != null) ''
postFixup = optionalString withXorg ''
substituteInPlace $out/bin/dotty --replace '`which lefty`' $out/bin/lefty
substituteInPlace $out/bin/vimdot \
--replace /usr/bin/vi '$(command -v vi)' \

View File

@ -5893,7 +5893,7 @@ with pkgs;
};
graphviz-nox = graphviz.override {
xorg = null;
withXorg = false;
libdevil = libdevil-nox;
};