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,96 @@
{ makeDesktopItem, pname, suiteName }:
{
planmaker = makeDesktopItem {
name = "${pname}-planmaker";
desktopName = "${suiteName} PlanMaker";
icon = "${pname}-pml";
categories = [ "Office" ];
exec = "${pname}-planmaker %F";
tryExec = "${pname}-planmaker";
mimeTypes = [
"application/x-pmd"
"application/x-pmdx"
"application/x-pmv"
"application/excel"
"application/x-excel"
"application/x-ms-excel"
"application/x-msexcel"
"application/x-sylk"
"application/x-xls"
"application/xls"
"application/vnd.ms-excel"
"application/vnd.stardivision.calc"
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
"application/vnd.openxmlformats-officedocument.spreadsheetml.template"
"application/vnd.ms-excel.sheet.macroenabled.12"
"application/vnd.ms-excel.template.macroEnabled.12"
"application/x-dif"
"text/spreadsheet"
"text/csv"
"application/x-prn"
"application/vnd.ms-excel.sheet.binary.macroenabled.12"
];
startupWMClass = "pm";
};
presentations = makeDesktopItem {
name = "${pname}-presentations";
desktopName = "${suiteName} Presentations";
icon = "${pname}-prl";
categories = [ "Office" ];
exec = "${pname}-presentations %F";
tryExec = "${pname}-presentations";
mimeTypes = [
"application/x-prdx"
"application/x-prvx"
"application/x-prsx"
"application/x-prd"
"application/x-prv"
"application/x-prs"
"application/ppt"
"application/mspowerpoint"
"application/vnd.ms-powerpoint"
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
"application/vnd.ms-powerpoint.presentation.macroenabled.12"
"application/vnd.openxmlformats-officedocument.presentationml.template"
"application/vnd.ms-powerpoint.template.macroEnabled.12"
"application/vnd.ms-powerpoint.slideshow.macroenabled.12"
"application/vnd.openxmlformats-officedocument.presentationml.slideshow"
];
startupWMClass = "pr";
};
textmaker = makeDesktopItem {
name = "${pname}-textmaker";
desktopName = "${suiteName} TextMaker";
icon = "${pname}-tml";
categories = [ "Office" ];
exec = "${pname}-textmaker %F";
tryExec = "${pname}-textmaker";
mimeTypes = [
"application/x-tmdx"
"application/x-tmvx"
"application/x-tmd"
"application/x-tmv"
"application/msword"
"application/vnd.ms-word"
"application/x-doc"
"text/rtf"
"application/rtf"
"application/vnd.oasis.opendocument.text"
"application/vnd.oasis.opendocument.text-template"
"application/vnd.stardivision.writer"
"application/vnd.sun.xml.writer"
"application/vnd.sun.xml.writer.template"
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
"application/vnd.ms-word.document.macroenabled.12"
"application/vnd.openxmlformats-officedocument.wordprocessingml.template"
"application/vnd.ms-word.template.macroenabled.12"
"application/x-pocket-word"
"application/x-dbf"
"application/msword-template"
];
startupWMClass = "tm";
};
}

View file

@ -0,0 +1,27 @@
{ callPackage
, fetchurl
# This is a bit unusual, but makes version and hash easily
# overridable. This is useful when the upstream archive was replaced
# and nixpkgs is not in sync yet.
, officeVersion ? {
version = "982";
edition = "2018";
hash = "sha256-euoZfAaDDTXzoaNLc/YdTngreTiYOBi7sGU161GP83w=";
}
, ... } @ args:
callPackage ./generic.nix (args // rec {
inherit (officeVersion) version edition;
pname = "freeoffice";
suiteName = "FreeOffice";
src = fetchurl {
inherit (officeVersion) hash;
url = "https://www.softmaker.net/down/softmaker-freeoffice-${version}-amd64.tgz";
};
archive = "freeoffice${edition}.tar.lzma";
})

View file

@ -0,0 +1,129 @@
{ lib, stdenv, autoPatchelfHook, makeDesktopItem, makeWrapper, copyDesktopItems
# Dynamic Libraries
, curl, libGL, libX11, libXext, libXmu, libXrandr, libXrender
# For fixing up execution of /bin/ls, which is necessary for
# product unlocking.
, coreutils, libredirect
# Extra utilities used by the SoftMaker applications.
, gnugrep, util-linux, which
, pname, version, edition, suiteName, src, archive
, ...
}:
let
desktopItems = import ./desktop_items.nix {
inherit makeDesktopItem pname suiteName;
};
shortEdition = builtins.substring 2 2 edition;
in stdenv.mkDerivation {
inherit pname src;
version = "${edition}.${version}";
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
makeWrapper
];
buildInputs = [
curl
libGL
libX11
libXext
libXmu
libXrandr
libXrender
stdenv.cc.cc.lib
];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
runHook preUnpack
mkdir installer
tar -C installer -xf ${src}
mkdir ${pname}
tar -C ${pname} -xf installer/${archive}
runHook postUnpack
'';
installPhase = let
# SoftMaker/FreeOffice collects some system information upon
# unlocking the product. But in doing so, it attempts to execute
# /bin/ls. If the execve syscall fails, the whole unlock
# procedure fails. This works around that by rewriting /bin/ls
# to the proper path.
#
# In addition, it expects some common utilities (which, whereis)
# to be in the path.
#
# SoftMaker Office restarts itself upon some operations, such
# changing the theme and unlocking. Unfortunately, we do not
# have control over its environment then and it will fail
# with an error.
extraWrapperArgs = ''
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
--set NIX_REDIRECTS "/bin/ls=${coreutils}/bin/ls" \
--prefix PATH : "${lib.makeBinPath [ coreutils gnugrep util-linux which ]}"
'';
in ''
runHook preInstall
mkdir -p $out/share
cp -r ${pname} $out/share/${pname}${edition}
# Wrap rather than symlinking, so that the programs can determine
# their resource path.
mkdir -p $out/bin
makeWrapper $out/share/${pname}${edition}/planmaker $out/bin/${pname}-planmaker \
${extraWrapperArgs}
makeWrapper $out/share/${pname}${edition}/presentations $out/bin/${pname}-presentations \
${extraWrapperArgs}
makeWrapper $out/share/${pname}${edition}/textmaker $out/bin/${pname}-textmaker \
${extraWrapperArgs}
for size in 16 32 48 64 96 128 256 512 1024; do
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps
for app in pml prl tml; do
ln -s $out/share/${pname}${edition}/icons/''${app}_''${size}.png \
$out/share/icons/hicolor/''${size}x''${size}/apps/${pname}-''${app}.png
done
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/mimetypes
for mimetype in pmd prd tmd; do
ln -s $out/share/${pname}${edition}/icons/''${mimetype}_''${size}.png \
$out/share/icons/hicolor/''${size}x''${size}/mimetypes/application-x-''${mimetype}.png
done
done
# freeoffice 973 misses the 96x96 application icons, giving broken symbolic links
# remove broken symbolic links
find $out -xtype l -ls -exec rm {} \;
# Add mime types
install -D -t $out/share/mime/packages ${pname}/mime/softmaker-*office*${shortEdition}.xml
runHook postInstall
'';
desktopItems = builtins.attrValues desktopItems;
meta = with lib; {
description = "An office suite with a word processor, spreadsheet and presentation program";
homepage = "https://www.softmaker.com/";
license = licenses.unfree;
maintainers = with maintainers; [ ];
platforms = [ "x86_64-linux" ];
};
}

View file

@ -0,0 +1,28 @@
{ callPackage
, fetchurl
# This is a bit unusual, but makes version and hash easily
# overridable. This is useful when people have an older version of
# Softmaker Office or when the upstream archive was replaced and
# nixpkgs is not in sync yet.
, officeVersion ? {
version = "1032";
edition = "2021";
hash = "sha256-LchSqLVBdkmWJQ8hCEvtwRPgIUSDE0URKPzCkEexGbc=";
}
, ... } @ args:
callPackage ./generic.nix (args // rec {
inherit (officeVersion) version edition;
pname = "softmaker-office";
suiteName = "SoftMaker Office";
src = fetchurl {
inherit (officeVersion) hash;
url = "https://www.softmaker.net/down/softmaker-office-${edition}-${version}-amd64.tgz";
};
archive = "office${edition}.tar.lzma";
})