2022-11-03 18:44:01 +00:00
|
|
|
{ pkgs ? import <nixpkgs> { }
|
|
|
|
, system ? builtins.currentSystem
|
|
|
|
}:
|
2021-06-05 21:05:41 +01:00
|
|
|
|
2020-10-26 03:03:30 +00:00
|
|
|
let
|
2021-06-05 16:47:37 +01:00
|
|
|
zig-overlay = pkgs.fetchFromGitHub {
|
|
|
|
owner = "arqv";
|
|
|
|
repo = "zig-overlay";
|
|
|
|
rev = "5b9504b8bff072553051d6e130727f7f5c0715c3";
|
2021-06-05 21:05:41 +01:00
|
|
|
sha256 = "NDm5qT6/qr789IhI2dsQxrR5/Mr7cXVj17x/+tl3pDE=";
|
2021-06-05 16:47:37 +01:00
|
|
|
};
|
2020-10-26 18:29:09 +00:00
|
|
|
gitignoreSrc = pkgs.fetchFromGitHub {
|
2020-10-26 03:23:10 +00:00
|
|
|
owner = "hercules-ci";
|
|
|
|
repo = "gitignore";
|
|
|
|
rev = "c4662e662462e7bf3c2a968483478a665d00e717";
|
|
|
|
sha256 = "1npnx0h6bd0d7ql93ka7azhj40zgjp815fw2r6smg8ch9p7mzdlx";
|
|
|
|
};
|
|
|
|
inherit (import gitignoreSrc { inherit (pkgs) lib; }) gitignoreSource;
|
2021-06-05 21:15:06 +01:00
|
|
|
zig = (import zig-overlay { inherit pkgs system; }).master.latest;
|
2021-06-05 21:05:41 +01:00
|
|
|
in
|
2020-10-31 20:05:19 +00:00
|
|
|
pkgs.stdenvNoCC.mkDerivation {
|
|
|
|
name = "zls";
|
|
|
|
version = "master";
|
|
|
|
src = gitignoreSource ./.;
|
2020-10-31 20:36:37 +00:00
|
|
|
nativeBuildInputs = [ zig ];
|
2020-10-31 20:05:19 +00:00
|
|
|
dontConfigure = true;
|
2020-10-31 20:36:37 +00:00
|
|
|
dontInstall = true;
|
2020-10-31 20:05:19 +00:00
|
|
|
buildPhase = ''
|
|
|
|
mkdir -p $out
|
2022-11-03 18:44:01 +00:00
|
|
|
zig build install -Dcpu=baseline -Drelease-safe=true -Ddata_version=master --prefix $out
|
2020-10-31 20:05:19 +00:00
|
|
|
'';
|
|
|
|
XDG_CACHE_HOME = ".cache";
|
|
|
|
}
|