nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 cmake,
3 fetchFromGitHub,
4 runCommand,
5 lib,
6 libGLU,
7 stdenv,
8 libX11,
9 tcsh,
10 tk,
11}:
12let
13 csh = runCommand "csh" { } ''
14 mkdir -p $out/bin
15 ln -s ${lib.getExe tcsh} $out/bin/csh
16 '';
17in
18stdenv.mkDerivation (finalAttrs: {
19 pname = "radiance";
20 version = "5.4";
21
22 src = fetchFromGitHub {
23 owner = "LBNL-ETA";
24 repo = "radiance";
25 tag = "rad${lib.versions.major finalAttrs.version}R${lib.versions.minor finalAttrs.version}";
26 hash = "sha256-21lVWqO8uJefnm/dyfrjQJYbGck0fIRr2j0A+7WlZbM=";
27 };
28
29 nativeBuildInputs = [
30 cmake
31 csh # for some custom scripting in the repo
32 tk # for wish
33 ];
34
35 buildInputs = [
36 libGLU
37 libX11
38 ];
39
40 meta = {
41 description = "Validated Lighting Simulation Tool";
42 homepage = "https://github.com/LBNL-ETA/Radiance";
43 license = lib.licenses.radiance;
44 maintainers = with lib.maintainers; [ robwalt ];
45 mainProgram = "rad";
46 };
47})