Merge pull request #296780 from wegank/opencflite-bump
opencflite: 476.19.0 -> 635.21.8
This commit is contained in:
commit
bc8d07840e
5 changed files with 106 additions and 66 deletions
63
pkgs/by-name/ma/maloader/package.nix
Normal file
63
pkgs/by-name/ma/maloader/package.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
lib,
|
||||
llvmPackages,
|
||||
fetchFromGitHub,
|
||||
opencflite,
|
||||
libuuid,
|
||||
zlib,
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv = llvmPackages.libcxxStdenv;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "maloader";
|
||||
version = "0-unstable-2018-05-02";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shinh";
|
||||
repo = "maloader";
|
||||
rev = "464a90fdfd06a54c9da5d1a3725ed6229c0d3d60";
|
||||
hash = "sha256-0N3+tr8XUsn3WhJNsPVknumBrfMgDawTEXVRkIs/IV8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace ld-mac.cc \
|
||||
--replace-fail 'loadLibMac(mypath)' 'loadLibMac("${placeholder "out"}/lib/")' \
|
||||
--replace-fail 'libCoreFoundation.so' '${opencflite}/lib/libCoreFoundation.so'
|
||||
substituteInPlace libmac/stack_protector-obsd.c \
|
||||
--replace-fail 'sys/sysctl.h' 'linux/sysctl.h'
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
libuuid
|
||||
zlib
|
||||
];
|
||||
|
||||
buildFlags = [
|
||||
"USE_LIBCXX=1"
|
||||
"release"
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-command-line-argument";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -vD libmac.so "$out/lib/libmac.so"
|
||||
|
||||
for bin in extract macho2elf ld-mac; do
|
||||
install -vD "$bin" "$out/bin/$bin"
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Mach-O loader for Linux";
|
||||
homepage = "https://github.com/shinh/maloader";
|
||||
license = lib.licenses.bsd2;
|
||||
maintainers = with lib.maintainers; [ wegank ];
|
||||
inherit (opencflite.meta) platforms;
|
||||
};
|
||||
}
|
43
pkgs/by-name/op/opencflite/package.nix
Normal file
43
pkgs/by-name/op/opencflite/package.nix
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
icu,
|
||||
libkqueue,
|
||||
libuuid,
|
||||
tzdata,
|
||||
zlib,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "opencflite";
|
||||
version = "635.21.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gerickson";
|
||||
repo = "opencflite";
|
||||
rev = "opencflite-${version}";
|
||||
hash = "sha256-ijyj4SFYQ0wZAFM2ehNnR9+yu5yDTSVW3VBycBT9l+A=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
icu
|
||||
libkqueue
|
||||
libuuid
|
||||
tzdata
|
||||
zlib
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Cross platform port of the macOS CoreFoundation";
|
||||
homepage = "https://github.com/gerickson/opencflite";
|
||||
license = lib.licenses.apsl20;
|
||||
maintainers = with lib.maintainers; [ wegank ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, opencflite, clang, libcxx }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "maloader";
|
||||
version = "unstable-2014-02-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "shinh";
|
||||
repo = "maloader";
|
||||
rev = "5f220393e0b7b9ad0cf1aba0e89df2b42a1f0442";
|
||||
sha256 = "0dd1pn07x1y8pyn5wz8qcl1c1xwghyya4d060m3y9vx5dhv9xmzw";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i \
|
||||
-e '/if.*loadLibMac.*mypath/s|mypath|"'"$out/lib/"'"|' \
|
||||
-e 's|libCoreFoundation\.so|${opencflite}/lib/&|' \
|
||||
ld-mac.cc
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev libcxx}/include/c++/v1";
|
||||
buildInputs = [ clang libcxx ];
|
||||
buildFlags = [ "USE_LIBCXX=1" "release" ];
|
||||
|
||||
installPhase = ''
|
||||
install -vD libmac.so "$out/lib/libmac.so"
|
||||
|
||||
for bin in extract macho2elf ld-mac; do
|
||||
install -vD "$bin" "$out/bin/$bin"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Mach-O loader for Linux";
|
||||
homepage = "https://github.com/shinh/maloader";
|
||||
license = lib.licenses.bsd2;
|
||||
platforms = lib.platforms.linux;
|
||||
broken = true; # 2018-09-08, no succesful build since 2017-08-21
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, icu, libuuid, tzdata }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "opencflite";
|
||||
version = "476.19.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/opencflite/${pname}-${version}.tar.gz";
|
||||
sha256 = "0jgmzs0ycl930hmzcvx0ykryik56704yw62w394q1q3xw5kkjn9v";
|
||||
};
|
||||
|
||||
configureFlags = [ "--with-uuid=${libuuid.dev}" ];
|
||||
buildInputs = [ icu tzdata.dev ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Cross platform port of the macOS CoreFoundation";
|
||||
homepage = "https://sourceforge.net/projects/opencflite/";
|
||||
license = lib.licenses.apsl20;
|
||||
};
|
||||
}
|
|
@ -153,9 +153,6 @@ impure-cmds // appleSourcePackages // chooseLibs // {
|
|||
propagatedBuildInputs = [ self.signingUtils ];
|
||||
} ../os-specific/darwin/signing-utils/auto-sign-hook.sh;
|
||||
|
||||
maloader = callPackage ../os-specific/darwin/maloader {
|
||||
};
|
||||
|
||||
insert_dylib = callPackage ../os-specific/darwin/insert_dylib { };
|
||||
|
||||
iosSdkPkgs = callPackage ../os-specific/darwin/xcode/sdk-pkgs.nix {
|
||||
|
@ -175,8 +172,6 @@ impure-cmds // appleSourcePackages // chooseLibs // {
|
|||
inherit (apple_sdk_11_0.libs) simd;
|
||||
};
|
||||
|
||||
opencflite = callPackage ../os-specific/darwin/opencflite { };
|
||||
|
||||
openwith = pkgs.darwin.apple_sdk_11_0.callPackage ../os-specific/darwin/openwith {
|
||||
inherit (apple_sdk_11_0.frameworks) AppKit Foundation UniformTypeIdentifiers;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue