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
41 lines
1.5 KiB
Nix
41 lines
1.5 KiB
Nix
{ lib, stdenv, fetchFromGitHub, mono, gtk-sharp-2_0, pkgconfig, makeWrapper, gnome2, gtk2 }:
|
|
stdenv.mkDerivation {
|
|
version = "git-2014-08-20";
|
|
pname = "supertux-editor";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SuperTux";
|
|
repo = "supertux-editor";
|
|
rev = "0c666e8ccc7daf9e9720fe79abd63f8fa979c5e5";
|
|
sha256 = "08y5haclgxvcii3hpdvn1ah8qd0f3n8xgxxs8zryj02b8n7cz3vx";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
buildInputs = [mono gtk-sharp-2_0 makeWrapper gnome2.libglade gtk2 ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin $out/lib/supertux-editor
|
|
cp *.{dll,dll.config,exe} $out/lib/supertux-editor
|
|
makeWrapper "${mono}/bin/mono" $out/bin/supertux-editor \
|
|
--add-flags "$out/lib/supertux-editor/supertux-editor.exe" \
|
|
--prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \
|
|
--suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //')
|
|
|
|
makeWrapper "${mono}/bin/mono" $out/bin/supertux-editor-debug \
|
|
--add-flags "--debug $out/lib/supertux-editor/supertux-editor.exe" \
|
|
--prefix MONO_GAC_PREFIX : ${gtk-sharp-2_0} \
|
|
--suffix LD_LIBRARY_PATH : $(echo $NIX_LDFLAGS | sed 's/ -L/:/g;s/ -rpath /:/g;s/-rpath //')
|
|
'';
|
|
|
|
# Always needed on Mono, otherwise nothing runs
|
|
dontStrip = true;
|
|
|
|
meta = with lib; {
|
|
description = "Level editor for SuperTux";
|
|
homepage = "https://github.com/SuperTux/supertux-editor";
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ mathnerd314 ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|