moved Zig reference to arqv/zig-overlay

This commit is contained in:
Lyla Bravo 2020-10-26 15:29:09 -03:00
parent cbb603a63c
commit ff6686cd66

View File

@ -1,5 +1,10 @@
let let
pkgs = import <nixpkgs> {}; zig-overlay = import (builtins.fetchGit {
url = "https://github.com/arqv/zig-overlay.git";
rev = "a56601116906a2f192702e0b97487b8e7f796fdc";
});
pkgs = import <nixpkgs> { overlays = [ zig-overlay ]; };
gitignoreSrc = pkgs.fetchFromGitHub { gitignoreSrc = pkgs.fetchFromGitHub {
owner = "hercules-ci"; owner = "hercules-ci";
repo = "gitignore"; repo = "gitignore";
@ -8,30 +13,20 @@ let
}; };
inherit (import gitignoreSrc { inherit (pkgs) lib; }) gitignoreSource; inherit (import gitignoreSrc { inherit (pkgs) lib; }) gitignoreSource;
zig = pkgs.stdenvNoCC.mkDerivation rec { zig = pkgs.zig.custom {
name = "zig";
version = "0.6.0+91a1c20e7";
src = pkgs.fetchurl {
url = "https://ziglang.org/builds/zig-linux-x86_64-${version}.tar.xz";
sha256 = "7d715ea8948611734986d8a056fdec98d0f39b064e38efcd088823c02b1afba8"; sha256 = "7d715ea8948611734986d8a056fdec98d0f39b064e38efcd088823c02b1afba8";
}; version = "0.6.0+91a1c20e7";
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out $out/bin $out/doc
mv lib/ $out/
mv zig $out/bin
mv langref.html $out/doc
'';
}; };
in in
pkgs.stdenvNoCC.mkDerivation { pkgs.stdenvNoCC.mkDerivation {
name = "zls"; name = "zls";
version = "master"; version = "master";
src = gitignoreSource ./.; src = gitignoreSource ./.;
nativeBuildInputs = [ zig ]; nativeBuildInputs = [
dontConfigure = true; zig
];
dontConfigure = true;
buildPhase = '' buildPhase = ''
zig build -Drelease-safe=true zig build -Drelease-safe=true
''; '';