6 , buildNativeImage ? true
9 stdenv.mkDerivation rec {
10 pname = "dbqn" + lib.optionalString buildNativeImage "-native";
13 src = fetchFromGitHub {
17 sha256 = "1kxzxz2hrd1871281s4rsi569qk314aqfmng9pkqn8gv9nqhmph0";
28 patchShebangs --build ./build8
35 '' + lib.optionalString buildNativeImage ''
36 native-image --report-unsupported-elements-at-runtime \
37 -H:CLibraryPath=${lib.getLib jdk}/lib -J-Dfile.encoding=UTF-8 \
48 '' + (if buildNativeImage then ''
51 mkdir -p $out/share/${pname}
52 mv BQN.jar $out/share/${pname}/
54 makeWrapper "${lib.getBin jdk}/bin/java" "$out/bin/dbqn" \
55 --add-flags "-jar $out/share/${pname}/BQN.jar"
57 ln -s $out/bin/dbqn $out/bin/bqn
63 homepage = "https://github.com/dzaima/BQN";
64 description = "A BQN implementation in Java" + lib.optionalString buildNativeImage ", compiled as a native image";
65 license = licenses.mit;
66 maintainers = with maintainers; [ AndersonTorres sternenseemann ];
67 inherit (jdk.meta) platforms;
68 broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dbqn-native.x86_64-darwin
71 # TODO: Processing app
72 # TODO: minimalistic JDK