1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

Merge pull request #272219 from chewblacka/update-vlang

vlang: weekly.2023.44 -> 0.4.3
This commit is contained in:
Weijia Wang 2023-12-12 20:42:46 +01:00 committed by GitHub
commit 06e5eff89a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,20 +1,21 @@
{ lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, makeWrapper, upx, boehmgc, xorg, binaryen, darwin }: { lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, makeWrapper, upx, boehmgc, xorg, binaryen, darwin }:
let let
version = "weekly.2023.44"; version = "0.4.3";
ptraceSubstitution = '' ptraceSubstitution = ''
#include <sys/types.h> #include <sys/types.h>
#include <sys/ptrace.h> #include <sys/ptrace.h>
''; '';
# Required for bootstrap. # vc is the V compiler's source translated to C (needed for boostrap).
# So we fix its rev to correspond to the V version.
vc = stdenv.mkDerivation { vc = stdenv.mkDerivation {
pname = "v.c"; pname = "v.c";
version = "unstable-2023-10-30"; version = "0.4.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vlang"; owner = "vlang";
repo = "vc"; repo = "vc";
rev = "66b89ab916c13c5781753797d1f4ff08e427bb6b"; rev = "5e691a82c01957870b451e06216a9fb3a4e83a18";
hash = "sha256-5Y7/rlcoIHjbf79A1rqFysNFc5+p6CY09MRPQalo7Ak="; hash = "sha256-Ti2b88NDG1pppj34BeK8+UsT2HiG/jcAF2mHgiBBRaI=";
}; };
# patch the ptrace reference for darwin # patch the ptrace reference for darwin
@ -30,8 +31,8 @@ let
markdown = fetchFromGitHub { markdown = fetchFromGitHub {
owner = "vlang"; owner = "vlang";
repo = "markdown"; repo = "markdown";
rev = "61c47ea0a6c0c79e973a119dcbab3b8fdd0973ca"; rev = "0c280130cb7ec410b7d21810d1247956c15b72fc";
hash = "sha256-XBD30Pc9CGXzU1Gy6U0pDpTozYVwfgAvZRjIsnXp8ZM="; hash = "sha256-Fmhkrg9DBiWxInostNp+WfA3V5GgEIs5+KIYrqZosqY=";
}; };
boehmgcStatic = boehmgc.override { boehmgcStatic = boehmgc.override {
enableStatic = true; enableStatic = true;
@ -45,7 +46,7 @@ stdenv.mkDerivation {
owner = "vlang"; owner = "vlang";
repo = "v"; repo = "v";
rev = version; rev = version;
hash = "sha256-1yFuheSyKfvm4GqKIbXycdzKx3XcD9LSmmuKlcJmteg="; hash = "sha256-ZFBQD7SP38VnEMoOnwr/n8zZuLtR7GR3OCYhvfz3apI=";
}; };
propagatedBuildInputs = [ glfw freetype openssl ] propagatedBuildInputs = [ glfw freetype openssl ]
@ -76,11 +77,6 @@ stdenv.mkDerivation {
cp -r ${boehmgcStatic}/lib/* ./thirdparty/tcc/lib cp -r ${boehmgcStatic}/lib/* ./thirdparty/tcc/lib
''; '';
# vcreate_test.v requires git, so we must remove it when building the tools.
preInstall = ''
mv cmd/tools/vcreate/vcreate_test.v $HOME/vcreate_test.v
'';
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
@ -102,11 +98,6 @@ stdenv.mkDerivation {
runHook postInstall runHook postInstall
''; '';
# Return vcreate_test.v and vtest.v, so the user can use it.
postInstall = ''
cp $HOME/vcreate_test.v $out/lib/cmd/tools/vcreate_test.v
'';
meta = with lib; { meta = with lib; {
homepage = "https://vlang.io/"; homepage = "https://vlang.io/";
description = "Simple, fast, safe, compiled language for developing maintainable software"; description = "Simple, fast, safe, compiled language for developing maintainable software";