From cd3ce3d4d183e8b7a5069b19d3fec7a9f40f263f Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 31 Jan 2026 14:55:57 +0100 Subject: gnu: emacs-difftastic: Update to 1.0.0. * gnu/packages/emacs-xyz.scm (emacs-difftastic): Update to 1.0.0. Change-Id: I81efb87ec88b32533a111ab9a10ce87315cfc2a4 --- gnu/packages/emacs-xyz.scm | 156 ++++++++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 79 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 6f9bd540e0..51b5e2e03a 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -23075,88 +23075,86 @@ and revert them selectively.") (define-public emacs-difftastic ;; No releases or tags. - (let ((commit "5a23176610b7181f52b7088cbdf1d2a95691b27e") - (revision "0")) - (package - (name "emacs-difftastic") - (version (git-version "0.0.0" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pkryger/difftastic.el/") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0nl1kcaxgq67338knfhmxxmxl5npsvjvvs3z7s8m5z4wpknsn1rd")))) - (build-system emacs-build-system) - (arguments - (list - #:test-command - #~(list "emacs" "--batch" - "-l" "test/difftastic.t.el" - "-l" "test/difftastic-bindings.t.el" - "-f" "ert-run-tests-batch-and-exit") - #:phases - #~(modify-phases %standard-phases - (add-before 'check 'unpack-el-mock - (lambda _ - (install-file - (string-append - #$(this-package-native-input "el-mock") "/el-mock.el") - "."))) - ;; 11/435 tests fail. - (add-before 'check 'skip-failing-tests - (lambda _ - (let ((skip-tests - `("-forge-pullreq-show-diff-args:buffer-post-object" - "-forge-pullreq-show-diff-args:current-topic" - ,(string-append - "-forge-pullreq-show-diff-args" - ":new-pullreq-with-base-and-head") - "-forge-pullreq-show-diff-args:single-prefix-argument" - "-magit-diff-buffer-file:no-file" - "-forge-pullreq-show-diff-args:triple-prefix-argument" - "forge-create-pulreq-show-diff:basic" - "forge-pullreq-show-diff:basic" - "forge-pullreq-show-diff:double-prefix-arg" - "forge-pullreq-show-diff:single-prefix-arg" - "forge-pullreq-show-diff:triple-prefix-arg"))) - (substitute* "test/difftastic.t.el" - (("\\(ert-deftest difftastic-([a-z:-]*) \\(\\)" all test) - (if (member test skip-tests) - (string-append all "(skip-unless nil)") - all)))))) - (add-after 'unpack 'substitute-python-path - (lambda* (#:key inputs #:allow-other-keys) - (emacs-substitute-variables "difftastic.el" - ("difftastic-executable" - (search-input-file inputs "/bin/difft")))))))) - (inputs - (list difftastic)) - (propagated-inputs - (list emacs-compat emacs-magit)) - (native-inputs - (list - ;; This package uses a custom version of el-mock for the tests. - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/pkryger/el-mock.el") - (commit "8fb750784faf07445033441bd86485fecfdb9413"))) - (file-name "el-mock") - (sha256 - (base32 - "1qbcj952hrrpr26rh8q77vf5i35nzkbsrqdvj7rrc307dp0n2gsv"))))) - (home-page "https://github.com/pkryger/difftastic.el/") - (synopsis "Wrapper interface for @code{difft} command line tool") - (description - "This package integrates @code{difftastic} structural diff tool into + (package + (name "emacs-difftastic") + (version "1.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pkryger/difftastic.el/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1rc5gnb1hdlh7gjpg8igrrzcvxk53h76mcbnbhmfdhxfixb2xh8r")))) + (build-system emacs-build-system) + (arguments + (list + #:test-command + #~(list "emacs" "--batch" + "-l" "test/difftastic.t.el" + "-l" "test/difftastic-bindings.t.el" + "-f" "ert-run-tests-batch-and-exit") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'unpack-el-mock + (lambda _ + (install-file + (string-append + #$(this-package-native-input "el-mock") "/el-mock.el") + "."))) + ;; 11/435 tests fail. + (add-before 'check 'skip-failing-tests + (lambda _ + (let ((skip-tests + `("-forge-pullreq-show-diff-args:buffer-post-object" + "-forge-pullreq-show-diff-args:current-topic" + ,(string-append + "-forge-pullreq-show-diff-args" + ":new-pullreq-with-base-and-head") + "-forge-pullreq-show-diff-args:single-prefix-argument" + "-magit-diff-buffer-file:no-file" + "-forge-pullreq-show-diff-args:triple-prefix-argument" + "forge-create-pulreq-show-diff:basic" + "forge-pullreq-show-diff:basic" + "forge-pullreq-show-diff:double-prefix-arg" + "forge-pullreq-show-diff:single-prefix-arg" + "forge-pullreq-show-diff:triple-prefix-arg"))) + (substitute* "test/difftastic.t.el" + (("\\(ert-deftest difftastic-([a-z:-]*) \\(\\)" all test) + (if (member test skip-tests) + (string-append all "(skip-unless nil)") + all)))))) + (add-after 'unpack 'substitute-python-path + (lambda* (#:key inputs #:allow-other-keys) + (emacs-substitute-variables "difftastic.el" + ("difftastic-executable" + (search-input-file inputs "/bin/difft")))))))) + (inputs + (list difftastic)) + (propagated-inputs + (list emacs-compat emacs-magit)) + (native-inputs + (list + ;; This package uses a custom version of el-mock for the tests. + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pkryger/el-mock.el") + (commit "8fb750784faf07445033441bd86485fecfdb9413"))) + (file-name "el-mock") + (sha256 + (base32 + "1qbcj952hrrpr26rh8q77vf5i35nzkbsrqdvj7rrc307dp0n2gsv"))))) + (home-page "https://github.com/pkryger/difftastic.el/") + (synopsis "Wrapper interface for @code{difft} command line tool") + (description + "This package integrates @code{difftastic} structural diff tool into Emacs. It automatically displays @code{difftastic} output within Emacs using faces from the user theme, ensuring consistency with overall coding environment.") - (license license:gpl3+)))) + (license license:gpl3+))) (define-public emacs-diminish ;; XXX: Upstream did not tag last release. -- cgit v1.3