mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-26 23:27:29 +03:00
plantuml-c4: Add sprites library
This commit is contained in:
parent
cec24ab1c8
commit
2d66f08d28
@ -16,12 +16,17 @@ let
|
||||
sha256 = "sha256-vk4YWdGb47OsI9mApGTQ7OfELRZdBouzKfUZq3kchcM=";
|
||||
};
|
||||
|
||||
sprites = fetchzip {
|
||||
url = "https://github.com/tupadr3/plantuml-icon-font-sprites/archive/fa3f885dbd45c9cd0cdf6c0e5e4fb51ec8b76582.zip";
|
||||
sha256 = "sha256-lt9+NNMIaZSkKNsGyHoqXUCTlKmZFGfNYYGjer6X0Xc=";
|
||||
};
|
||||
|
||||
# In order to pre-fix the plantuml.jar parameter with the argument
|
||||
# -Dplantuml.include.path=..., we post-fix the java command using a wrapper.
|
||||
# This way the plantuml derivation can remain unchanged.
|
||||
plantumlWithExtraPath =
|
||||
let
|
||||
plantumlIncludePath = lib.concatStringsSep ":" [ c4-lib ];
|
||||
plantumlIncludePath = lib.concatStringsSep ":" [ c4-lib sprites ];
|
||||
includeFlag = "-Dplantuml.include.path=${lib.escapeShellArg plantumlIncludePath}";
|
||||
postFixedJre =
|
||||
runCommand "jre-postfixed" { nativeBuildInputs = [ makeWrapper ]; } ''
|
||||
@ -53,10 +58,13 @@ stdenv.mkDerivation rec {
|
||||
runCommand "c4-plantuml-sample.png" { nativeBuildInputs = [ plantuml-c4 ]; } ''
|
||||
sed 's/https:.*\///' "${c4-lib}/samples/C4_Context Diagram Sample - enterprise.puml" > sample.puml
|
||||
plantuml sample.puml -o $out
|
||||
|
||||
sed 's/!include ..\//!include /' ${sprites}/examples/complex-example.puml > sprites.puml
|
||||
plantuml sprites.puml -o $out
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "PlantUML bundled with C4-Plantuml library";
|
||||
description = "PlantUML bundled with C4-Plantuml and plantuml sprites library";
|
||||
homepage = "https://github.com/plantuml-stdlib/C4-PlantUML";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ tfc ];
|
||||
|
Loading…
Reference in New Issue
Block a user