571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
70 lines
1.2 KiB
Nix
70 lines
1.2 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, pkg-config
|
|
, assimp
|
|
, curl
|
|
, freetype
|
|
#, glew
|
|
, libGL
|
|
, libGLU
|
|
, libpng
|
|
, libsigcxx
|
|
, libvorbis
|
|
, lua5_2
|
|
, mesa
|
|
, SDL2
|
|
, SDL2_image
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pioneer";
|
|
version = "20240710";
|
|
|
|
src = fetchFromGitHub{
|
|
owner = "pioneerspacesim";
|
|
repo = "pioneer";
|
|
rev = version;
|
|
hash = "sha256-zuPm5odMn6C3JqkgqQdgSztwxWjMmLVWUalYbEbAZro=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace CMakeLists.txt \
|
|
--replace 'string(TIMESTAMP PROJECT_VERSION "%Y%m%d")' 'set(PROJECT_VERSION ${version})'
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [
|
|
assimp
|
|
curl
|
|
freetype
|
|
libGL
|
|
libGLU
|
|
libpng
|
|
libsigcxx
|
|
libvorbis
|
|
lua5_2
|
|
mesa
|
|
SDL2
|
|
SDL2_image
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DPIONEER_DATA_DIR:PATH=${placeholder "out"}/share/pioneer/data"
|
|
"-DUSE_SYSTEM_LIBLUA:BOOL=YES"
|
|
];
|
|
|
|
makeFlags = [ "all" "build-data" ];
|
|
|
|
meta = with lib; {
|
|
description = "Space adventure game set in the Milky Way galaxy at the turn of the 31st century";
|
|
homepage = "https://pioneerspacesim.net";
|
|
license = with licenses; [
|
|
gpl3Only cc-by-sa-30
|
|
];
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
};
|
|
}
|