forked from mirrors/nixpkgs
b18031c413
* maintainers: remove chiiruno * nixos/zeronet.nix: replace chiiruno with Madouura * nixos/hydron: replace chiiruno with Madouura * nixos/tests/bcachefs: replace chiiruno with Madouura * lutris: replace chiiruno with Madouura * qtchan: replace chiiruno with Madouura * tinygo: replace chiiruno with Madouura * vlang: replace chiiruno with Madouura * merkletools: replace chiiruno with Madouura * easyjson: replace chiiruno with Madouura * quicktemplate: replace chiiruno with Madouura * statik: replace chiiruno with Madouura * dumb: replace chiiruno with Madouura * sndio: replace chiiruno with Madouura * hydron: replace chiiruno with Madouura * edid-decode-unstable: replace chiiruno with Madouura * tewisay: replace chiiruno with Madouura * svt-av1: replace chiiruno with Madouura
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{ lib, stdenv, fetchFromGitHub, glfw, freetype, openssl, makeWrapper, upx }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "vlang";
|
|
version = "weekly.2021.51";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "vlang";
|
|
repo = "v";
|
|
rev = version;
|
|
sha256 = "1jvq3fxckl2jidiigkvclacjxbg5k38268mck7bl1ky1yspgfrnq";
|
|
};
|
|
|
|
vc = fetchFromGitHub {
|
|
owner = "vlang";
|
|
repo = "vc";
|
|
rev = "c8ed2cd82b247e94c33217dba35c420cfc02fef3";
|
|
sha256 = "1acgx1qp480jmsv1xvqy1zf7iyy90mvg9x1m1b0zrwx09wz4y1cq";
|
|
};
|
|
|
|
propagatedBuildInputs = [ glfw freetype openssl ]
|
|
++ lib.optional stdenv.hostPlatform.isUnix upx;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
makeFlags = [
|
|
"local=1"
|
|
"VC=${vc}"
|
|
# vlang seems to want to write to $HOME/.vmodules , so lets give
|
|
# it a writable HOME
|
|
"HOME=$TMPDIR"
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/{bin,lib,share}
|
|
cp -r examples $out/share
|
|
cp -r {cmd,vlib,thirdparty} $out/lib
|
|
mv v $out/lib
|
|
ln -s $out/lib/v $out/bin/v
|
|
wrapProgram $out/bin/v --prefix PATH : ${lib.makeBinPath [ stdenv.cc ]}
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://vlang.io/";
|
|
description = "Simple, fast, safe, compiled language for developing maintainable software";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ Madouura ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|