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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,60 @@
{ lib, stdenv, file, makeDesktopItem, cog32, spur32, spur64 ? "none" }:
stdenv.mkDerivation rec {
name = "pharo";
src = ./pharo-vm.sh;
inherit cog32 spur32 spur64 file;
magic = ./magic;
desktopItem = makeDesktopItem {
inherit name;
desktopName = "Pharo VM";
genericName = "Pharo Virtual Machine";
exec = "pharo %F";
icon = "pharo";
startupNotify = false;
categories = [ "Development" ];
mimeTypes = [ "application/x-pharo-image" ];
};
unpackPhase = ''
cp $src ./pharo-vm.sh
sourceRoot=$PWD
'';
buildPhase = ''
substituteAllInPlace ./pharo-vm.sh
'';
installPhase = ''
mkdir -p $out/bin
cp pharo-vm.sh $out/bin/pharo
chmod +x $out/bin/pharo
'';
meta = {
description = "Pharo virtual machine (multiple variants)";
longDescription = ''
Pharo's goal is to deliver a clean, innovative, free open-source
Smalltalk-inspired environment. By providing a stable and small core
system, excellent dev tools, and maintained releases, Pharo is an
attractive platform to build and deploy mission critical applications.
This package provides a front-end for starting the virtual
machine. The command 'pharo-vm' automatically detects the type
of image and executes a suitable virtual machine: CogV3, Spur,
or Spur64. This makes it easy to open Pharo images because you
do not have to worry about which virtual machine variant is
required.
More about the Cog family of virtual machines:
http://www.mirandabanda.org/cogblog/about-cog/
'';
homepage = "http://pharo.org";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.lukego ];
# Pharo VM sources are packaged separately for darwin (OS X)
platforms = lib.filter
(system: with lib.systems.elaborate { inherit system; };
isUnix && !isDarwin)
lib.platforms.mesaPlatforms;
};
}

View file

@ -0,0 +1,37 @@
# Smalltalk image file formats
0 lelong 6502 Smalltalk image V3 32b (%d)
!:mime application/squeak-image
0 belong 6502 Smalltalk image V3 32b (%d)
!:mime application/squeak-image
0 lelong 6504 Smalltalk image V3 32b +C (%d)
!:mime application/cog-image
0 belong 6504 Smalltalk image V3 32b +C (%d)
!:mime application/cog-image
0 lelong 68000 Smalltalk image V3 64b (%d)
!:mime application/squeak64-image
4 belong 68000 Smalltalk image V3 64b (%d)
!:mime application/squeak64-image
0 lelong 68002 Smalltalk image V3 64b +C (%d)
!:mime application/cog64-image
4 belong 68002 Smalltalk image V3 64b +C (%d)
!:mime application/cog64-image
0 lelong 6505 Smalltalk image V3 32b +C+NF (%d)
!:mime application/cog-image
0 belong 6505 Smalltalk image V3 32b +C+NF (%d)
!:mime application/cog-image
0 lelong 68003 Smalltalk image V3 64b +C+NF (%d)
!:mime application/cog64-image
4 belong 68003 Smalltalk image V3 64b +C+NF (%d)
!:mime application/cog64-image
0 lelong 6521 Smalltalk image Spur 32b +C+NF (%d)
!:mime application/spur-image
0 belong 6521 Smalltalk image Spur 32b +C+NF (%d)
!:mime application/spur-image
0 lelong 68019 Smalltalk image Spur 64b +C+NF (%d)
!:mime application/spur64-image
4 belong 68019 Smalltalk image Spur 64b +C+NF (%d)
!:mime application/spur64-image
0 lelong 68021 Smalltalk image Spur 64b +C+NF+Tag (%d)
!:mime application/spur64-image
4 belong 68021 Smalltalk image Spur 64b +C+NF+Tag (%d)
!:mime application/spur64-image

View file

@ -0,0 +1,57 @@
#!/bin/sh
# This is based on the script by David T. Lewis posted here:
# http://lists.squeakfoundation.org/pipermail/vm-dev/2017-April/024836.html
#
# VM run utility script
# usage: run <myimage>
#
# Select a VM and run an image based on the image format number
PATH=$PATH:@file@/bin
# Search for the image filename in the command line arguments
for arg in $* $SQUEAK_IMAGE; do
case ${arg} in
-*) # ignore
;;
*) # either an option argument or the image name
if test -e ${arg}; then
magic=$(file -L -b -m @magic@ "$arg")
case "$magic" in
"Smalltalk image V3 32b"*)
image=${arg}
vm=@cog32@/bin/pharo-cog
;;
"Smalltalk image Spur 32b"*)
image=${arg}
vm=@spur32@/bin/pharo-spur
;;
"Smalltalk image Spur 64b"*)
if [ "@spur64vm@" == "none" ]; then
echo "error: detected 64-bit image but 64-bit VM is not available" >&2
exit 1
fi
image=${arg}
vm=@spur64@/bin/pharo-spur64
;;
esac
fi
;;
esac
done
# Print a message to explain our DWIM'ery.
if [ -n "$image" ]; then
echo "using VM selected by image type."
echo " image: $image"
echo " type: $magic"
echo " vm: $vm"
else
echo "using default vm; image type not detected"
vm=@cog32@/bin/pharo-cog
fi
# Run the VM
set -f
exec -- "${vm}" "$@"