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
46
pkgs/os-specific/windows/cygwin-setup/default.nix
Normal file
46
pkgs/os-specific/windows/cygwin-setup/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, fetchcvs, autoconf, automake, libtool, flex, bison, pkg-config
|
||||
, zlib, bzip2, xz, libgcrypt
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cygwin-setup";
|
||||
version = "20131101";
|
||||
|
||||
src = fetchcvs {
|
||||
cvsRoot = ":pserver:anoncvs@cygwin.com:/cvs/cygwin-apps";
|
||||
module = "setup";
|
||||
date = version;
|
||||
sha256 = "024wxaaxkf7p1i78bh5xrsqmfz7ss2amigbfl2r5w9h87zqn9aq3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoconf automake libtool flex bison pkg-config ];
|
||||
|
||||
buildInputs = let
|
||||
mkStatic = flip overrideDerivation (o: {
|
||||
dontDisableStatic = true;
|
||||
configureFlags = toList (o.configureFlags or []) ++ [ "--enable-static" ];
|
||||
buildInputs = map mkStatic (o.buildInputs or []);
|
||||
propagatedBuildInputs = map mkStatic (o.propagatedBuildInputs or []);
|
||||
});
|
||||
in map mkStatic [ zlib bzip2 xz libgcrypt ];
|
||||
|
||||
configureFlags = [ "--disable-shared" ];
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
preConfigure = ''
|
||||
autoreconf -vfi
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -vD setup.exe "$out/bin/setup.exe"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://sourceware.org/cygwin-apps/setup.html";
|
||||
description = "A tool for installing Cygwin";
|
||||
license = licenses.gpl2Plus;
|
||||
};
|
||||
}
|
||||
47
pkgs/os-specific/windows/default.nix
Normal file
47
pkgs/os-specific/windows/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ lib, stdenv, buildPackages
|
||||
, newScope, overrideCC, crossLibcStdenv, libcCross
|
||||
}:
|
||||
|
||||
lib.makeScope newScope (self: with self; {
|
||||
|
||||
cygwinSetup = callPackage ./cygwin-setup { };
|
||||
|
||||
jom = callPackage ./jom { };
|
||||
|
||||
w32api = callPackage ./w32api { };
|
||||
|
||||
mingwrt = callPackage ./mingwrt { };
|
||||
mingw_runtime = mingwrt;
|
||||
|
||||
mingw_w64 = callPackage ./mingw-w64 {
|
||||
stdenv = crossLibcStdenv;
|
||||
};
|
||||
|
||||
crossThreadsStdenv = overrideCC crossLibcStdenv
|
||||
(if stdenv.hostPlatform.useLLVM or false
|
||||
then buildPackages.llvmPackages_8.clangNoLibcxx
|
||||
else buildPackages.gccCrossStageStatic.override (old: {
|
||||
bintools = old.bintools.override {
|
||||
libc = libcCross;
|
||||
};
|
||||
libc = libcCross;
|
||||
}));
|
||||
|
||||
mingw_w64_headers = callPackage ./mingw-w64/headers.nix { };
|
||||
|
||||
mingw_w64_pthreads = callPackage ./mingw-w64/pthreads.nix {
|
||||
stdenv = crossThreadsStdenv;
|
||||
};
|
||||
|
||||
mcfgthreads = callPackage ./mcfgthreads {
|
||||
stdenv = crossThreadsStdenv;
|
||||
};
|
||||
|
||||
npiperelay = callPackage ./npiperelay { };
|
||||
|
||||
pthreads = callPackage ./pthread-w32 { };
|
||||
|
||||
wxMSW = callPackage ./wxMSW-2.8 { };
|
||||
|
||||
libgnurx = callPackage ./libgnurx { };
|
||||
})
|
||||
32
pkgs/os-specific/windows/jom/default.nix
Normal file
32
pkgs/os-specific/windows/jom/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchgit, qt48, qmake4Hook, flex }:
|
||||
|
||||
# At the time of committing this, the expression fails for me to cross-build in
|
||||
# both mingw32 and mingw64.
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "jom";
|
||||
version = "1.0.11";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://gitorious.org/qt-labs/jom.git";
|
||||
rev = "c91a204b05f97eef3c73aaaba3036e20f79fd487";
|
||||
sha256 = "6d3ac84f83bb045213903d9d5340c0447c8fe41671d1dcdeae5c40b66d62ccbf";
|
||||
};
|
||||
|
||||
buildInputs = [ qt48 ];
|
||||
nativeBuildInputs = [ flex qmake4Hook ];
|
||||
|
||||
QTDIR = qt48;
|
||||
|
||||
# cmakeFlags = [ "-DWIN32=1" "-DCMAKE_SYSTEM_NAME=Windows" "-DCMAKE_RC_COMPILER=${stdenv.cc.targetPrefix}windres" ];
|
||||
|
||||
preBuild = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||
export NIX_CROSS_CFLAGS_COMPILE=-fpermissive
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://qt-project.org/wiki/jom";
|
||||
description = "Clone of nmake supporting multiple independent commands in parallel";
|
||||
license = lib.licenses.gpl2Plus; # Explicitly, GPLv2 or GPLv3, but not later.
|
||||
};
|
||||
}
|
||||
21
pkgs/os-specific/windows/libgnurx/default.nix
Normal file
21
pkgs/os-specific/windows/libgnurx/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
let
|
||||
version = "2.5.1";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "libgnurx";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw/Other/UserContributed/regex/mingw-regex-${version}/mingw-${pname}-${version}-src.tar.gz";
|
||||
sha256 = "0xjxcxgws3bblybw5zsp9a4naz2v5bs1k3mk8dw00ggc0vwbfivi";
|
||||
};
|
||||
|
||||
# file looks for libgnurx.a when compiling statically
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isStatic ''
|
||||
ln -s $out/lib/libgnurx{.dll.a,.a}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.windows;
|
||||
};
|
||||
}
|
||||
24
pkgs/os-specific/windows/mcfgthreads/default.nix
Normal file
24
pkgs/os-specific/windows/mcfgthreads/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ stdenv, fetchFromGitHub, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "mcfgthreads";
|
||||
version = "git";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lhmouse";
|
||||
repo = "mcfgthread";
|
||||
rev = "c446cf4fcdc262fc899a188a4bb7136284c34222";
|
||||
sha256 = "1ib90lrd4dz8irq4yvzwhxqa86i5vxl2q2z3z04sf1i8hw427p2f";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
# Don't want prebuilt binaries sneaking in.
|
||||
postUnpack = ''
|
||||
rm -r "$sourceRoot/debug" "$sourceRoot/release"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
];
|
||||
}
|
||||
30
pkgs/os-specific/windows/mingw-w64/default.nix
Normal file
30
pkgs/os-specific/windows/mingw-w64/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, windows, fetchurl }:
|
||||
|
||||
let
|
||||
version = "9.0.0";
|
||||
in stdenv.mkDerivation {
|
||||
pname = "mingw-w64";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw-w64/mingw-w64-v${version}.tar.bz2";
|
||||
sha256 = "10a15bi4lyfi0k0haj0klqambicwma6yi7vssgbz8prg815vja8r";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-idl"
|
||||
"--enable-secure-api"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ windows.mingw_w64_headers ];
|
||||
dontStrip = true;
|
||||
hardeningDisable = [ "stackprotector" "fortify" ];
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.windows;
|
||||
};
|
||||
}
|
||||
11
pkgs/os-specific/windows/mingw-w64/headers.nix
Normal file
11
pkgs/os-specific/windows/mingw-w64/headers.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ stdenvNoCC, mingw_w64 }:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "${mingw_w64.name}-headers";
|
||||
inherit (mingw_w64) src meta;
|
||||
|
||||
preConfigure = ''
|
||||
cd mingw-w64-headers
|
||||
'';
|
||||
|
||||
}
|
||||
16
pkgs/os-specific/windows/mingw-w64/pthreads.nix
Normal file
16
pkgs/os-specific/windows/mingw-w64/pthreads.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ stdenv, mingw_w64 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${mingw_w64.name}-pthreads";
|
||||
inherit (mingw_w64) src meta;
|
||||
|
||||
configureFlags = [
|
||||
# Rustc require 'libpthread.a' when targeting 'x86_64-pc-windows-gnu'.
|
||||
# Enabling this makes it work out of the box instead of failing.
|
||||
"--enable-static"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cd mingw-w64-libraries/winpthreads
|
||||
'';
|
||||
}
|
||||
18
pkgs/os-specific/windows/mingwrt/default.nix
Normal file
18
pkgs/os-specific/windows/mingwrt/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ stdenv, lib, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mingwrt";
|
||||
version = "5.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw/MinGW/Base/mingwrt/mingwrt-${version}/mingwrt-${version}-mingw32-src.tar.xz";
|
||||
sha256 = "1vj6f578wcffdmy7zzf7xz1lw57kxjy08j0k1n28f0j4ylrk68vp";
|
||||
};
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.windows;
|
||||
};
|
||||
|
||||
dontStrip = true;
|
||||
hardeningDisable = [ "stackprotector" "fortify" ];
|
||||
}
|
||||
23
pkgs/os-specific/windows/npiperelay/default.nix
Normal file
23
pkgs/os-specific/windows/npiperelay/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "npiperelay";
|
||||
version = "0.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jstarks";
|
||||
repo = "npiperelay";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-cg4aZmpTysc8m1euxIO2XPv8OMnBk1DwhFcuIFHF/1o=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
||||
meta = {
|
||||
description = "Access Windows named pipes from WSL";
|
||||
homepage = "https://github.com/jstarks/npiperelay";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.shlevy ];
|
||||
platforms = lib.platforms.windows;
|
||||
};
|
||||
}
|
||||
29
pkgs/os-specific/windows/pthread-w32/default.nix
Normal file
29
pkgs/os-specific/windows/pthread-w32/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchzip }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "pthreads-w32";
|
||||
version = "2.9.1";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.tar.gz";
|
||||
sha256 = "1s8iny7g06z289ahdj0kzaxj0cd3wvjbd8j3bh9xlg7g444lhy9w";
|
||||
};
|
||||
|
||||
makeFlags = [ "CROSS=${stdenv.cc.targetPrefix}" "GC-static" ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D libpthreadGC2.a $out/lib/libpthread.a
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "POSIX threads library for Windows";
|
||||
homepage = "https://sourceware.org/pthreads-win32";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ yana ];
|
||||
platforms = platforms.windows;
|
||||
};
|
||||
}
|
||||
17
pkgs/os-specific/windows/w32api/default.nix
Normal file
17
pkgs/os-specific/windows/w32api/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ stdenv, fetchurl, lib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "w32api";
|
||||
version = "3.17-2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mingw/MinGW/Base/w32api/w32api-${lib.versions.majorMinor version}/w32api-${version}-mingw32-src.tar.lzma";
|
||||
sha256 = "09rhnl6zikmdyb960im55jck0rdy5z9nlg3akx68ixn7khf3j8wb";
|
||||
};
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.windows;
|
||||
};
|
||||
|
||||
dontStrip = true;
|
||||
}
|
||||
38
pkgs/os-specific/windows/wxMSW-2.8/default.nix
Normal file
38
pkgs/os-specific/windows/wxMSW-2.8/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchurl, compat24 ? false, compat26 ? true, unicode ? true }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "wxMSW";
|
||||
version = "2.8.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/wxwindows/wxWidgets-${version}.tar.gz";
|
||||
sha256 = "0icxd21g18d42n1ygshkpw0jnflm03iqki6r623pb5hhd7fm2ksj";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
(if compat24 then "--enable-compat24" else "--disable-compat24")
|
||||
(if compat26 then "--enable-compat26" else "--disable-compat26")
|
||||
"--disable-precomp-headers"
|
||||
(if unicode then "--enable-unicode" else "")
|
||||
"--with-opengl"
|
||||
];
|
||||
|
||||
preConfigure = "
|
||||
substituteInPlace configure --replace /usr /no-such-path
|
||||
";
|
||||
|
||||
postBuild = "(cd contrib/src && make)";
|
||||
|
||||
postInstall = "
|
||||
(cd contrib/src && make install)
|
||||
(cd $out/include && ln -s wx-*/* .)
|
||||
";
|
||||
|
||||
passthru = { inherit compat24 compat26 unicode; };
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.windows;
|
||||
|
||||
broken = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue