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
130
pkgs/tools/package-management/appimagekit/default.nix
Normal file
130
pkgs/tools/package-management/appimagekit/default.nix
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, pkg-config, cmake, autoconf, automake, libtool, makeWrapper
|
||||
, wget, xxd, desktop-file-utils, file
|
||||
, gnupg, glib, zlib, cairo, openssl, fuse, xz, squashfuse, inotify-tools, libarchive
|
||||
, squashfsTools
|
||||
, gtest
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
appimagekit_src = fetchFromGitHub {
|
||||
owner = "AppImage";
|
||||
repo = "AppImageKit";
|
||||
rev = "8bbf694455d00f48d835f56afaa1dabcd9178ba6";
|
||||
sha256 = "sha256-pqg+joomC5CI9WdKP/h/XKPsruMgZEaIOjPLOqnNPZw=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
# squashfuse adapted to nix from cmake experession in "${appimagekit_src}/lib/libappimage/cmake/dependencies.cmake"
|
||||
appimagekit_squashfuse = squashfuse.overrideAttrs (attrs: rec {
|
||||
pname = "squashfuse";
|
||||
version = "unstable-2016-10-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vasi";
|
||||
repo = pname;
|
||||
rev = "1f980303b89c779eabfd0a0fdd36d6a7a311bf92";
|
||||
sha256 = "sha256-BZd1+7sRYZHthULKk3RlgMIy4uCUei45GbSEiZxLPFM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
"${appimagekit_src}/lib/libappimage/src/patches/squashfuse.patch"
|
||||
"${appimagekit_src}/lib/libappimage/src/patches/squashfuse_dlopen.patch"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
cp -v ${appimagekit_src}/lib/libappimage/src/patches/squashfuse_dlopen.[hc] .
|
||||
'';
|
||||
|
||||
# Workaround build failure on -fno-common toolchains:
|
||||
# ld: libsquashfuse_ll.a(libfuseprivate_la-fuseprivate.o):(.bss+0x8):
|
||||
# multiple definition of `have_libloaded'; runtime.4.o:(.bss.have_libloaded+0x0): first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
preConfigure = ''
|
||||
sed -i "/PKG_CHECK_MODULES.*/,/,:./d" configure
|
||||
sed -i "s/typedef off_t sqfs_off_t/typedef int64_t sqfs_off_t/g" common.h
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--disable-demo" "--disable-high-level" "--without-lzo" "--without-lz4"
|
||||
];
|
||||
|
||||
postConfigure = ''
|
||||
sed -i "s|XZ_LIBS = -llzma |XZ_LIBS = -Bstatic -llzma/|g" Makefile
|
||||
'';
|
||||
|
||||
# only static libs and header files
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib $out/include
|
||||
cp -v ./.libs/*.a $out/lib
|
||||
cp -v ./*.h $out/include
|
||||
'';
|
||||
});
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "appimagekit";
|
||||
version = "unstable-2020-12-31";
|
||||
|
||||
src = appimagekit_src;
|
||||
|
||||
patches = [ ./nix.patch ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs src/embed-magic-bytes-in-file.sh
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config cmake autoconf automake libtool wget xxd
|
||||
desktop-file-utils makeWrapper
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glib zlib cairo openssl fuse xz inotify-tools
|
||||
libarchive squashfsTools appimagekit_squashfuse
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
export HOME=$(pwd)
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
"-DUSE_SYSTEM_XZ=ON"
|
||||
"-DUSE_SYSTEM_SQUASHFUSE=ON"
|
||||
"-DSQUASHFUSE=${appimagekit_squashfuse}"
|
||||
"-DUSE_SYSTEM_LIBARCHIVE=ON"
|
||||
"-DUSE_SYSTEM_GTEST=ON"
|
||||
"-DUSE_SYSTEM_MKSQUASHFS=ON"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/appimagekit
|
||||
cp "${squashfsTools}/bin/mksquashfs" "$out/lib/appimagekit/"
|
||||
cp "${desktop-file-utils}/bin/desktop-file-validate" "$out/bin"
|
||||
|
||||
wrapProgram "$out/bin/appimagetool" \
|
||||
--prefix PATH : "${lib.makeBinPath [ file gnupg ]}" \
|
||||
--unset SOURCE_DATE_EPOCH
|
||||
'';
|
||||
|
||||
checkInputs = [ gtest ];
|
||||
|
||||
# for debugging
|
||||
passthru = {
|
||||
squashfuse = appimagekit_squashfuse;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to package desktop applications as AppImages";
|
||||
longDescription = ''
|
||||
AppImageKit is an implementation of the AppImage format that
|
||||
provides tools such as appimagetool and appimaged for handling
|
||||
AppImages.
|
||||
'';
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ taeer ];
|
||||
homepage = src.meta.homepage;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
82
pkgs/tools/package-management/appimagekit/nix.patch
Normal file
82
pkgs/tools/package-management/appimagekit/nix.patch
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
Submodule lib/libappimage contains modified content
|
||||
diff --git a/lib/libappimage/cmake/dependencies.cmake b/lib/libappimage/cmake/dependencies.cmake
|
||||
index 8d96484..c7b17a1 100644
|
||||
--- a/lib/libappimage/cmake/dependencies.cmake
|
||||
+++ b/lib/libappimage/cmake/dependencies.cmake
|
||||
@@ -91,9 +91,18 @@ if(NOT USE_SYSTEM_SQUASHFUSE)
|
||||
INCLUDE_DIRS "<SOURCE_DIR>"
|
||||
)
|
||||
else()
|
||||
- message(STATUS "Using system squashfuse")
|
||||
+ message(STATUS "Using system squashfsfuse from ${SQUASHFUSE}")
|
||||
|
||||
- import_pkgconfig_target(TARGET_NAME libsquashfuse PKGCONFIG_TARGET squashfuse)
|
||||
+ add_library(libsquashfuse INTERFACE IMPORTED GLOBAL)
|
||||
+
|
||||
+ set(squashfuse_INCLUDE_DIRS "${SQUASHFUSE}/include")
|
||||
+ set(squashfuse_LIBRARIES "${SQUASHFUSE}/lib/libsquashfuse.a;${SQUASHFUSE}/lib/libsquashfuse_ll.a;${SQUASHFUSE}/lib/libfuseprivate.a")
|
||||
+
|
||||
+ set_property(
|
||||
+ TARGET libsquashfuse
|
||||
+ PROPERTY INTERFACE_LINK_LIBRARIES ${squashfuse_LIBRARIES}
|
||||
+ )
|
||||
+ include_directories(${squashfuse_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
|
||||
diff --git a/src/appimagetool.c b/src/appimagetool.c
|
||||
index 6b37419..23425e7 100644
|
||||
--- a/src/appimagetool.c
|
||||
+++ b/src/appimagetool.c
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <argp.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
-#include "squashfuse.h"
|
||||
+#include <squashfuse.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -96,7 +96,7 @@ static void die(const char *msg) {
|
||||
}
|
||||
|
||||
/* Function that prints the contents of a squashfs file
|
||||
-* using libsquashfuse (#include "squashfuse.h") */
|
||||
+* using libsquashfuse (#include <squashfuse.h>) */
|
||||
int sfs_ls(char* image) {
|
||||
sqfs_err err = SQFS_OK;
|
||||
sqfs_traverse trv;
|
||||
diff --git a/src/appimagetoolnoglib.c b/src/appimagetoolnoglib.c
|
||||
index f900e76..ffa87f8 100644
|
||||
--- a/src/appimagetoolnoglib.c
|
||||
+++ b/src/appimagetoolnoglib.c
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
-#include "squashfuse.h"
|
||||
+#include <squashfuse.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -118,7 +118,7 @@ int is_regular_file(const char *path)
|
||||
}
|
||||
|
||||
/* Function that prints the contents of a squashfs file
|
||||
- * using libsquashfuse (#include "squashfuse.h") */
|
||||
+ * using libsquashfuse (#include <squashfuse.h>) */
|
||||
int sfs_ls(char* image) {
|
||||
sqfs_err err = SQFS_OK;
|
||||
sqfs_traverse trv;
|
||||
diff --git a/src/runtime.c b/src/runtime.c
|
||||
index bada3af..70a642b 100644
|
||||
--- a/src/runtime.c
|
||||
+++ b/src/runtime.c
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
-#include "squashfuse.h"
|
||||
+#include <squashfuse.h>
|
||||
#include <squashfs_fs.h>
|
||||
#include <nonstd.h>
|
||||
Loading…
Add table
Add a link
Reference in a new issue