should be the last stage
This commit is contained in:
parent
fe9a07fad0
commit
d6fe9e9f5f
6 changed files with 36 additions and 33 deletions
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -25,11 +25,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1743648554,
|
"lastModified": 1743717835,
|
||||||
"narHash": "sha256-23JFd+zd2GamTTdnGuFVeIg8x8C3hLpQJRh/PGTORzo=",
|
"narHash": "sha256-LJm6FoIcUoBw3w25ty12/sBfut4zZuNGdN0phYj/ekU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "107352dde4ff3c01cb5a0b3fe17f5beef37215bc",
|
"rev": "66a6ec65f84255b3defb67ff45af86c844dd451b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
28
flake.nix
28
flake.nix
|
|
@ -123,14 +123,15 @@
|
||||||
"-DUSE_PULSEAUDIO=ON"
|
"-DUSE_PULSEAUDIO=ON"
|
||||||
"-DUSE_LIBEVDEV=ON"
|
"-DUSE_LIBEVDEV=ON"
|
||||||
"-DUSE_SYSTEM_ZSTD=ON"
|
"-DUSE_SYSTEM_ZSTD=ON"
|
||||||
|
"-DUSE_DISCORD_RPC=ON"
|
||||||
"-DCMAKE_VERBOSE_MAKEFILE=ON"
|
"-DCMAKE_VERBOSE_MAKEFILE=ON"
|
||||||
"-DCMake_MESSAGE_LOG_LEVEL=TRACE"
|
"-DCMAKE_MESSAGE_LOG_LEVEL=TRACE"
|
||||||
];
|
];
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
echo "Verifying submodule directories:" >&2
|
echo "Verifying submodule directories:" >&2
|
||||||
ls -l 3rdparty/hidapi/hidapi 3rdparty/glslang/glslang 3rdparty/yaml-cpp/yaml-cpp 3rdparty/zstd/zstd >&2
|
ls -l 3rdparty/hidapi/hidapi 3rdparty/glslang/glslang 3rdparty/yaml-cpp/yaml-cpp 3rdparty/zstd/zstd 3rdparty/discord-rpc >&2
|
||||||
if [ ! -f 3rdparty/hidapi/hidapi/CMakeLists.txt ]; then
|
if [ ! -f 3rdparty/hidapi/hidapi/CMakeLists.txt ] || [ ! -f 3rdparty/discord-rpc/CMakeLists.txt ]; then
|
||||||
echo "ERROR: hidapi submodule not fetched correctly" >&2
|
echo "ERROR: Submodules (hidapi or discord-rpc) not fetched correctly" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "Original 3rdparty/CMakeLists.txt:" >&2
|
echo "Original 3rdparty/CMakeLists.txt:" >&2
|
||||||
|
|
@ -144,7 +145,7 @@
|
||||||
echo "Patched 3rdparty/CMakeLists.txt:" >&2
|
echo "Patched 3rdparty/CMakeLists.txt:" >&2
|
||||||
cat 3rdparty/CMakeLists.txt >&2
|
cat 3rdparty/CMakeLists.txt >&2
|
||||||
echo "Checking submodules:" >&2
|
echo "Checking submodules:" >&2
|
||||||
ls -lR 3rdparty/hidapi 3rdparty/glslang 3rdparty/yaml-cpp 3rdparty/cubeb 3rdparty/zstd >&2
|
ls -lR 3rdparty/hidapi 3rdparty/glslang 3rdparty/yaml-cpp 3rdparty/cubeb 3rdparty/zstd 3rdparty/discord-rpc >&2
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -158,27 +159,36 @@
|
||||||
rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: {
|
rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: {
|
||||||
src = pkgs.fetchgit {
|
src = pkgs.fetchgit {
|
||||||
url = "https://github.com/RPCS3/rpcs3.git";
|
url = "https://github.com/RPCS3/rpcs3.git";
|
||||||
rev = inputs.rpcs3-latest.rev; # Should be 37dbd77628f44cdef3228bdfc03127365ec7383b per flake.lock
|
rev = inputs.rpcs3-latest.rev;
|
||||||
sha256 = "sha256-Yx0Qsc0r+5C0BqqsbJCv47QPeaNbaIut8s6Hcysy2mo="; # Confirmed for 37dbd77628f44cdef3228bdfc03127365ec7383b with submodules
|
sha256 = "Yx0Qsc0r+5C0BqqsbJCv47QPeaNbaIut8s6Hcysy2mo=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
nativeBuildInputs = oldAttrs.nativeBuildInputs;
|
||||||
|
buildInputs = oldAttrs.buildInputs;
|
||||||
|
cmakeFlags =
|
||||||
|
oldAttrs.cmakeFlags
|
||||||
|
++ [
|
||||||
|
"-DUSE_DISCORD_RPC=ON"
|
||||||
|
];
|
||||||
preUnpack = ''
|
preUnpack = ''
|
||||||
echo "Source rev: ${inputs.rpcs3-latest.rev}" >&2
|
echo "Source rev: ${inputs.rpcs3-latest.rev}" >&2
|
||||||
echo "Expected rev: 37dbd77628f44cdef3228bdfc03127365ec7383b" >&2
|
echo "Expected rev: 37dbd77628f44cdef3228bdfc03127365ec7383b" >&2
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
|
packages.${system} = {
|
||||||
|
rpcs3_latest = rpcs3_latest;
|
||||||
|
};
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
nixos = lib.nixosSystem {
|
nixos = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs rpcs3_latest;};
|
||||||
modules = [
|
modules = [
|
||||||
{nixpkgs.overlays = [customPkgsOverlay];}
|
{nixpkgs.overlays = [customPkgsOverlay];}
|
||||||
./hosts/configuration.nix
|
./hosts/configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"cobray" = home-manager.lib.homeManagerConfiguration {
|
"cobray" = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
rpcs3_latest,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./modules/dunst.nix
|
./modules/dunst.nix
|
||||||
./modules/fish.nix
|
./modules/fish.nix
|
||||||
|
|
@ -30,5 +34,6 @@
|
||||||
btop
|
btop
|
||||||
nvtopPackages.full
|
nvtopPackages.full
|
||||||
arandr
|
arandr
|
||||||
|
rpcs3_latest
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,4 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
rpcs3_latest = pkgs.rpcs3.overrideAttrs (oldAttrs: {
|
|
||||||
src = inputs.rpcs3-latest;
|
|
||||||
});
|
|
||||||
in {
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
mgba
|
mgba
|
||||||
desmume
|
desmume
|
||||||
|
|
@ -18,11 +10,5 @@ in {
|
||||||
retroarch
|
retroarch
|
||||||
mednafen
|
mednafen
|
||||||
joycond
|
joycond
|
||||||
# uses latest commit, but in case of errors (if there were any in the first place) to fallback to snapshot nix package in case it failed (even if not)
|
|
||||||
(
|
|
||||||
if (builtins.tryEval rpcs3_latest).success
|
|
||||||
then rpcs3_latest
|
|
||||||
else rpcs3
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running 'nixos-help').
|
# and in the NixOS manual (accessible by running 'nixos-help').
|
||||||
{
|
{...}: {
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
imports = [
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
{inputs, ...}: {
|
{
|
||||||
|
inputs,
|
||||||
|
rpcs3_latest,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
@ -6,7 +10,7 @@
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs;
|
inherit inputs rpcs3_latest;
|
||||||
};
|
};
|
||||||
users.cobray = import ../home-manager/cobray.nix;
|
users.cobray = import ../home-manager/cobray.nix;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue