diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2024-07-02 00:28:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-02 00:28:46 +0200 |
commit | e8bb4ce7f69ffa414a8fa4d48fd1d13e79f09e3d (patch) | |
tree | 5a17474d19970fd2f1937cede771c5945f0a3bbe /pkgs | |
parent | baa28bbca62a9712c8a61eea4d9937e26941bcb1 (diff) | |
parent | a677b148fb7e64982b5a34faa5c0110b4bdd0eec (diff) |
Merge pull request #321821 from farcaller/cq
cq: init at 2024.06.24-12.10
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/by-name/cq/cq/package.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/by-name/cq/cq/package.nix b/pkgs/by-name/cq/cq/package.nix new file mode 100644 index 0000000000000..82fc31a7bbdd3 --- /dev/null +++ b/pkgs/by-name/cq/cq/package.nix @@ -0,0 +1,46 @@ +{ lib +, fetchFromGitHub +, fetchurl +, buildGraalvmNativeImage +, graalvmCEPackages +}: + +buildGraalvmNativeImage rec { + pname = "cq"; + version = "2024.06.24-12.10"; + + # we need both src (the prebuild jar) + src = fetchurl { + url = "https://github.com/markus-wa/cq/releases/download/${version}/cq.jar"; + hash = "sha256-iULV+j/AuGVYPYhbOTQTKd3n+VZhWQYBRE6cRiaa1/M="; + }; + + # and build-src (for the native-image build process) + build-src = fetchFromGitHub { + owner = "markus-wa"; + repo = "cq"; + rev = version; + hash = "sha256-yjAC2obipdmh+JlHzVUTMtTXN2VKe4WKkyJyu2Q93c8="; + }; + + graalvmDrv = graalvmCEPackages.graalvm-ce; + + executable = "cq"; + + # copied verbatim from the upstream build script https://github.com/markus-wa/cq/blob/main/package/build-native.sh#L5 + extraNativeImageBuildArgs = [ + "--report-unsupported-elements-at-runtime" + "--initialize-at-build-time" + "--no-server" + "-H:ReflectionConfigurationFiles=${build-src}/package/reflection-config.json" + ]; + + meta = with lib; { + description = "Clojure Query: A Command-line Data Processor for JSON, YAML, EDN, XML and more"; + homepage = "https://github.com/markus-wa/cq"; + changelog = "https://github.com/markus-wa/cq/releases/releases/tag/${version}"; + license = licenses.epl20; + maintainers = with maintainers; [ farcaller ]; + platforms = platforms.unix; + }; +} |