diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2024-04-05 00:13:44 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2024-04-05 00:53:39 +0200 |
commit | 4d399729c84edb3261211d35caabd7486be195b6 (patch) | |
tree | 27f80cccd4a474068c674b3ce25fb9f97872d96c /gnu/packages/java-graphics.scm | |
parent | b162136d875bdd1042ed47b0ecf4d6bf2296fb34 (diff) | |
download | guix-4d399729c84edb3261211d35caabd7486be195b6.tar.gz guix-4d399729c84edb3261211d35caabd7486be195b6.zip |
gnu: Add java-flatlaf.
* gnu/packages/java-graphics.scm (java-flatlaf): New variable.
Change-Id: Ic4dc70ea5279e8ce3d302539bddb1cefc105abfd
Diffstat (limited to 'gnu/packages/java-graphics.scm')
-rw-r--r-- | gnu/packages/java-graphics.scm | 68 |
1 files changed, 68 insertions, 0 deletions
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") |