33# However this nix file just works on Luogu Judge.
44let
55 pname = "kotlin-native" ;
6- version = "1.5.20 " ;
7- sha256 = "9449219ec9465b14adda1b730ac14ef02da93e9f98219f7303bf70c4c875b7db " ;
6+ version = "1.5.21 " ;
7+ sha256 = "fa3dfec9c11711c2b713a1482bcc4511bb8f73f182f12aa7d858943f6f084397 " ;
88
99 unwrapped = stdenv . mkDerivation {
1010 pname = "${ pname } -unwrapped" ;
1414 url = "https://github.com/JetBrains/kotlin/releases/download/v${ version } /kotlin-native-linux-${ version } .tar.gz" ;
1515 inherit sha256 ;
1616 } ;
17- propagatedBuildInputs = [ jre ] ;
17+ propagatedBuildInputs = [ jre bash ] ;
1818
1919 buildPhase = ''
2020 export KONAN_DATA_DIR=$PWD/konan-data
21- export PATH=$PATH:${ jre } /bin:$PWD/build- bin
22- cp -r bin build-bin
23- patchShebangs build- bin
21+ export PATH=$PATH:${ jre } /bin:$PWD/bin
22+ rm bin/kotlinc # kotlinc is deprecated and will be removed in the future
23+ patchShebangs bin
2424 kotlinc-native -Xcheck-dependencies
25- rm -r build-bin
2625 '' ;
2726 installPhase = ''
2827 mkdir -p $out
2928 mv * $out
30- rm $out/bin/kotlinc # kotlinc will be removed in the future
31- patchShebangs bin
3229 '' ;
3330
3431 dontFixup = true ;
3532 dontStrip = true ;
3633 dontPatchELF = true ;
34+ dontPatchShebangs = true ;
3735
3836 outputHashMode = "recursive" ;
3937 outputHashAlgo = "sha256" ;
40- outputHash = "01kxmkd9vcjl0x4g9ylihz6z426zlm7jk2y5q580zs0prncqrk7x " ;
38+ outputHash = "0rpb3qd6slfp6wms8aj706zhdyqsr0cz3w64ri26w4ljh4d5fns1 " ;
4139 } ;
4240in stdenv . mkDerivation {
4341 inherit pname ;
@@ -56,12 +54,10 @@ in stdenv.mkDerivation {
5654 '' ;
5755 installPhase = ''
5856 mkdir -p $out/bin
59- echo "$dependenciesLinkHelper" > $out/dependenciesLinkHelper.sh
60- chmod a+x $out/dependenciesLinkHelper.sh
6157 for p in $(ls ${ unwrapped } /bin/); do
6258 makeWrapper ${ unwrapped } /bin/$p $out/bin/$p \
6359 --prefix PATH ":" ${ jre } /bin \
64- --run $out/ dependenciesLinkHelper.sh \
60+ --run "$ dependenciesLinkHelper" \
6561 ;
6662 done
6763 '' ;
0 commit comments