From 86b2661837d41d6733bdf42e9e5e1414b17bf624 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Thu, 25 Nov 2021 20:09:33 +0100 Subject: [PATCH 1/2] guitone: remove package Guitone isn't used in Nixpkgs anywhere. It hasn't seen a release in 11 years (6a09974e0f53305ab5f411d1388acdfb264d1441) and is unmaintained in Nixpkgs. Also it's the sole remaining user of graphviz_2_32, which should be removed as well. --- .../version-management/guitone/default.nix | 34 ------------------- .../guitone/parallel-building.patch | 7 ---- pkgs/top-level/all-packages.nix | 4 --- 3 files changed, 45 deletions(-) delete mode 100644 pkgs/applications/version-management/guitone/default.nix delete mode 100644 pkgs/applications/version-management/guitone/parallel-building.patch diff --git a/pkgs/applications/version-management/guitone/default.nix b/pkgs/applications/version-management/guitone/default.nix deleted file mode 100644 index d78023d8468f..000000000000 --- a/pkgs/applications/version-management/guitone/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ lib, stdenv, fetchmtn, qt4, qmake4Hook, pkg-config, graphviz }: - -let version = "1.0-mtn-head"; in -stdenv.mkDerivation { - pname = "guitone"; - inherit version; - - #src = fetchurl { - # url = "${meta.homepage}/count.php/from=default/${version}/${name}.tgz"; - # sha256 = "08kcyar6p6v5z4dq6q6c1dhyxc2jj49qcd6lj3rdn1rb9hz4n7ms"; - #}; - - src = fetchmtn { - dbs = ["mtn://code.monotone.ca/guitone"]; - selector = "3a728afdbd3943b1d86c2a249b1e2ede7bf64c27"; - sha256 = "01vs8m00phs5pl75mjkpdarynfpkqrg0qf4rsn95czi3q6nxiaq5"; - branch = "net.venge.monotone.guitone"; - }; - - patches = [ ./parallel-building.patch ]; - - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ qt4 qmake4Hook graphviz ]; - - qmakeFlags = [ "guitone.pro" ]; - - meta = { - description = "Qt4 based GUI for monotone"; - homepage = "https://guitone.thomaskeller.biz"; - downloadPage = "https://code.monotone.ca/p/guitone/"; - license = lib.licenses.gpl3; - inherit (qt4.meta) platforms; - }; -} diff --git a/pkgs/applications/version-management/guitone/parallel-building.patch b/pkgs/applications/version-management/guitone/parallel-building.patch deleted file mode 100644 index f0e924cbfb81..000000000000 --- a/pkgs/applications/version-management/guitone/parallel-building.patch +++ /dev/null @@ -1,7 +0,0 @@ -Without this `make tmp/AttributesView.o` fails with -src/view/dialogs/AddEditAttribute.h:22:35: fatal error: ui_add_edit_attribute.h: No such file or directory ---- a/guitone.pro -+++ b/guitone.pro -@@ -215 +215,2 @@ help.commands = @echo Available targets: $${QMAKE_EXTRA_TARGETS} - QMAKE_EXTRA_TARGETS += help -+CONFIG += depend_includepath diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23606512aa76..47d0a0025df3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25672,10 +25672,6 @@ with pkgs; guardian-agent = callPackage ../tools/networking/guardian-agent { }; - guitone = callPackage ../applications/version-management/guitone { - graphviz = graphviz_2_32; - }; - gv = callPackage ../applications/misc/gv { }; gvisor = callPackage ../applications/virtualization/gvisor { From 1d2c379e3b8a172dfa8688f2065da062c01bb766 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Thu, 25 Nov 2021 19:28:41 +0100 Subject: [PATCH 2/2] graphviz_2_32: remove It is broken and their is no usage in current nixpkgs. Also the notice about its necessity is from 2014: 08131bd5d5f627f03625cf28ca8afbd7eb83e7fa --- pkgs/tools/graphics/graphviz/2.32.nix | 5 - pkgs/tools/graphics/graphviz/base.nix | 109 --------------------- pkgs/tools/graphics/graphviz/default.nix | 115 ++++++++++++++++++++++- pkgs/top-level/all-packages.nix | 8 -- 4 files changed, 112 insertions(+), 125 deletions(-) delete mode 100644 pkgs/tools/graphics/graphviz/2.32.nix delete mode 100644 pkgs/tools/graphics/graphviz/base.nix diff --git a/pkgs/tools/graphics/graphviz/2.32.nix b/pkgs/tools/graphics/graphviz/2.32.nix deleted file mode 100644 index 544949f33b71..000000000000 --- a/pkgs/tools/graphics/graphviz/2.32.nix +++ /dev/null @@ -1,5 +0,0 @@ -import ./base.nix { - rev = "10c3c34c5198beacfba950764f34960c6884a34f"; - version = "2.32.0"; - sha256 = "18b2wnz6xk8hndy7dlr1vn9vziyryyflh747n9966778gmh8bick"; -} diff --git a/pkgs/tools/graphics/graphviz/base.nix b/pkgs/tools/graphics/graphviz/base.nix deleted file mode 100644 index 53c231aa49bc..000000000000 --- a/pkgs/tools/graphics/graphviz/base.nix +++ /dev/null @@ -1,109 +0,0 @@ -{ rev, sha256, version }: - -{ lib, stdenv, fetchFromGitLab, autoreconfHook, pkg-config, cairo, expat, flex -, fontconfig, gd, gettext, gts, libdevil, libjpeg, libpng, libtool, pango, bash -, bison, fetchpatch, xorg, ApplicationServices, python3, withXorg ? true -}: - -let - inherit (lib) optional optionals optionalString; - raw_patch = - # https://gitlab.com/graphviz/graphviz/issues/1367 CVE-2018-10196 - fetchpatch { - 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 - }; - # the patch needs a small adaption for older versions - patchToUse = if lib.versionAtLeast version "2.37" then raw_patch else - stdenv.mkDerivation { - inherit (raw_patch) name; - buildCommand = "sed s/dot_root/agroot/g ${raw_patch} > $out"; - }; - # 2.42 has the patch included - patches = optional (lib.versionOlder version "2.42") patchToUse - ++ optionals (lib.versionOlder version "2.46.0") [ - (fetchpatch { - name = "CVE-2020-18032.patch"; - url = "https://gitlab.com/graphviz/graphviz/-/commit/784411ca3655c80da0f6025ab20634b2a6ff696b.patch"; - sha256 = "1nkw9ism8lkfvxsp5fh95i2l5s5cbjsidbb3g1kjfv10rxkyb41m"; - }) - ] ++ [ - # Fix cross. - # https://gitlab.com/graphviz/graphviz/-/merge_requests/2281 - (fetchpatch { - url = "https://gitlab.com/graphviz/graphviz/-/commit/0cdb89acbb0caf5baf3d04a8821c9d0dfe065ea8.patch"; - sha256 = "130mqlxzhzaz3vp4ccaq7z7fd9q6vjxmimz70g8y818igsbb13rf"; - }) - ]; -in - -stdenv.mkDerivation { - pname = "graphviz"; - inherit version; - - src = fetchFromGitLab { - owner = "graphviz"; - repo = "graphviz"; - inherit sha256 rev; - }; - - nativeBuildInputs = [ - autoreconfHook - pkg-config - python3 - bison - flex - ]; - - buildInputs = [ - libpng libjpeg expat fontconfig gd gts libdevil pango bash - ] ++ optionals withXorg (with xorg; [ libXrender libXaw libXpm ]) - ++ optionals stdenv.isDarwin [ ApplicationServices ]; - - hardeningDisable = [ "fortify" ]; - - CPPFLAGS = lib.optionalString (withXorg && stdenv.isDarwin) - "-I${cairo.dev}/include/cairo"; - - configureFlags = [ - "--with-ltdl-lib=${libtool.lib}/lib" - "--with-ltdl-include=${libtool}/include" - ] ++ lib.optional (xorg == null) "--without-x"; - - inherit patches; - - postPatch = '' - for f in $(find . -name Makefile.in); do - substituteInPlace $f --replace "-lstdc++" "-lc++" - done - ''; - - # '' - # substituteInPlace rtest/rtest.sh \ - # --replace "/bin/ksh" "${mksh}/bin/mksh" - # ''; - - doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs - - preAutoreconf = "./autogen.sh"; - - postFixup = optionalString withXorg '' - substituteInPlace $out/bin/dotty --replace '`which lefty`' $out/bin/lefty - substituteInPlace $out/bin/vimdot \ - --replace /usr/bin/vi '$(command -v vi)' \ - --replace /usr/bin/vim '$(command -v vim)' \ - --replace /usr/bin/vimdot $out/bin/vimdot \ - ''; - - enableParallelBuilding = true; - - meta = with lib; { - homepage = "https://graphviz.org"; - description = "Graph visualization tools"; - license = licenses.epl10; - platforms = platforms.unix; - maintainers = with maintainers; [ bjornfor raskin ]; - }; -} diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix index 6dc9e1861ac8..e2c5f9f63fc5 100644 --- a/pkgs/tools/graphics/graphviz/default.nix +++ b/pkgs/tools/graphics/graphviz/default.nix @@ -1,5 +1,114 @@ -import ./base.nix rec { - rev = "3425dae078262591d04fec107ec71ab010651852"; # use rev as tags have disappeared before +{ lib +, stdenv +, fetchFromGitLab +, autoreconfHook +, pkg-config +, cairo +, expat +, flex +, fontconfig +, gd +, gts +, libdevil +, libjpeg +, libpng +, libtool +, pango +, bash +, bison +, fetchpatch +, xorg +, ApplicationServices +, python3 +, withXorg ? true +}: + +let + inherit (lib) optional optionals optionalString; +in +stdenv.mkDerivation { + pname = "graphviz"; version = "2.49.3"; - sha256 = "1qvyjly7r1ihacdvxq0r59l4csr09sc05palpshzqsiz2wb1izk0"; + + src = fetchFromGitLab { + owner = "graphviz"; + repo = "graphviz"; + # use rev as tags have disappeared before + rev = "3425dae078262591d04fec107ec71ab010651852"; + sha256 = "1qvyjly7r1ihacdvxq0r59l4csr09sc05palpshzqsiz2wb1izk0"; + }; + + patches = [ + # Fix cross. + # https://gitlab.com/graphviz/graphviz/-/merge_requests/2281 + # Remove when version > 2.49.3. + (fetchpatch { + url = "https://gitlab.com/graphviz/graphviz/-/commit/0cdb89acbb0caf5baf3d04a8821c9d0dfe065ea8.patch"; + sha256 = "130mqlxzhzaz3vp4ccaq7z7fd9q6vjxmimz70g8y818igsbb13rf"; + }) + ]; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + python3 + bison + flex + ]; + + buildInputs = [ + libpng + libjpeg + expat + fontconfig + gd + gts + libdevil + pango + bash + ] ++ optionals withXorg (with xorg; [ libXrender libXaw libXpm ]) + ++ optionals stdenv.isDarwin [ ApplicationServices ]; + + hardeningDisable = [ "fortify" ]; + + configureFlags = [ + "--with-ltdl-lib=${libtool.lib}/lib" + "--with-ltdl-include=${libtool}/include" + ] ++ lib.optional (xorg == null) "--without-x"; + + enableParallelBuilding = true; + + CPPFLAGS = lib.optionalString (withXorg && stdenv.isDarwin) + "-I${cairo.dev}/include/cairo"; + + # '' + # substituteInPlace rtest/rtest.sh \ + # --replace "/bin/ksh" "${mksh}/bin/mksh" + # ''; + + doCheck = false; # fails with "Graphviz test suite requires ksh93" which is not in nixpkgs + + postPatch = '' + for f in $(find . -name Makefile.in); do + substituteInPlace $f --replace "-lstdc++" "-lc++" + done + ''; + + preAutoreconf = "./autogen.sh"; + + postFixup = optionalString withXorg '' + substituteInPlace $out/bin/dotty --replace '`which lefty`' $out/bin/lefty + substituteInPlace $out/bin/vimdot \ + --replace /usr/bin/vi '$(command -v vi)' \ + --replace /usr/bin/vim '$(command -v vim)' \ + --replace /usr/bin/vimdot $out/bin/vimdot \ + ''; + + meta = with lib; { + homepage = "https://graphviz.org"; + description = "Graph visualization tools"; + license = licenses.epl10; + platforms = platforms.unix; + maintainers = with maintainers; [ bjornfor raskin ]; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 47d0a0025df3..53405976013d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5968,14 +5968,6 @@ with pkgs; libdevil = libdevil-nox; }; - /* Readded by Michael Raskin. There are programs in the wild - * that do want 2.32 but not 2.0 or 2.36. Please give a day's notice for - * objections before removal. The feature is libgraph. - */ - graphviz_2_32 = (callPackage ../tools/graphics/graphviz/2.32.nix { - inherit (darwin.apple_sdk.frameworks) ApplicationServices; - }).overrideAttrs(x: { configureFlags = x.configureFlags ++ ["--with-cgraph=no"];}); - grin = callPackage ../tools/text/grin { }; ripgrep = callPackage ../tools/text/ripgrep {