diff options
author | OPNA2608 <christoph.neidahl@gmail.com> | 2021-04-16 20:39:20 +0200 |
---|---|---|
committer | OPNA2608 <christoph.neidahl@gmail.com> | 2021-04-16 20:39:20 +0200 |
commit | 66be5560298f6c7ae9799202d891d967daa74b25 (patch) | |
tree | 7394745aa90187777951f3c2c212a55db5ce8573 /pkgs/applications/graphics | |
parent | 61b8c50e4dfebf2ef0a41306f823d3f56904bddb (diff) | |
download | nixpkgs-66be5560298f6c7ae9799202d891d967daa74b25.tar nixpkgs-66be5560298f6c7ae9799202d891d967daa74b25.tar.gz nixpkgs-66be5560298f6c7ae9799202d891d967daa74b25.tar.bz2 nixpkgs-66be5560298f6c7ae9799202d891d967daa74b25.tar.lz nixpkgs-66be5560298f6c7ae9799202d891d967daa74b25.tar.xz nixpkgs-66be5560298f6c7ae9799202d891d967daa74b25.tar.zst nixpkgs-66be5560298f6c7ae9799202d891d967daa74b25.zip |
foxotron: init at 2021-03-12
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r-- | pkgs/applications/graphics/foxotron/default.nix | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/foxotron/default.nix b/pkgs/applications/graphics/foxotron/default.nix new file mode 100644 index 00000000000..71adfe0d2db --- /dev/null +++ b/pkgs/applications/graphics/foxotron/default.nix @@ -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; + }; +} |