working rust build; rgpu tests fail because of a lack of GPU adapter

This commit is contained in:
colin 2022-07-02 16:05:43 -07:00
parent 7a2d93b098
commit 6149f01c4e
3 changed files with 135 additions and 0 deletions

93
flake.lock Normal file
View File

@ -0,0 +1,93 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1656065134,
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1656065134,
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1656589841,
"narHash": "sha256-Kqd6r9aNIzjYGhMFYATdKwRbXBCGLcdqAJMLr4I8LG0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dbb62c34bbb5cdf05f1aeab07638b24b0824d605",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-22.05",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1656401090,
"narHash": "sha256-bUS2nfQsvTQW2z8SK7oEFSElbmoBahOPtbXPm0AL3I4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "16de63fcc54e88b9a106a603038dd5dd2feb21eb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1656644123,
"narHash": "sha256-xg7D9aYBdmzH08MH6DlEOJW1UR5DYaQkvvvhnuXEatc=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "8b4c5bef319198920fd03a916dd5f6600147358b",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

37
flake.nix Normal file
View File

@ -0,0 +1,37 @@
{
description = "Finite Difference Time Domain simulation binaries";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
flake-utils.url = github:numtide/flake-utils;
rust-overlay.url = github:oxalica/rust-overlay;
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
with flake-utils.lib; eachSystem allSystems (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
in
rec {
packages = {
# docs: <nixpkgs>/doc/languages-frameworks/rust.section.md
# docs: https://github.com/oxalica/rust-overlay
coremem-wavefront = pkgs.rustPlatform.buildRustPackage {
name = "coremem-wavefront";
nativeBuildInputs = [
(pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
];
src = self;
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"rustc_codegen_spirv-0.4.0-alpha.12" = "sha256-T0WRXsCgPW6/mygmCfZ3ee1xnigfaG4YuDjIb/DZ0t8=";
};
};
};
};
defaultPackage = packages.coremem-wavefront;
});
}

5
rust-toolchain.toml Normal file
View File

@ -0,0 +1,5 @@
[toolchain]
channel = "nightly-2022-01-13"
components = [ "rust-src", "rustc-dev", "llvm-tools-preview" ]
targets = [ "x86_64-unknown-linux-gnu" ]
profile = "default"