Files
nixpkgs/pkgs/by-name/bl/blackvoxel/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

85 lines
2.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
makeDesktopItem,
imagemagick,
glew110,
SDL_compat,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "blackvoxel";
version = "2.5";
src = fetchFromGitHub {
owner = "Blackvoxel";
repo = "Blackvoxel";
tag = finalAttrs.version;
hash = "sha256-Uj3TfxAsLddsPiWDcLKjpduqvgVjnESZM4YPHT90YYY=";
};
nativeBuildInputs = [ imagemagick ];
buildInputs = [
glew110
SDL_compat
];
enableParallelBuilding = true;
postPatch = ''
substituteInPlace src/sc_Squirrel3/sq/Makefile --replace-fail " -m64" ""
substituteInPlace src/sc_Squirrel3/sqstdlib/Makefile --replace-fail " -m64" ""
substituteInPlace src/sc_Squirrel3/squirrel/Makefile --replace-fail " -m64" ""
'';
buildFlags = [ "BV_DATA_LOCATION_DIR=${placeholder "out"}/data" ];
# data/gui/gametype_back.bmp isn't exactly the official icon but since
# there is no official icon we use that one
postBuild = ''
convert gui/gametype_back.bmp blackvoxel.png
'';
installFlags = [
"doinstall=true"
"BV_DATA_INSTALL_DIR=${placeholder "out"}/data"
"BV_BINARY_INSTALL_DIR=${placeholder "out"}/bin"
];
postInstall = ''
install -Dm644 blackvoxel.png $out/share/icons/hicolor/1024x1024/apps/blackvoxel.png
'';
desktopItems = [
(makeDesktopItem {
name = "blackvoxel";
desktopName = "Blackvoxel";
exec = "blackvoxel";
icon = "blackvoxel";
categories = [ "Game" ];
})
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Sci-Fi game with industry and automation";
homepage = "https://www.blackvoxel.com";
changelog = "https://github.com/Blackvoxel/Blackvoxel/releases/tag/${finalAttrs.version}";
license = with lib.licenses; [
# blackvoxel
gpl3Plus
# Squirrel
mit
];
maintainers = with lib.maintainers; [
ethancedwards8
marcin-serwin
];
platforms = lib.platforms.linux;
};
})