commit
411587fce2
2 changed files with 61 additions and 0 deletions
57
pkgs/development/compilers/odin/default.nix
Normal file
57
pkgs/development/compilers/odin/default.nix
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, llvmPackages
|
||||||
|
, makeWrapper
|
||||||
|
, libiconv
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (llvmPackages) stdenv;
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
|
pname = "odin";
|
||||||
|
version = "0.13.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "odin-lang";
|
||||||
|
repo = "Odin";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "ke2HPxVtF/Lh74Tv6XbpM9iLBuXLdH1+IE78MAacfYY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
makeWrapper
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed -i 's/^GIT_SHA=.*$/GIT_SHA=/' Makefile
|
||||||
|
'';
|
||||||
|
|
||||||
|
dontConfigure = true;
|
||||||
|
|
||||||
|
buildFlags = [
|
||||||
|
"release"
|
||||||
|
];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp odin $out/bin/odin
|
||||||
|
cp -r core $out/bin/core
|
||||||
|
|
||||||
|
wrapProgram $out/bin/odin --prefix PATH : ${lib.makeBinPath (with llvmPackages; [
|
||||||
|
bintools
|
||||||
|
llvm
|
||||||
|
clang
|
||||||
|
lld
|
||||||
|
])}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A fast, concise, readable, pragmatic and open sourced programming language";
|
||||||
|
homepage = "https://odin-lang.org/";
|
||||||
|
license = licenses.bsd2;
|
||||||
|
maintainers = with maintainers; [ luc65r ];
|
||||||
|
platforms = platforms.x86_64;
|
||||||
|
};
|
||||||
|
}
|
|
@ -21460,6 +21460,10 @@ in
|
||||||
|
|
||||||
octomap = callPackage ../development/libraries/octomap { };
|
octomap = callPackage ../development/libraries/octomap { };
|
||||||
|
|
||||||
|
odin = callPackage ../development/compilers/odin {
|
||||||
|
llvmPackages = llvmPackages_11;
|
||||||
|
};
|
||||||
|
|
||||||
odp-dpdk = callPackage ../os-specific/linux/odp-dpdk { };
|
odp-dpdk = callPackage ../os-specific/linux/odp-dpdk { };
|
||||||
|
|
||||||
odroid-xu3-bootloader = callPackage ../tools/misc/odroid-xu3-bootloader { };
|
odroid-xu3-bootloader = callPackage ../tools/misc/odroid-xu3-bootloader { };
|
||||||
|
|
Loading…
Reference in a new issue