Shell changes
This commit is contained in:
parent
dbd34afd55
commit
9fc6d24290
2 changed files with 6 additions and 12 deletions
|
@ -6,7 +6,7 @@ pkgs.mkShell {
|
||||||
chromedriver
|
chromedriver
|
||||||
libmysqlclient
|
libmysqlclient
|
||||||
nodejs-14_x
|
nodejs-14_x
|
||||||
ruby_2_7
|
ruby_3_0
|
||||||
yarn
|
yarn
|
||||||
zlib
|
zlib
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,25 +1,19 @@
|
||||||
let
|
let
|
||||||
pkgs = import <nixpkgs> { config.permittedInsecurePackages = [ "ffmpeg-3.4.8" ]; };
|
pkgs = import <nixpkgs> { };
|
||||||
extraRpath = pkgs.lib.strings.makeLibraryPath (with pkgs; [ ffmpeg_3 ]);
|
|
||||||
java = pkgs.writeShellScriptBin "java" ''
|
|
||||||
old_path="$(patchelf --print-rpath ${pkgs.jdk11}/bin/java)"
|
|
||||||
LD_LIBRARY_PATH="$old_path:${extraRpath}" ${pkgs.jdk11}/bin/java $@
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
java
|
|
||||||
(
|
(
|
||||||
pkgs.writeShellScriptBin "compile" ''
|
pkgs.writeShellScriptBin "compile" ''
|
||||||
find src -name '*.java' -print0 | xargs --no-run-if-empty -0 ${jdk11}/bin/javac -d out -sourcepath src
|
find src -name '*.java' -print0 | xargs --no-run-if-empty -0 ${jdk17}/bin/javac -d out -sourcepath src
|
||||||
find src -type d -printf '%P\0' | xargs -0 -I \{\} mkdir -p out/\{\}
|
find src -type d -printf '%P\0' | xargs -0 -I \{\} mkdir -p out/\{\}
|
||||||
find resources -type d -printf '%P\0' | xargs -0 -I \{\} mkdir -p out/\{\}
|
find resources -type d -printf '%P\0' | xargs -0 -I \{\} mkdir -p out/\{\}
|
||||||
find src -type f -not -name '*.java' -printf '%P\0' | xargs -0 -I \{\} cp src/\{\} out/\{\}
|
find src -type f -not -name '*.java' -printf '%P\0' | xargs -0 -I \{\} cp src/\{\} out/\{\}
|
||||||
find resources -type f -not -name '*.java' -printf '%P\0' | xargs -0 -I \{\} cp resources/\{\} out/\{\}
|
find resources -type f -not -name '*.java' -printf '%P\0' | xargs -0 -I \{\} cp resources/\{\} out/\{\}
|
||||||
(cd out && ${java}/bin/java polis.Main)
|
(cd out && ${jdk17}/bin/java polis.Main)
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
jdk11
|
jdk17
|
||||||
openjfx11
|
openjfx17
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue