From 1a821b629bfb71c69ab64459b9dbe65fa2e3da93 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 29 Oct 2022 15:28:38 -0300 Subject: [PATCH] pgfplots: 1.5.1 -> 1.18.1 --- .../typesetting/tex/pgf-tikz/pgfplots.nix | 33 +++++++++++++++++++ .../typesetting/tex/pgfplots/default.nix | 29 ---------------- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 34 insertions(+), 30 deletions(-) create mode 100644 pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix delete mode 100644 pkgs/tools/typesetting/tex/pgfplots/default.nix diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix new file mode 100644 index 000000000000..1e4c5c2d2fa5 --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgfplots.nix @@ -0,0 +1,33 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgfplots"; + version = "1.18.1"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgfplots"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-cTfOMasBptm0lydKeNHPnjdEyFjEb88awYPn8S2m73c="; + }; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd doc tex/{context,generic,latex,plain} $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "http://pgfplots.sourceforge.net"; + description = "TeX package to draw plots directly in TeX in two and three dimensions"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgfplots/default.nix b/pkgs/tools/typesetting/tex/pgfplots/default.nix deleted file mode 100644 index 0a2667f284e9..000000000000 --- a/pkgs/tools/typesetting/tex/pgfplots/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{lib, stdenv, fetchurl, unzip}: - -stdenv.mkDerivation rec { - pname = "pgfplots"; - version = "1.5.1"; - - src = fetchurl { - url = "mirror://sourceforge/pgfplots/pgfplots_${version}.tds.zip"; - sha256 = "1xajrmq35i0qlsfwydy5zzg6f1jg88hqqh5b3xsmglzrarnllbdi"; - }; - - nativeBuildInputs = [ unzip ]; - - unpackPhase = "unzip $src"; - - dontBuild = true; - - installPhase = " - mkdir -p $out/share/texmf-nix - cp -prd * $out/share/texmf-nix - "; - - meta = with lib; { - description = "TeX package to draw plots directly in TeX in two and three dimensions"; - homepage = "http://pgfplots.sourceforge.net"; - platforms = platforms.unix; - license = licenses.gpl3Plus; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d0b0a766dc56..0a4e2fa734f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4051,7 +4051,7 @@ with pkgs; pgf = pgf2; - pgfplots = callPackage ../tools/typesetting/tex/pgfplots { }; + pgfplots = callPackage ../tools/typesetting/tex/pgf-tikz/pgfplots.nix { }; pplatex = callPackage ../tools/typesetting/tex/pplatex { };