Compare commits
No commits in common. "762d481707abda273fe67eb6aca4f0b48f9b5601" and "f6c453bfaf1f851d54c78d34a04549cf7c53ac26" have entirely different histories.
762d481707
...
f6c453bfaf
5
flake.lock
generated
5
flake.lock
generated
@ -13,8 +13,9 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "flake-utils",
|
"owner": "numtide",
|
||||||
"type": "indirect"
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
96
flake.nix
96
flake.nix
@ -2,76 +2,34 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, rust-overlay , ...}:
|
outputs = { self, nixpkgs, flake-utils, rust-overlay , ...}:
|
||||||
let
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
overlays = [ (import rust-overlay ) ];
|
let
|
||||||
in {
|
overlays = [ (import rust-overlay) ];
|
||||||
packages."x86_64-linux".default =
|
pkgs = import nixpkgs {
|
||||||
let
|
inherit system overlays;
|
||||||
pkgs = import nixpkgs {
|
};
|
||||||
system = "x86_64-linux";
|
native-deps = with pkgs; [
|
||||||
inherit overlays;
|
pkg-config pipewire lld clang libclang alsa-lib openssl zlib libxkbcommon libGL wayland mangohud
|
||||||
};
|
];
|
||||||
native-deps = with pkgs; [
|
in
|
||||||
pkg-config pipewire lld clang libclang alsa-lib openssl zlib libxkbcommon libGL wayland mangohud
|
with pkgs;
|
||||||
];
|
{
|
||||||
in
|
devShells.default = mkShell {
|
||||||
pkgs.mkShell {
|
buildInputs = with pkgs; [
|
||||||
buildInputs = with pkgs; [
|
(rust-bin.stable.latest.default.override {
|
||||||
(rust-bin.stable.latest.default.override {
|
extensions = [ "rust-src" ];
|
||||||
extensions = [ "rust-src" ];
|
targets = ["x86_64-unknown-linux-gnu" "x86_64-pc-windows-gnu"];
|
||||||
targets = ["x86_64-unknown-linux-gnu" "x86_64-pc-windows-gnu"];
|
})
|
||||||
})
|
cargo-bloat
|
||||||
cargo-bloat
|
pkgs.pkgsCross.mingwW64.buildPackages.gcc
|
||||||
pkgs.pkgsCross.mingwW64.buildPackages.gcc
|
] ++ native-deps;
|
||||||
] ++ native-deps;
|
LD_LIBRARY_PATH = (lib.makeLibraryPath native-deps);
|
||||||
LD_LIBRARY_PATH = (pkgs.lib.makeLibraryPath native-deps);
|
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS = "-L native=${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib";
|
||||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS = "-L native=${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib";
|
};
|
||||||
};
|
}
|
||||||
packages."aarch64-darwin".default =
|
);
|
||||||
let
|
|
||||||
pkgs = import nixpkgs {
|
|
||||||
system = "aarch64-darwin";
|
|
||||||
inherit overlays;
|
|
||||||
};
|
|
||||||
native-deps = with pkgs; [];
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
(rust-bin.stable.latest.default.override {
|
|
||||||
extensions = [ "rust-src" ];
|
|
||||||
targets = ["aarch64-apple-darwin" ];
|
|
||||||
})
|
|
||||||
cargo-bloat
|
|
||||||
] ++ native-deps;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
# let
|
|
||||||
# overlays = [ (import rust-overlay) ];
|
|
||||||
# pkgs = import nixpkgs {
|
|
||||||
# inherit system overlays;
|
|
||||||
# };
|
|
||||||
# native-deps = with pkgs; [
|
|
||||||
# pkg-config pipewire lld clang libclang alsa-lib openssl zlib libxkbcommon libGL wayland mangohud
|
|
||||||
# ];
|
|
||||||
# in
|
|
||||||
# with pkgs;
|
|
||||||
# {
|
|
||||||
# devShells.default = mkShell {
|
|
||||||
# buildInputs = with pkgs; [
|
|
||||||
# (rust-bin.stable.latest.default.override {
|
|
||||||
# extensions = [ "rust-src" ];
|
|
||||||
# targets = ["x86_64-unknown-linux-gnu" "x86_64-pc-windows-gnu"];
|
|
||||||
# })
|
|
||||||
# cargo-bloat
|
|
||||||
# pkgs.pkgsCross.mingwW64.buildPackages.gcc
|
|
||||||
# ] ++ native-deps;
|
|
||||||
# LD_LIBRARY_PATH = (lib.makeLibraryPath native-deps);
|
|
||||||
# CARGO_TARGET_X86_64_PC_WINDOWS_GNU_RUSTFLAGS = "-L native=${pkgs.pkgsCross.mingwW64.windows.pthreads}/lib";
|
|
||||||
# };
|
|
||||||
# }
|
|
||||||
# );
|
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ fn get_steam_root() -> anyhow::Result<PathBuf> {
|
|||||||
fn get_steam_root() -> anyhow::Result<PathBuf> {
|
fn get_steam_root() -> anyhow::Result<PathBuf> {
|
||||||
use registry::{self, Security, Data};
|
use registry::{self, Security, Data};
|
||||||
|
|
||||||
let key = registry::Hive::LocalMachine.open(r"SOFTWARE\Wow6432Node\Valve\Steam", Security::Read)?;
|
let key = registry::Hive::LocalMachine.open(r"\SOFTWARE\Wow6432Node\Valve\Steam", Security::Read)?;
|
||||||
let value = match key.value("InstallPath")? {
|
let value = match key.value("InstallPath")? {
|
||||||
Data::String(s) => Some(s.to_string_lossy()),
|
Data::String(s) => Some(s.to_string_lossy()),
|
||||||
Data::ExpandString(s) => Some(s.to_string_lossy()),
|
Data::ExpandString(s) => Some(s.to_string_lossy()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user