Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildGraalvmNativeImage
3, fetchurl
4, testers
5, zprint
6}:
7
8buildGraalvmNativeImage rec {
9 pname = "zprint";
10 version = "1.2.9";
11
12 src = fetchurl {
13 url = "https://github.com/kkinnear/${pname}/releases/download/${version}/${pname}-filter-${version}";
14 sha256 = "sha256-4gSGD7Jiu1mqyPMoQrrPT60EFXs7ySfjpT9wSyhp3ig=";
15 };
16
17 extraNativeImageBuildArgs = [
18 "--no-server"
19 "-H:EnableURLProtocols=https,http"
20 "-H:+ReportExceptionStackTraces"
21 "--report-unsupported-elements-at-runtime"
22 "--initialize-at-build-time"
23 "--no-fallback"
24 ];
25
26 passthru.tests.version = testers.testVersion {
27 inherit version;
28 package = zprint;
29 command = "zprint --version";
30 };
31
32 meta = with lib; {
33 description = "Clojure/EDN source code formatter and pretty printer";
34 longDescription = ''
35 Library and command line tool providing a variety of pretty printing capabilities
36 for both Clojure code and Clojure/EDN structures. It can meet almost anyone's needs.
37 As such, it supports a number of major source code formatting approaches
38 '';
39 homepage = "https://github.com/kkinnear/zprint";
40 license = licenses.mit;
41 maintainers = with maintainers; [ stelcodes ];
42 mainProgram = "zprint";
43 };
44}