odin: 0.13.0 -> dev-2023-05
This commit is contained in:
parent
fa6c140ffd
commit
38e5815422
|
@ -1429,6 +1429,12 @@
|
||||||
githubId = 453170;
|
githubId = 453170;
|
||||||
name = "Alastair Pharo";
|
name = "Alastair Pharo";
|
||||||
};
|
};
|
||||||
|
astavie = {
|
||||||
|
email = "astavie@pm.me";
|
||||||
|
github = "astavie";
|
||||||
|
githubId = 7745457;
|
||||||
|
name = "Astavie";
|
||||||
|
};
|
||||||
astro = {
|
astro = {
|
||||||
email = "astro@spaceboyz.net";
|
email = "astro@spaceboyz.net";
|
||||||
github = "astro";
|
github = "astro";
|
||||||
|
|
|
@ -1,31 +1,43 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, llvmPackages
|
, llvmPackages_13
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, libiconv
|
, libiconv
|
||||||
|
, MacOSX-SDK
|
||||||
|
, which
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
llvmPackages = llvmPackages_13;
|
||||||
inherit (llvmPackages) stdenv;
|
inherit (llvmPackages) stdenv;
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "odin";
|
pname = "odin";
|
||||||
version = "0.13.0";
|
version = "dev-2023-05";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "odin-lang";
|
owner = "odin-lang";
|
||||||
repo = "Odin";
|
repo = "Odin";
|
||||||
rev = "v${version}";
|
rev = version;
|
||||||
sha256 = "ke2HPxVtF/Lh74Tv6XbpM9iLBuXLdH1+IE78MAacfYY=";
|
sha256 = "sha256-qEewo2h4dpivJ7D4RxxBZbtrsiMJ7AgqJcucmanbgxY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper
|
makeWrapper which
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||||
|
|
||||||
postPatch = ''
|
LLVM_CONFIG = "${llvmPackages.llvm.dev}/bin/llvm-config";
|
||||||
sed -i 's/^GIT_SHA=.*$/GIT_SHA=/' Makefile
|
|
||||||
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
|
sed -i src/main.cpp \
|
||||||
|
-e 's|-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk|-syslibroot ${MacOSX-SDK}|'
|
||||||
|
'' + ''
|
||||||
|
sed -i build_odin.sh \
|
||||||
|
-e 's/^GIT_SHA=.*$/GIT_SHA=/' \
|
||||||
|
-e 's/LLVM-C/LLVM/' \
|
||||||
|
-e 's/framework System/lSystem/'
|
||||||
|
patchShebangs build_odin.sh
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
@ -37,21 +49,26 @@ in stdenv.mkDerivation rec {
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp odin $out/bin/odin
|
cp odin $out/bin/odin
|
||||||
cp -r core $out/bin/core
|
|
||||||
|
|
||||||
wrapProgram $out/bin/odin --prefix PATH : ${lib.makeBinPath (with llvmPackages; [
|
mkdir -p $out/share
|
||||||
bintools
|
cp -r core $out/share/core
|
||||||
llvm
|
cp -r vendor $out/share/vendor
|
||||||
clang
|
|
||||||
lld
|
wrapProgram $out/bin/odin \
|
||||||
])}
|
--prefix PATH : ${lib.makeBinPath (with llvmPackages; [
|
||||||
|
bintools
|
||||||
|
llvm
|
||||||
|
clang
|
||||||
|
lld
|
||||||
|
])} \
|
||||||
|
--set-default ODIN_ROOT $out/share
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A fast, concise, readable, pragmatic and open sourced programming language";
|
description = "A fast, concise, readable, pragmatic and open sourced programming language";
|
||||||
homepage = "https://odin-lang.org/";
|
homepage = "https://odin-lang.org/";
|
||||||
license = licenses.bsd2;
|
license = licenses.bsd3;
|
||||||
maintainers = with maintainers; [ luc65r ];
|
maintainers = with maintainers; [ luc65r astavie ];
|
||||||
platforms = platforms.x86_64;
|
platforms = platforms.x86_64 ++ [ "aarch64-darwin" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -27596,7 +27596,9 @@ with pkgs;
|
||||||
|
|
||||||
octomap = callPackage ../development/libraries/octomap { };
|
octomap = callPackage ../development/libraries/octomap { };
|
||||||
|
|
||||||
odin = callPackage ../development/compilers/odin { };
|
odin = callPackage ../development/compilers/odin {
|
||||||
|
inherit (pkgs.darwin.apple_sdk_11_0) MacOSX-SDK;
|
||||||
|
};
|
||||||
|
|
||||||
odp-dpdk = callPackage ../os-specific/linux/odp-dpdk { };
|
odp-dpdk = callPackage ../os-specific/linux/odp-dpdk { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue