diff --git a/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix new file mode 100644 index 000000000000..c40e54a41332 --- /dev/null +++ b/pkgs/tools/typesetting/tex/pgf-tikz/pgf-3.x.nix @@ -0,0 +1,37 @@ +{ lib +, stdenvNoCC +, fetchFromGitHub +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "pgf"; + version = "3.1.9a"; + + src = fetchFromGitHub { + owner = "pgf-tikz"; + repo = "pgf"; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-7FBaDEaCpiiLMcHWGv5AnUNc5AFqtm5o/R9bJePIomk="; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/texmf-nix + cp -prd doc source tex/{context,generic,latex,plain} $out/share/texmf-nix/ + + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://github.com/pgf-tikz/pgf"; + description = "A Portable Graphic Format for TeX - version ${finalAttrs.version}"; + branch = lib.versions.major version; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ AndersonTorres ]; + platforms = platforms.unix; + }; +}) diff --git a/pkgs/tools/typesetting/tex/pgf/3.x.nix b/pkgs/tools/typesetting/tex/pgf/3.x.nix deleted file mode 100644 index 9af41ff1f43f..000000000000 --- a/pkgs/tools/typesetting/tex/pgf/3.x.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ lib, stdenv, fetchurl, unzip }: - -stdenv.mkDerivation rec { - pname = "pgf"; - version = "3.0.0"; - - src = fetchurl { - url = "mirror://sourceforge/project/pgf/pgf/version%20${version}/pgf_${version}.tds.zip"; - sha256 = "0kj769hyp4z2zmdv3f8xv443wcfqn5nkkbzxzqgfxjizlz81aav7"; - }; - - nativeBuildInputs = [ unzip ]; - - # Multiple files problem - unpackPhase = '' - mkdir pgf - cd pgf - unzip $src - ''; - - dontBuild = true; - - installPhase = " - mkdir -p $out/share/texmf-nix - cp -prd * $out/share/texmf-nix - "; - - meta = with lib; { - branch = "3"; - platforms = platforms.unix; - license = licenses.gpl2; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index db22c5db697e..d0b0a766dc56 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4047,7 +4047,7 @@ with pkgs; pgf2 = callPackage ../tools/typesetting/tex/pgf-tikz/pgf-2.x.nix { }; - pgf3 = callPackage ../tools/typesetting/tex/pgf/3.x.nix { }; + pgf3 = callPackage ../tools/typesetting/tex/pgf-tikz/pgf-3.x.nix { }; pgf = pgf2;