forked from mirrors/nixpkgs
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
44 lines
1 KiB
Nix
44 lines
1 KiB
Nix
{ lib, stdenv, fetchFromGitHub, poco, openssl, SDL2, SDL2_mixer }:
|
|
|
|
let
|
|
craftos2-lua = fetchFromGitHub {
|
|
owner = "MCJack123";
|
|
repo = "craftos2-lua";
|
|
rev = "v2.4.4";
|
|
sha256 = "1q63ki4sxx8bxaa6ag3xj153p7a8a12ivm0k33k935p41k6y2k64";
|
|
};
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "craftos-pc";
|
|
version = "2.4.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "MCJack123";
|
|
repo = "craftos2";
|
|
rev = "v${version}";
|
|
sha256 = "00a4p365krbdprlv4979d13mm3alhxgzzj3vqz2g67795plf64j4";
|
|
};
|
|
|
|
buildInputs = [ poco openssl SDL2 SDL2_mixer ];
|
|
|
|
preBuild = ''
|
|
cp -R ${craftos2-lua}/* ./craftos2-lua/
|
|
chmod -R u+w ./craftos2-lua
|
|
make -C craftos2-lua linux
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
DESTDIR=$out/bin make install
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "An implementation of the CraftOS-PC API written in C++ using SDL";
|
|
homepage = "https://www.craftos-pc.cc";
|
|
license = licenses.mit;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.siraben ];
|
|
};
|
|
}
|