From e9bbad73863d22a5610edfef413726f3051e1cc1 Mon Sep 17 00:00:00 2001 From: aviac Date: Mon, 6 May 2024 16:50:30 +0200 Subject: [PATCH 1/2] lib/licenses: add radiance --- lib/licenses.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/licenses.nix b/lib/licenses.nix index c5d05437efc0..218173de8f25 100644 --- a/lib/licenses.nix +++ b/lib/licenses.nix @@ -1089,6 +1089,11 @@ in mkLicense lset) ({ url = "https://qwt.sourceforge.io/qwtlicense.html"; }; + radiance = { + fullName = "The Radiance Software License, Version 2.0"; + url = "https://github.com/LBNL-ETA/Radiance/blob/master/License.txt"; + }; + ruby = { spdxId = "Ruby"; fullName = "Ruby License"; From be8664b55598843a6137e1e1eaae831143726e26 Mon Sep 17 00:00:00 2001 From: aviac Date: Mon, 6 May 2024 16:50:37 +0200 Subject: [PATCH 2/2] radiance: init at 5.4 --- pkgs/by-name/ra/radiance/package.nix | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 pkgs/by-name/ra/radiance/package.nix diff --git a/pkgs/by-name/ra/radiance/package.nix b/pkgs/by-name/ra/radiance/package.nix new file mode 100644 index 000000000000..afbf754d9628 --- /dev/null +++ b/pkgs/by-name/ra/radiance/package.nix @@ -0,0 +1,47 @@ +{ + cmake, + fetchFromGitHub, + runCommand, + lib, + libGLU, + stdenv, + libX11, + tcsh, + tk, +}: +let + csh = runCommand "csh" { } '' + mkdir -p $out/bin + ln -s ${lib.getExe tcsh} $out/bin/csh + ''; +in +stdenv.mkDerivation (finalAttrs: { + pname = "radiance"; + version = "5.4"; + + src = fetchFromGitHub { + owner = "LBNL-ETA"; + repo = "radiance"; + rev = "refs/tags/rad${lib.versions.major finalAttrs.version}R${lib.versions.minor finalAttrs.version}"; + hash = "sha256-21lVWqO8uJefnm/dyfrjQJYbGck0fIRr2j0A+7WlZbM="; + }; + + nativeBuildInputs = [ + cmake + csh # for some custom scripting in the repo + tk # for wish + ]; + + buildInputs = [ + libGLU + libX11 + ]; + + meta = { + description = "Validated Lighting Simulation Tool"; + homepage = "https://github.com/LBNL-ETA/Radiance"; + license = lib.licenses.radiance; + maintainers = with lib.maintainers; [ robwalt ]; + mainProgram = "rad"; + }; +})