From fa26d322e39cb29aafb071a1036c8db2971e590d Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Tue, 13 Dec 2022 23:14:30 +0300 Subject: [PATCH] d2: update to latest master --- pkgs/d2/d2-unwrapped.nix | 12 ++++------ pkgs/d2/d2plugin-tala.nix | 2 +- ...402_preserve_leading_comment_spacing.patch | 23 ------------------- 3 files changed, 6 insertions(+), 31 deletions(-) delete mode 100644 pkgs/d2/patches/402_preserve_leading_comment_spacing.patch diff --git a/pkgs/d2/d2-unwrapped.nix b/pkgs/d2/d2-unwrapped.nix index 8c7a2a4..8b44d82 100644 --- a/pkgs/d2/d2-unwrapped.nix +++ b/pkgs/d2/d2-unwrapped.nix @@ -4,7 +4,7 @@ , installShellFiles }: -let version = "2022-12-12"; in +let version = "2022-12-13"; in buildGoModule { pname = "d2"; inherit version; @@ -12,11 +12,11 @@ buildGoModule { src = fetchFromGitHub { owner = "terrastruct"; repo = "d2"; - rev = "a557d1a6edeb18d692c1e1c20c3c0f0cffc2ed21"; - sha256 = "sha256-EzaBURGLnxSX+1FjYQLP7oxov7dGk7xhAnpV8DPzW/g="; + rev = "bf139735bf4ae782d9e855d158d27b5c34459ba1"; + sha256 = "sha256-KyOaVIb8l9sewcHtHWDnhdxdFIOjzu0lejTvTs7Pa10="; }; - vendorSha256 = "sha256-p0os+ap2k5nYWI4+Hf4pwJfHTXaPJldJmf6nznhuRFA="; + vendorSha256 = "sha256-sQ8QY4A/IzlnomQETUGPwAqQDd5yyKv98DwctfJ5PSk="; ldflags = [ "-s" @@ -26,9 +26,7 @@ buildGoModule { nativeBuildInputs = [ installShellFiles ]; - patches = [ - ./patches/402_preserve_leading_comment_spacing.patch - ]; + patches = [ ]; postInstall = "installManPage ci/release/template/man/d2.1"; diff --git a/pkgs/d2/d2plugin-tala.nix b/pkgs/d2/d2plugin-tala.nix index 083448d..5b32107 100644 --- a/pkgs/d2/d2plugin-tala.nix +++ b/pkgs/d2/d2plugin-tala.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation { installPhase = '' mkdir -p $out/bin - cp bin/d2plugin-tala $out/bin + install -Dm555 bin/d2plugin-tala $out/bin installManPage man/d2plugin-tala.1 installManPage man/tala.1 ''; diff --git a/pkgs/d2/patches/402_preserve_leading_comment_spacing.patch b/pkgs/d2/patches/402_preserve_leading_comment_spacing.patch deleted file mode 100644 index 3c7c696..0000000 --- a/pkgs/d2/patches/402_preserve_leading_comment_spacing.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/d2format/format.go b/d2format/format.go -index 754e3302..a45d55f6 100644 ---- a/d2format/format.go -+++ b/d2format/format.go -@@ -76,17 +76,17 @@ func (p *printer) node(n d2ast.Node) { - p.edgeIndex(n) - } - } - - func (p *printer) comment(c *d2ast.Comment) { - lines := strings.Split(c.Value, "\n") - for i, line := range lines { - p.sb.WriteString("#") -- if line != "" && !strings.HasPrefix(line, " ") { -+ if line != "" { - p.sb.WriteByte(' ') - } - p.sb.WriteString(line) - if i < len(lines)-1 { - p.newline() - } - } - }