aboutsummaryrefslogtreecommitdiff
#pragma once

namespace nix {


#define WORKER_MAGIC_1 0x6e697863
#define WORKER_MAGIC_2 0x6478696f

#define PROTOCOL_VERSION 0x164
#define GET_PROTOCOL_MAJOR(x) ((x) & 0xff00)
#define GET_PROTOCOL_MINOR(x) ((x) & 0x00ff)


typedef enum {
    wopIsValidPath = 1,
    wopHasSubstitutes = 3,
    wopQueryPathHash = 4,
    wopQueryReferences = 5,
    wopQueryReferrers = 6,
    wopAddToStore = 7,
    wopAddTextToStore = 8,
    wopBuildPaths = 9,
    wopEnsurePath = 10,
    wopAddTempRoot = 11,
    wopAddIndirectRoot = 12,
    wopSyncWithGC = 13,
    wopFindRoots = 14,
    wopExportPath = 16,
    wopQueryDeriver = 18,
    wopSetOptions = 19,
    wopCollectGarbage = 20,
    wopQuerySubstitutablePathInfo = 21,
    wopQueryDerivationOutputs = 22,
    wopQueryAllValidPaths = 23,
    wopQueryFailedPaths = 24,
    wopClearFailedPaths = 25,
    wopQueryPathInfo = 26,
    wopImportPaths = 27,
    wopQueryDerivationOutputNames = 28,
    wopQueryPathFromHashPart = 29,
    wopQuerySubstitutablePathInfos = 30,
    wopQueryValidPaths = 31,
    wopQuerySubstitutablePaths = 32,
    wopQueryValidDerivers = 33,
    wopOptimiseStore = 34,
    wopVerifyStore = 35,
    wopBuiltinBuilders = 80,
    wopSubstituteURLs = 81
} WorkerOp;


#define STDERR_NEXT  0x6f6c6d67
#define STDERR_READ  0x64617461 // data needed from source
#define STDERR_WRITE 0x64617416 // data for sink
#define STDERR_LAST  0x616c7473
#define STDERR_ERROR 0x63787470


Path readStorePath(Source & from);
template<class T> T readStorePaths(Source & from);


}
do Wurmus <rekado@elephly.net>2024-04-05 00:53:39 +0200 commit4d399729c84edb3261211d35caabd7486be195b6 (patch) tree27f80cccd4a474068c674b3ce25fb9f97872d96c /gnu/packages parentb162136d875bdd1042ed47b0ecf4d6bf2296fb34 (diff)downloadguix-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')
-rw-r--r--gnu/packages/java-graphics.scm68
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")