Nix can't hook into external graphics systems easily enough rn. Subrepo time.
This commit is contained in:
parent
a3657eb0e4
commit
0012d7ede3
4 changed files with 0 additions and 146 deletions
31
default.nix
31
default.nix
|
|
@ -1,31 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
name = "webgpu";
|
|
||||||
src = ./.;
|
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
cmake
|
|
||||||
wgpu-native
|
|
||||||
cglm
|
|
||||||
sdl3
|
|
||||||
sdl3-image
|
|
||||||
nixgl.nixVulkanIntel
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
vulkan-headers
|
|
||||||
vulkan-loader
|
|
||||||
vulkan-tools
|
|
||||||
];
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
cmake .
|
|
||||||
make
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp webgpu $out/bin
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
77
flake.lock
77
flake.lock
|
|
@ -1,77 +0,0 @@
|
||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-utils": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1659877975,
|
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixgl": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1713543440,
|
|
||||||
"narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixGL",
|
|
||||||
"rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixGL",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1660551188,
|
|
||||||
"narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744463964,
|
|
||||||
"narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"nixgl": "nixgl",
|
|
||||||
"nixpkgs": "nixpkgs_2"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
19
flake.nix
19
flake.nix
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
description = "Development Environment";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixgl.url = "github:nix-community/nixGL";
|
|
||||||
nixpkgs.url= "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = {self, nixpkgs, nixgl,...}:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
overlays = [ nixgl.overlay ];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
packages.x86_64-linux.default = (import ./default.nix { inherit pkgs; });
|
|
||||||
devShells.x86_64-linux.default = (import ./shell.nix { inherit pkgs; });
|
|
||||||
};
|
|
||||||
}
|
|
||||||
19
shell.nix
19
shell.nix
|
|
@ -1,19 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
pkgs.mkShell
|
|
||||||
{
|
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
cmake
|
|
||||||
wgpu-native
|
|
||||||
cglm
|
|
||||||
sdl3
|
|
||||||
sdl3-image
|
|
||||||
nixgl.nixVulkanIntel
|
|
||||||
vulkan-headers
|
|
||||||
vulkan-loader
|
|
||||||
vulkan-tools
|
|
||||||
];
|
|
||||||
shellHook = ''
|
|
||||||
export PS1="(webgpu) $PS1"
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue