Update zig devShell

This commit is contained in:
joachimschmidt557 2021-10-10 10:07:18 +02:00
parent fd1025cfb6
commit 3c4c467c6a
No known key found for this signature in database
GPG key ID: E0B575BE2884ACC5
3 changed files with 46 additions and 34 deletions

16
flake.lock generated
View file

@ -1,5 +1,20 @@
{ {
"nodes": { "nodes": {
"flake-utils": {
"locked": {
"lastModified": 1631561581,
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1633296426, "lastModified": 1633296426,
@ -16,6 +31,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View file

@ -1,24 +1,29 @@
{ {
description = "dotfiles"; description = "dotfiles";
outputs = { self, nixpkgs }: inputs.flake-utils.url = "github:numtide/flake-utils";
let
pkgs = import nixpkgs outputs = { self, nixpkgs, flake-utils }:
{ flake-utils.lib.eachDefaultSystem (system:
system = "x86_64-linux"; let
config = { pkgs = import nixpkgs
allowUnfree = true; {
system = system;
config = {
allowUnfree = true;
};
};
in
{
packages.lutris = pkgs.lutris;
devShells.zig = import ./nix/zig.nix { pkgs = pkgs; };
nixosConfigurations = {
dustbowl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./nixos/dustbowl.nix ];
}; };
}; };
in });
{
packages.x86_64-linux.lutris = pkgs.lutris;
nixosConfigurations = {
dustbowl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ ./nixos/dustbowl.nix ];
};
};
};
} }

View file

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