2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-09-25 04:45:31 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, callPackage
|
|
|
|
|
|
|
|
# Linux deps
|
|
|
|
, libGL
|
|
|
|
, xorg
|
|
|
|
|
|
|
|
# Darwin deps
|
2023-05-24 13:37:59 +00:00
|
|
|
, CoreFoundation
|
2020-09-25 04:45:31 +00:00
|
|
|
, Cocoa
|
|
|
|
, AudioToolbox
|
|
|
|
, OpenGL
|
|
|
|
, Foundation
|
|
|
|
, ForceFeedback
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lobster";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "2023.9";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aardappel";
|
2021-10-28 06:52:43 +00:00
|
|
|
repo = "lobster";
|
|
|
|
rev = "v${version}";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-30OOdl/BzWJeLhSWuzLAhwELRPcOJIi7FqwL/ztUOUo=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
buildInputs = if stdenv.isDarwin
|
|
|
|
then [
|
2023-05-24 13:37:59 +00:00
|
|
|
CoreFoundation
|
2020-09-25 04:45:31 +00:00
|
|
|
Cocoa
|
|
|
|
AudioToolbox
|
|
|
|
OpenGL
|
|
|
|
Foundation
|
|
|
|
ForceFeedback
|
|
|
|
]
|
|
|
|
else [
|
|
|
|
libGL
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXext
|
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cd dev
|
|
|
|
'';
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
passthru.tests.can-run-hello-world = callPackage ./test-can-run-hello-world.nix {};
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-10-28 06:52:43 +00:00
|
|
|
homepage = "https://strlen.com/lobster/";
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "The Lobster programming language";
|
|
|
|
longDescription = ''
|
|
|
|
Lobster is a programming language that tries to combine the advantages of
|
|
|
|
very static typing and memory management with a very lightweight,
|
|
|
|
friendly and terse syntax, by doing most of the heavy lifting for you.
|
|
|
|
'';
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|