Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / compilers / lobster / default.nix
blob59e853f4c7e90e958e1fc112d70478e26e92220c
1 { lib, stdenv
2 , fetchFromGitHub
3 , unstableGitUpdater
4 , cmake
5 , callPackage
7 # Linux deps
8 , libGL
9 , xorg
11 # Darwin deps
12 , cf-private
13 , Cocoa
14 , AudioToolbox
15 , OpenGL
16 , Foundation
17 , ForceFeedback
20 stdenv.mkDerivation rec {
21   pname = "lobster";
22   version = "unstable-2020-12-25";
24   src = fetchFromGitHub {
25     owner = "aardappel";
26     repo = pname;
27     rev = "70e44d475995b03363dedf9c2bcb817b0db8fdcf";
28     sha256 = "0azhminzrkbpvkapass1kccd6123bg7qmcbnzr5774n6bz5365g3";
29   };
31   nativeBuildInputs = [ cmake ];
32   buildInputs = if stdenv.isDarwin
33     then [
34       cf-private
35       Cocoa
36       AudioToolbox
37       OpenGL
38       Foundation
39       ForceFeedback
40     ]
41     else [
42       libGL
43       xorg.libX11
44       xorg.libXext
45     ];
47   preConfigure = "cd dev";
49   passthru = {
50     tests.can-run-hello-world = callPackage ./test-can-run-hello-world.nix {};
51     updateScript = unstableGitUpdater {
52       url = "https://github.com/aardappel/lobster";
53     };
54   };
56   meta = with lib; {
57     homepage = "http://strlen.com/lobster";
58     description = "The Lobster programming language";
59     longDescription = ''
60       Lobster is a programming language that tries to combine the advantages of
61       very static typing and memory management with a very lightweight,
62       friendly and terse syntax, by doing most of the heavy lifting for you.
63     '';
64     license = licenses.asl20;
65     maintainers = with maintainers; [ fgaz ];
66     platforms = platforms.all;
67   };