nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 3f718198d374be87627a130754b6917fead6f830
parent a2fef22e6c789e559f8c4ea813c43cbdc36119b7
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Fri,  8 Oct 2021 23:15:08 +0300

Add objlab

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/misc/objlab/default.nix | 44++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -272,6 +272,7 @@ lib.makeScope newScope ( lazyscraper = callPackage ./misc/lazyscraper { }; morse-talk = callPackage ./misc/morse-talk { }; musig = callPackage ./misc/musig { }; + objlab = callPackage ./misc/objlab { }; playonmac = callPackage ./misc/playonmac { }; ptunnel = callPackage ./misc/ptunnel { }; pvs-studio = callPackage ./misc/pvs-studio { }; diff --git a/pkgs/misc/objlab/default.nix b/pkgs/misc/objlab/default.nix @@ -0,0 +1,44 @@ +{ lib, stdenv, fetchFromGitHub, cmake, ghc_filesystem, glfw, libglvnd, libGLU }: + +stdenv.mkDerivation rec { + pname = "objlab"; + version = "2019-11-23"; + + src = fetchFromGitHub { + owner = "lighttransport"; + repo = pname; + rev = "c9d50b466f477722578ddf14565561d778c1b4b9"; + hash = "sha256-mE4s+viW6fGfnd8+LlDH4LyRLQ91nwe9dtxyI+dIhsM="; + }; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "add_subdirectory" "#add_subdirectory" + ''; + + nativeBuildInputs = [ cmake ]; + + buildInputs = [ + ghc_filesystem + glfw + libglvnd + libGLU + ]; + + NIX_CFLAGS_COMPILE = "-fpermissive"; + + cmakeFlags = [ "-DOpenGL_GL_PREFERENCE=GLVND" ]; + + installPhase = '' + install -Dm755 objlab -t $out/bin + ''; + + meta = with lib; { + description = "Simple wavefront .obj viewer"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.linux; + skip.ci = stdenv.isDarwin; + }; +}