diff --git a/pkgs/development/embedded/arduino/arduino-core/default.nix b/pkgs/development/embedded/arduino/arduino-core/default.nix index a0184eb94e58..25d0301d032b 100644 --- a/pkgs/development/embedded/arduino/arduino-core/default.nix +++ b/pkgs/development/embedded/arduino/arduino-core/default.nix @@ -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,13 +102,12 @@ 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 = - { - linux64 = "sha256-VK+Skl2xjqPWYEEKt1CCLwBZRxoyRfYQ3/60Byen9po="; - linux32 = "sha256-fjqV4avddmWAdFqMuUNUcDguxv3SI45m5QHFiWP8EKE="; - linuxarm = "sha256-Br8vUN7njI7VCH+ZvUh44l8LcgW+61+Q0x2AiXxIhTM="; - linuxaarch64 = "sha256-bOizBUUuyINg0/EqEatBq9lECT97JXxKbesCGyCA3YQ="; - }.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}"); + sha256 = { + linux64 = "sha256-VK+Skl2xjqPWYEEKt1CCLwBZRxoyRfYQ3/60Byen9po="; + linux32 = "sha256-fjqV4avddmWAdFqMuUNUcDguxv3SI45m5QHFiWP8EKE="; + linuxarm = "sha256-Br8vUN7njI7VCH+ZvUh44l8LcgW+61+Q0x2AiXxIhTM="; + linuxaarch64 = "sha256-bOizBUUuyINg0/EqEatBq9lECT97JXxKbesCGyCA3YQ="; + }.${teensy_architecture} or (throw "No arduino binaries for ${teensy_architecture}"); }; # the glib setup hook will populate GSETTINGS_SCHEMAS_PATH, @@ -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 diff --git a/pkgs/development/tools/misc/autogen/default.nix b/pkgs/development/tools/misc/autogen/default.nix index 9ce5b525e524..61df38f68ce9 100644 --- a/pkgs/development/tools/misc/autogen/default.nix +++ b/pkgs/development/tools/misc/autogen/default.nix @@ -53,25 +53,23 @@ stdenv.mkDerivation rec { export MAN_PAGE_DATE=$(date '+%Y-%m-%d' -d "@$SOURCE_DATE_EPOCH") ''; - 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 - # here autogen will select one based on the execution time of the configure - # phase which is not really reproducible. - # - # 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) [ - # 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" ]; + 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 + # here autogen will select one based on the execution time of the configure + # phase which is not really reproducible. + # + # 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) [ + # 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" ]; #doCheck = true; # not reliable diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 92223d30f95e..5e27e5573c58 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -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,14 +62,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config autoconf zlib ] ++ lib.optional cupsSupport cups; - buildInputs = - [ zlib expat openssl - libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec - libiconv ijs lcms2 bash - ] - ++ lib.optional x11Support xlibsWrapper - ++ lib.optional cupsSupport cups - ; + buildInputs = [ + zlib expat openssl + libjpeg libpng libtiff freetype fontconfig libpaper jbig2dec + libiconv ijs lcms2 bash + ] + ++ lib.optional x11Support xlibsWrapper + ++ lib.optional cupsSupport cups + ; preConfigure = '' # https://ghostscript.com/doc/current/Make.htm @@ -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"; diff --git a/pkgs/tools/graphics/graphviz/base.nix b/pkgs/tools/graphics/graphviz/base.nix index b98c55384996..424158813a58 100644 --- a/pkgs/tools/graphics/graphviz/base.nix +++ b/pkgs/tools/graphics/graphviz/base.nix @@ -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; @@ -12,7 +13,7 @@ let name = "CVE-2018-10196.patch"; url = "https://gitlab.com/graphviz/graphviz/uploads/30f8f0b00e357c112ac35fb20241604a/p.diff"; sha256 = "074qx6ch9blrnlilmz7p96fkiz2va84x2fbqdza5k4808rngirc7"; - excludes = ["tests/*"]; # we don't run them and they don't apply + excludes = [ "tests/*" ]; # we don't run them and they don't apply }; # the patch needs a small adaption for older versions patchToUse = if lib.versionAtLeast version "2.37" then raw_patch else @@ -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)' \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0d4a976501d9..ce38ccc5a8a4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5893,7 +5893,7 @@ with pkgs; }; graphviz-nox = graphviz.override { - xorg = null; + withXorg = false; libdevil = libdevil-nox; };