uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
65
pkgs/development/compilers/kotlin/native.nix
Normal file
65
pkgs/development/compilers/kotlin/native.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, jre
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kotlin-native";
|
||||
version = "1.6.21";
|
||||
|
||||
src = let
|
||||
getArch = {
|
||||
"aarch64-darwin" = "macos-aarch64";
|
||||
"x86_64-darwin" = "macos-x86_64";
|
||||
"x86_64-linux" = "linux-x86_64";
|
||||
}.${stdenv.system} or (throw "${pname}-${version}: ${stdenv.system} is unsupported.");
|
||||
|
||||
getUrl = version: arch:
|
||||
"https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-native-${arch}-${version}.tar.gz";
|
||||
|
||||
getHash = arch: {
|
||||
"macos-aarch64" = "sha256-kkJvlDtK0Y+zeht+9fLX2HL2fyKOIyo0qYkJk+35tMU=";
|
||||
"macos-x86_64" = "sha256-znTMO8h0pC6bkSUVYmxWPe4HVQPQw/VcJM11ckmG8CA=";
|
||||
"linux-x86_64" = "sha256-r1H2riRLsZl5+65tw6/cp7rkJWjWoz8PozHt1mWmEfo=";
|
||||
}.${arch};
|
||||
in
|
||||
fetchurl {
|
||||
url = getUrl version getArch;
|
||||
hash = getHash getArch;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
jre
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
rm bin/kotlinc
|
||||
mv * $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/run_konan --prefix PATH ":" ${lib.makeBinPath [ jre ]}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://kotlinlang.org/";
|
||||
description = "A modern programming language that makes developers happier";
|
||||
longDescription = ''
|
||||
Kotlin/Native is a technology for compiling Kotlin code to native
|
||||
binaries, which can run without a virtual machine. It is an LLVM based
|
||||
backend for the Kotlin compiler and native implementation of the Kotlin
|
||||
standard library.
|
||||
'';
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ fabianhjr ];
|
||||
platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue