[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/09: gnu: Add java-flatlaf.
From: |
guix-commits |
Subject: |
06/09: gnu: Add java-flatlaf. |
Date: |
Thu, 4 Apr 2024 18:58:07 -0400 (EDT) |
rekado pushed a commit to branch master
in repository guix.
commit 4d399729c84edb3261211d35caabd7486be195b6
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Fri Apr 5 00:13:44 2024 +0200
gnu: Add java-flatlaf.
* gnu/packages/java-graphics.scm (java-flatlaf): New variable.
Change-Id: Ic4dc70ea5279e8ce3d302539bddb1cefc105abfd
---
gnu/packages/java-graphics.scm | 68 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/gnu/packages/java-graphics.scm b/gnu/packages/java-graphics.scm
index 6804d986bb..2b14fe30b1 100644
--- a/gnu/packages/java-graphics.scm
+++ b/gnu/packages/java-graphics.scm
@@ -21,6 +21,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix modules)
#:use-module (guix utils)
@@ -149,6 +150,73 @@ ascii art drawings that contain characters that resemble
lines like @samp{|}
@samp{/} @samp{-}), into proper bitmap graphics.")
(license license:lgpl3)))
+(define-public java-flatlaf
+ (package
+ (name "java-flatlaf")
+ (version "3.4.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/JFormDesigner/FlatLaf")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qr7g8s5m89q5k31mnxk18lflz3l2hid4i055mim3b0m4vjs40pi"))
+ (modules '((guix build utils)))
+ (snippet
+ '(for-each
+ delete-file
+ (find-files
"flatlaf-core/src/main/resources/com/formdev/flatlaf/natives/"
+ ".*")))))
+ (build-system ant-build-system)
+ (arguments
+ (list
+ #:tests? #false ;XXX requires junit5
+ #:jar-name "flatlaf.jar"
+ #:source-dir '(list "flatlaf-core/src/main/java")
+ #:test-dir '(list "flatlaf-core/src/test")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'configure 'build-native-code
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((jdk (assoc-ref inputs "jdk"))
+ (suffix #$(match (%current-system)
+ ("i686-linux" "i686")
+ ("armhf-linux" "armhf")
+ ("aarch64-linux" "aarch64")
+ ("x86_64-linux" "x86_64")
+ (_ "generic")))
+ (filename
+ (string-append "libflatlaf-linux-" suffix ".so"))
+ (target-dir
+ (string-append (getcwd)
+
"/flatlaf-core/src/main/resources/com/formdev/flatlaf/natives")))
+ (with-directory-excursion
"flatlaf-natives/flatlaf-natives-linux/"
+ (invoke "gcc" "-shared" "-O3" "-fPIC"
+ "src/main/cpp/ApiVersion.cpp"
+ "src/main/cpp/X11WmUtils.cpp"
+ "-Isrc/main/headers"
+ (string-append "-I" jdk "/include")
+ (string-append "-I" jdk "/include/linux")
+ "-o" filename)
+ (install-file filename target-dir)))))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "flatlaf-core/src/main/resources"
+ "build/classes"))))))
+ (inputs (list libx11 libxt))
+ (home-page "https://www.formdev.com/flatlaf/")
+ (synopsis "Flat Look and Feel for Java Swing applications")
+ (description "FlatLaf is a cross-platform Look and Feel for Java Swing
+desktop applications. It looks almost flat (no shadows or gradients), clean,
+simple and elegant. FlatLaf comes with Light, Dark, IntelliJ and Darcula
+themes, scales on HiDPI displays and runs on Java 8 or newer.
+
+The look is heavily inspired by Darcula and IntelliJ themes from IntelliJ IDEA
+2019.2+ and uses almost the same colors and icons.")
+ (license license:asl2.0)))
+
(define-public java-piccolo2d-core
(package
(name "java-piccolo2d-core")
- branch master updated (ade6845da6 -> b7ee2e458a), guix-commits, 2024/04/04
- 01/09: gnu: java-rsyntaxtextarea: Update to 3.4.0., guix-commits, 2024/04/04
- 03/09: gnu: java-marlin-renderer: Update to 0.9.4.8., guix-commits, 2024/04/04
- 07/09: gnu: Add java-flatlaf-intellij-themes., guix-commits, 2024/04/04
- 09/09: gnu: Add ksoloti-patcher., guix-commits, 2024/04/04
- 04/09: gnu: axoloti-runtime: Simplify., guix-commits, 2024/04/04
- 02/09: gnu: Add java-autocomplete., guix-commits, 2024/04/04
- 05/09: gnu: axoloti-runtime: Simplify with G-expression., guix-commits, 2024/04/04
- 06/09: gnu: Add java-flatlaf.,
guix-commits <=
- 08/09: gnu: Add ksoloti-runtime., guix-commits, 2024/04/04