uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
54
pkgs/games/gargoyle/darwin.sh
Normal file
54
pkgs/games/gargoyle/darwin.sh
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
#!@shell@
|
||||
|
||||
set -e
|
||||
|
||||
GARGDIST=build/macosx.release
|
||||
BUNDLE=${out}/Applications/Gargoyle.app/Contents
|
||||
TERPS="
|
||||
advsys/advsys
|
||||
agility/agility
|
||||
alan2/alan2
|
||||
alan3/alan3
|
||||
bocfel/bocfel
|
||||
frotz/frotz
|
||||
garglk/gargoyle
|
||||
geas/geas
|
||||
git/git
|
||||
glulxe/glulxe
|
||||
hugo/hugo
|
||||
jacl/jacl
|
||||
level9/level9
|
||||
magnetic/magnetic
|
||||
nitfol/nitfol
|
||||
scare/scare
|
||||
scott/scott
|
||||
tads/tadsr
|
||||
"
|
||||
|
||||
mkdir -p $BUNDLE/MacOS
|
||||
mkdir -p $BUNDLE/Frameworks
|
||||
mkdir -p $BUNDLE/Resources
|
||||
mkdir -p $BUNDLE/PlugIns
|
||||
|
||||
install_name_tool -id @executable_path/../Frameworks/libgarglk.dylib $GARGDIST/garglk/libgarglk.dylib
|
||||
for file in $TERPS
|
||||
do
|
||||
install_name_tool -change @executable_path/libgarglk.dylib @executable_path/../Frameworks/libgarglk.dylib $GARGDIST/$file || true
|
||||
cp -f $GARGDIST/$file $BUNDLE/PlugIns
|
||||
done
|
||||
|
||||
cp -f garglk/launcher.plist $BUNDLE/Info.plist
|
||||
cp -f $GARGDIST/garglk/gargoyle $BUNDLE/MacOS/Gargoyle
|
||||
cp -f $GARGDIST/garglk/libgarglk.dylib $BUNDLE/Frameworks
|
||||
cp -f $GARGDIST/garglk/libgarglk.dylib $BUNDLE/PlugIns
|
||||
cp -f garglk/launchmac.nib $BUNDLE/Resources/MainMenu.nib
|
||||
cp -f garglk/garglk.ini $BUNDLE/Resources
|
||||
cp -f garglk/*.icns $BUNDLE/Resources
|
||||
cp -f licenses/* $BUNDLE/Resources
|
||||
|
||||
mkdir $BUNDLE/Resources/Fonts
|
||||
cp fonts/LiberationMono*.ttf $BUNDLE/Resources/Fonts
|
||||
cp fonts/LinLibertine*.otf $BUNDLE/Resources/Fonts
|
||||
|
||||
mkdir -p ${out}/bin
|
||||
ln -s $BUNDLE/MacOS/Gargoyle ${out}/bin/gargoyle
|
||||
75
pkgs/games/gargoyle/default.nix
Normal file
75
pkgs/games/gargoyle/default.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{ lib, stdenv, fetchFromGitHub, substituteAll, jam, cctools, pkg-config
|
||||
, SDL, SDL_mixer, SDL_sound, gtk2, libvorbis, smpeg }:
|
||||
|
||||
let
|
||||
|
||||
jamenv = ''
|
||||
unset AR
|
||||
'' + (if stdenv.isDarwin then ''
|
||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getDev SDL}/include/SDL"
|
||||
export GARGLKINI="$out/Applications/Gargoyle.app/Contents/Resources/garglk.ini"
|
||||
'' else ''
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/libexec/gargoyle"
|
||||
export DESTDIR="$out"
|
||||
export _BINDIR=libexec/gargoyle
|
||||
export _APPDIR=libexec/gargoyle
|
||||
export _LIBDIR=libexec/gargoyle
|
||||
export GARGLKINI="$out/etc/garglk.ini"
|
||||
'');
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gargoyle";
|
||||
version = "2019.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "garglk";
|
||||
repo = "garglk";
|
||||
rev = version;
|
||||
sha256 = "0w54avmbp4i4zps2rb4acmpa641s6wvwbrln4vbdhcz97fx48nzz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ jam pkg-config ] ++ lib.optional stdenv.isDarwin cctools;
|
||||
|
||||
buildInputs = [ SDL SDL_mixer SDL_sound gtk2 ]
|
||||
++ lib.optionals stdenv.isDarwin [ smpeg libvorbis ];
|
||||
|
||||
# Workaround build failure on -fno-common toolchains:
|
||||
# ld: build/linux.release/alan3/Location.o:(.bss+0x0): multiple definition of
|
||||
# `logFile'; build/linux.release/alan3/act.o:(.bss+0x0): first defined here
|
||||
# TODO: drop once updated to 2022.1 or later.
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
buildPhase = jamenv + "jam -j$NIX_BUILD_CORES";
|
||||
|
||||
installPhase =
|
||||
if stdenv.isDarwin then
|
||||
(substituteAll {
|
||||
inherit (stdenv) shell;
|
||||
isExecutable = true;
|
||||
src = ./darwin.sh;
|
||||
})
|
||||
else jamenv + ''
|
||||
jam -j$NIX_BUILD_CORES install
|
||||
mkdir -p "$out/bin"
|
||||
ln -s ../libexec/gargoyle/gargoyle "$out/bin"
|
||||
mkdir -p "$out/etc"
|
||||
cp garglk/garglk.ini "$out/etc"
|
||||
mkdir -p "$out/share/applications"
|
||||
cp garglk/gargoyle.desktop "$out/share/applications"
|
||||
mkdir -p "$out/share/icons/hicolor/32x32/apps"
|
||||
cp garglk/gargoyle-house.png "$out/share/icons/hicolor/32x32/apps"
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
homepage = "http://ccxvii.net/gargoyle/";
|
||||
license = licenses.gpl2Plus;
|
||||
description = "Interactive fiction interpreter GUI";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue