mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 08:14:00 +01:00
packages: Use srb2 from fork
This commit is contained in:
parent
132e985a52
commit
48cb1ea542
17
flake.lock
17
flake.lock
@ -395,6 +395,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-srb2": {
|
||||
"locked": {
|
||||
"lastModified": 1686161408,
|
||||
"narHash": "sha256-+zLyuXX949OO4fQwa6AqTTHr8RSfBdHlMIq1AJuy+5I=",
|
||||
"owner": "donovanglover",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "97b52a7a806da410d171a755459fba17e39fcfed",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "donovanglover",
|
||||
"ref": "srb2",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"crystal-flake": "crystal-flake",
|
||||
@ -405,6 +421,7 @@
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-hyprland-autoname-workspaces": "nixpkgs-hyprland-autoname-workspaces",
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
"nixpkgs-srb2": "nixpkgs-srb2",
|
||||
"stylix": "stylix"
|
||||
}
|
||||
},
|
||||
|
@ -30,6 +30,7 @@
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
|
||||
nixpkgs-hyprland-autoname-workspaces.url = "github:donovanglover/nixpkgs/hyprland-autoname-workspaces";
|
||||
nixpkgs-srb2.url = "github:donovanglover/nixpkgs/srb2";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
|
@ -1,19 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 915912af5..f5c2cf9cc 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -91,11 +91,6 @@ if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
- CPMAddPackage(
|
||||
- NAME Ccache.cmake
|
||||
- GITHUB_REPOSITORY TheLartians/Ccache.cmake
|
||||
- VERSION 1.2
|
||||
- )
|
||||
endif()
|
||||
|
||||
# Dependencies
|
||||
--
|
||||
2.40.1
|
||||
|
@ -1,112 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
curl,
|
||||
nasm,
|
||||
libopenmpt,
|
||||
p7zip,
|
||||
libgme,
|
||||
libpng,
|
||||
SDL2,
|
||||
SDL2_mixer,
|
||||
zlib,
|
||||
unzip,
|
||||
makeWrapper,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
}: let
|
||||
version = "2.2.11";
|
||||
|
||||
# Normal assets found on the official release
|
||||
assets = stdenv.mkDerivation rec {
|
||||
pname = "srb2-data";
|
||||
inherit version;
|
||||
nativeBuildInputs = [unzip];
|
||||
src = fetchurl {
|
||||
url = "https://github.com/STJr/SRB2/releases/download/SRB2_release_${version}/SRB2-v${lib.replaceStrings ["."] [""] version}-Full.zip";
|
||||
sha256 = "sha256-KsJIkCczD/HyIwEy5dI3zsHbWFCMBaCoCHizfupFoWM=";
|
||||
};
|
||||
sourceRoot = ".";
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/srb2
|
||||
cp -r *pk3 *dta *dat models/ $out/share/srb2/
|
||||
'';
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "srb2";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "STJr";
|
||||
repo = "SRB2";
|
||||
rev = "SRB2_release_${version}";
|
||||
sha256 = "sha256-tyiXivJWjNnL+4YynUV6k6iaMs8o9HkHrp+qFj2+qvQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
nasm
|
||||
p7zip
|
||||
makeWrapper
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
curl
|
||||
libgme
|
||||
libpng
|
||||
libopenmpt
|
||||
SDL2
|
||||
SDL2_mixer
|
||||
zlib
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DSRB2_ASSET_DIRECTORY=${assets}/share/srb2"
|
||||
"-DGME_INCLUDE_DIR=${libgme}/include"
|
||||
"-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include"
|
||||
"-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2"
|
||||
"-DSDL2_INCLUDE_DIR=${lib.getDev SDL2.dev}/include/SDL2"
|
||||
];
|
||||
|
||||
patches = [
|
||||
./cmake.patch
|
||||
];
|
||||
|
||||
# Desktop icon
|
||||
desktopItems = [
|
||||
(makeDesktopItem rec {
|
||||
name = "Sonic Robo Blast 2";
|
||||
exec = pname;
|
||||
icon = pname;
|
||||
comment = meta.description;
|
||||
desktopName = name;
|
||||
genericName = name;
|
||||
categories = ["Game"];
|
||||
})
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/applications $out/share/pixmaps $out/share/icons
|
||||
|
||||
copyDesktopItems
|
||||
|
||||
cp ../srb2.png $out/share/pixmaps/.
|
||||
cp ../srb2.png $out/share/icons/.
|
||||
|
||||
cp bin/lsdlsrb2 $out/bin/srb2
|
||||
wrapProgram $out/bin/srb2 --set SRB2WADDIR "${assets}/share/srb2"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Sonic Robo Blast 2 is a 3D Sonic the Hedgehog fangame based on a modified version of Doom Legacy";
|
||||
homepage = "https://www.srb2.org/";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [zeratax];
|
||||
};
|
||||
}
|
@ -6,6 +6,7 @@
|
||||
crystal-flake,
|
||||
nixpkgs-hyprland-autoname-workspaces,
|
||||
nixpkgs-master,
|
||||
nixpkgs-srb2,
|
||||
...
|
||||
}: let
|
||||
VARIABLES = import ./variables.nix;
|
||||
@ -64,7 +65,6 @@ in {
|
||||
crystal-flake.packages.${VARIABLES.system}.crystal
|
||||
crystal-flake.packages.${VARIABLES.system}.crystalline
|
||||
nixpkgs-master.legacyPackages.${VARIABLES.system}.waycorner
|
||||
(pkgs.callPackage ../packages/srb2 {})
|
||||
slade
|
||||
typespeed
|
||||
osu-lazer-bin
|
||||
@ -184,6 +184,7 @@ in {
|
||||
kickoff
|
||||
greetd.tuigreet
|
||||
nixpkgs-hyprland-autoname-workspaces.legacyPackages.${VARIABLES.system}.hyprland-autoname-workspaces
|
||||
nixpkgs-srb2.legacyPackages.${VARIABLES.system}.srb2
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
|
Loading…
Reference in New Issue
Block a user