push sheeet
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

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
From 7ebe252a8488a63675d1c50c0faa1bdc5ff97889 Mon Sep 17 00:00:00 2001
From: Linus Heckemann <git@sphalerite.org>
Date: Fri, 5 Jan 2018 21:27:28 +0100
Subject: [PATCH] Ignore missing data for installation
This is for packaging vdrift separately from its data in nixpkgs.
---
SConstruct | 3 ---
1 file changed, 3 deletions(-)
diff --git a/SConstruct b/SConstruct
index 4394de0b..beef29a4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -511,9 +511,6 @@ env.Alias(target = 'bin-package', source = bin_archive)
#----------------#
Export(['env', 'version', 'src_dir', 'bin_dir'])
if 'install' in COMMAND_LINE_TARGETS:
- if not os.path.isfile('data/SConscript'):
- raise 'VDrift data not found. Please make sure data is placed in vdrift directory. See README.md and http://wiki.vdrift.net.'
- SConscript('data/SConscript')
# desktop appdata installation
install_desktop = env.Install(env['destdir'] + env['prefix'] + '/share/applications', 'vdrift.desktop')
install_appdata = env.Install(env['destdir'] + env['prefix'] + '/share/appdata', 'vdrift.appdata.xml')
--
2.15.0

View File

@@ -0,0 +1,95 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchsvn,
pkg-config,
scons,
libGLU,
libGL,
SDL2,
SDL2_image,
libvorbis,
libX11,
bullet,
curl,
gettext,
writeShellScriptBin,
data ? fetchsvn {
url = "svn://svn.code.sf.net/p/vdrift/code/vdrift-data";
rev = "1446";
sha256 = "sha256-KEu49GAOfenPyuaUItt6W9pkuqUNpXgmTSFuc7ThljQ=";
},
}:
let
version = "unstable-2021-09-05";
bin = stdenv.mkDerivation {
pname = "vdrift";
inherit version;
src = fetchFromGitHub {
owner = "vdrift";
repo = "vdrift";
rev = "7e9e00c8612b2014d491f026dd86b03f9fb04dcd";
sha256 = "sha256-DrzRF4WzwEXCNALq0jz8nHWZ1oYTEsdrvSYVYI1WkTI=";
};
postPatch = ''
substituteInPlace src/SConscript \
--replace-fail sdl2-config "${lib.getExe' (lib.getDev SDL2) "sdl2-config"}"
'';
nativeBuildInputs = [
pkg-config
scons
];
buildInputs = [
libGLU
libGL
SDL2
SDL2_image
libvorbis
libX11
bullet
curl
gettext
];
patches = [
./0001-Ignore-missing-data-for-installation.patch
];
buildPhase = ''
runHook preBuild
substituteInPlace SConstruct \
--replace-fail /usr/local "$out" \
--replace-fail pkg-config "${stdenv.cc.targetPrefix}pkg-config"
export CXXFLAGS="$(${stdenv.cc.targetPrefix}pkg-config --cflags SDL2_image)"
scons -j$NIX_BUILD_CORES
runHook postBuild
'';
meta = {
description = "Car racing game";
mainProgram = "vdrift";
homepage = "https://vdrift.net/";
license = lib.licenses.gpl2Plus;
maintainers = [ ];
platforms = lib.platforms.linux;
};
};
wrappedName = "vdrift-${version}-with-data-${toString data.rev}";
in
(writeShellScriptBin "vdrift" ''
export VDRIFT_DATA_DIRECTORY="${data}"
exec ${bin}/bin/vdrift "$@"
'').overrideAttrs
(_: {
name = wrappedName;
meta = bin.meta // {
hydraPlatforms = [ ];
};
unwrapped = bin;
inherit bin data;
})