From 0f7c86bd4b76e4e65c887348c9e65ac944798f3f Mon Sep 17 00:00:00 2001 From: Mars Date: Tue, 29 Oct 2024 23:32:08 -0400 Subject: [PATCH] suckle --- _sources/generated.nix | 6 +++- flake.lock | 74 ++++++++++++++++++++++++++++++++++++++++-- flake.nix | 7 +++- src/util/shaders.hpp | 2 +- 4 files changed, 83 insertions(+), 6 deletions(-) diff --git a/_sources/generated.nix b/_sources/generated.nix index f71bde3..af0fe60 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -1,6 +1,10 @@ # This file was generated by nvfetcher, please do not modify it manually. -{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }: { + fetchgit, + fetchurl, + fetchFromGitHub, + dockerTools, +}: { fmt = { pname = "fmt"; version = "11.0.2"; diff --git a/flake.lock b/flake.lock index 532d46a..543d1fa 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,57 @@ { "nodes": { + "flake-compat": { + "locked": { + "lastModified": 1688025799, + "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, + "nixos-asahi": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1729779640, + "narHash": "sha256-M9t4Ta9d76aVqd1mkLBl8zFSWYc8pv6AZTy1SU5bVp0=", + "owner": "zzywysm", + "repo": "nixos-asahi", + "rev": "5f8823f3543cbf9566d5af49b3a3c18539681eac", + "type": "github" + }, + "original": { + "owner": "zzywysm", + "repo": "nixos-asahi", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1725103162, + "narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1729632202, "narHash": "sha256-BqWFOqG9Iuzf5wm9dyVWPeH1SPxSjCxo3inUSnYqxaQ=", @@ -15,7 +66,7 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1726871744, "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", @@ -33,11 +84,28 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs", + "nixos-asahi": "nixos-asahi", + "nixpkgs": "nixpkgs_2", "treefmt-nix": "treefmt-nix", "utils": "utils" } }, + "rust-overlay": { + "flake": false, + "locked": { + "lastModified": 1686795910, + "narHash": "sha256-jDa40qRZ0GRQtP9EMZdf+uCbvzuLnJglTUI2JoHfWDc=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "5c2b97c0a9bc5217fc3dfb1555aae0fb756d99f9", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -55,7 +123,7 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1729613947, diff --git a/flake.nix b/flake.nix index b12bee2..c2eedea 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ description = "C/C++ environment"; inputs = { + nixos-asahi.url = "github:zzywysm/nixos-asahi"; nixpkgs.url = "github:NixOS/nixpkgs"; treefmt-nix.url = "github:numtide/treefmt-nix"; utils.url = "github:numtide/flake-utils"; @@ -10,6 +11,7 @@ outputs = { self, nixpkgs, + nixos-asahi, treefmt-nix, utils, ... @@ -131,7 +133,10 @@ if stdenv.isDarwin then "${darwin.moltenvk}/share/vulkan/icd.d/MoltenVK_icd.json" else let - vulkanDir = "${mesa.drivers}/share/vulkan/icd.d"; + vulkanDir = + if stdenv.hostPlatform.isx86_64 + then "${mesa.drivers}/share/vulkan/icd.d" + else "${nixos-asahi.packages.aarch64-linux.mesa-asahi-edge.drivers}/share/vulkan/icd.d"; vulkanFiles = builtins.filter (file: builtins.match ".*\\.json$" file != null) (builtins.attrNames (builtins.readDir vulkanDir)); vulkanPaths = lib.concatStringsSep ":" (map (file: "${vulkanDir}/${file}") vulkanFiles); in diff --git a/src/util/shaders.hpp b/src/util/shaders.hpp index e5fed9b..f48acaf 100644 --- a/src/util/shaders.hpp +++ b/src/util/shaders.hpp @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include