1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00

Merge pull request #118807 from OPNA2608/init/foxotron-2021-03-12/21.05

foxotron: init at 2021-03-12
This commit is contained in:
Sandro 2021-04-17 19:38:34 +02:00 committed by GitHub
commit c756aa9028
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,74 @@
{ stdenv
, lib
, fetchFromGitHub
, nix-update-script
, cmake
, pkg-config
, makeWrapper
, zlib
, libX11
, libXrandr
, libXinerama
, libXcursor
, libXi
, libXext
, libGLU
, alsaLib
, fontconfig
, AVFoundation
, Carbon
, Cocoa
, CoreAudio
, Kernel
, OpenGL
}:
stdenv.mkDerivation rec {
pname = "foxotron";
version = "2021-03-12";
src = fetchFromGitHub {
owner = "Gargaj";
repo = "Foxotron";
rev = version;
fetchSubmodules = true;
sha256 = "1finvbs3pbfyvm525blwgwl5jci2zjxb1923i0cm8rmf7wasaapb";
};
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
buildInputs = [ zlib ]
++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXrandr libXinerama libXcursor libXi libXext alsaLib fontconfig libGLU ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib/foxotron}
cp -R ${lib.optionalString stdenv.hostPlatform.isDarwin "Foxotron.app/Contents/MacOS/"}Foxotron \
../{config.json,Shaders,Skyboxes} $out/lib/foxotron/
wrapProgram $out/lib/foxotron/Foxotron \
--run "cd $out/lib/foxotron"
ln -s $out/{lib/foxotron,bin}/Foxotron
runHook postInstall
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
description = "General purpose model viewer";
longDescription = ''
ASSIMP based general purpose model viewer ("turntable") created for the
Revision 2021 3D Graphics Competition.
'';
homepage = "https://github.com/Gargaj/Foxotron";
license = licenses.publicDomain;
maintainers = with maintainers; [ OPNA2608 ];
platforms = platforms.all;
};
}

View file

@ -23091,6 +23091,10 @@ in
inherit buildPythonApplication;
};
foxotron = callPackage ../applications/graphics/foxotron {
inherit (darwin.apple_sdk.frameworks) AVFoundation Carbon Cocoa CoreAudio Kernel OpenGL;
};
foxtrotgps = callPackage ../applications/misc/foxtrotgps { };
fractal = callPackage ../applications/networking/instant-messengers/fractal { };