add nix files

This commit is contained in:
joachimschmidt557 2021-05-24 12:53:59 +08:00
parent c9ac2b6ff1
commit 0073a67ac2
No known key found for this signature in database
GPG key ID: E0B575BE2884ACC5
2 changed files with 61 additions and 0 deletions

22
nix/zig.nix Normal file
View file

@ -0,0 +1,22 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
version = "master";
pname = "zig";
src = ./.;
hardeningDisable = [ "all" ];
nativeBuildInputs = with pkgs; [ cmake ninja ];
buildInputs = with pkgs; [
llvmPackages_12.clang-unwrapped
llvmPackages_12.llvm
llvmPackages_12.lld
libxml2
zlib
];
preBuild = ''
export HOME=$TMPDIR;
'';
}