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
7
pkgs/development/interpreters/lfe/1.2.nix
Normal file
7
pkgs/development/interpreters/lfe/1.2.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ mkDerivation }:
|
||||
|
||||
mkDerivation {
|
||||
version = "1.2.1";
|
||||
sha256 = "0j5gjlsk92y14kxgvd80q9vwyhmjkphpzadcswyjxikgahwg1avz";
|
||||
maximumOTPVersion = "19";
|
||||
}
|
||||
43
pkgs/development/interpreters/lfe/1.3.nix
Normal file
43
pkgs/development/interpreters/lfe/1.3.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ fetchpatch, mkDerivation }:
|
||||
|
||||
let
|
||||
_fetchpatch =
|
||||
{ rev, sha256 }:
|
||||
fetchpatch {
|
||||
url = "https://github.com/rvirding/lfe/commit/${rev}.patch";
|
||||
inherit sha256;
|
||||
};
|
||||
fetchPatches = map _fetchpatch;
|
||||
in
|
||||
|
||||
mkDerivation {
|
||||
version = "1.3";
|
||||
sha256 = "0pgwi0h0d34353m39jin8dxw4yykgfcg90k6pc4qkjyrg40hh4l6";
|
||||
maximumOTPVersion = "21";
|
||||
patches = fetchPatches [
|
||||
{
|
||||
rev = "b457e5d521bb35008e6049fab31b4073cc10d583";
|
||||
sha256 = "1zrq1b3291xhb0jsirgb5s8hacq5xvz7xidsp29aqcnpazdvivdc";
|
||||
}
|
||||
{
|
||||
rev = "5fe9f37741b7d53bd43109fd3435e1437f124a0d";
|
||||
sha256 = "1anqlcbih52lc0wynf58r67w1jhn264lz49rczwgh19pqg92dvqf";
|
||||
}
|
||||
{
|
||||
rev = "b8f3e06511cb6805cf3a904c1589b27f33f3958d";
|
||||
sha256 = "1zqafc0asm9m6cq7r0brvfawv69fqggy1phif3zknjmpicf25pqf";
|
||||
}
|
||||
{
|
||||
rev = "40c239a608460e55563edb68c1b6faca57518b54";
|
||||
sha256 = "03av5115jwyammw337xzy50l6api5h0wbwwda5vzw0w10zwb2z8y";
|
||||
}
|
||||
{
|
||||
rev = "5faa7106419263689bfc0bc08a7451ccb1fba718";
|
||||
sha256 = "0ml5yh5b3rn4ympks4bpx409hkra0i79zvq80azk0kmbjd869fxp";
|
||||
}
|
||||
{
|
||||
rev = "9ff978693babcfd043d741b5c6940920b8315892";
|
||||
sha256 = "04968dmp527wbkdv7dqpaj3nsyjls93whc1b5hx73b39dvl3n3y1";
|
||||
}
|
||||
];
|
||||
}
|
||||
13
pkgs/development/interpreters/lfe/dedup-ebins.patch
Normal file
13
pkgs/development/interpreters/lfe/dedup-ebins.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index 59f2c06..5ee8f6e 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -60,7 +60,7 @@ ESRCS = $(notdir $(wildcard $(SRCDIR)/*.erl))
|
||||
XSRCS = $(notdir $(wildcard $(SRCDIR)/*.xrl))
|
||||
YSRCS = $(notdir $(wildcard $(SRCDIR)/*.yrl))
|
||||
LSRCS = $(notdir $(wildcard $(LSRCDIR)/*.lfe))
|
||||
-EBINS = $(ESRCS:.erl=.beam) $(XSRCS:.xrl=.beam) $(YSRCS:.yrl=.beam)
|
||||
+EBINS = $(sort $(ESRCS:.erl=.beam) $(XSRCS:.xrl=.beam) $(YSRCS:.yrl=.beam))
|
||||
LBINS = $(LSRCS:.lfe=.beam)
|
||||
|
||||
CSRCS = $(notdir $(wildcard $(CSRCDIR)/*.c))
|
||||
29
pkgs/development/interpreters/lfe/fix-rebar-config.patch
Normal file
29
pkgs/development/interpreters/lfe/fix-rebar-config.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
diff --git a/rebar.config b/rebar.config
|
||||
index 1d5a68e..a86ee39 100644
|
||||
--- a/rebar.config
|
||||
+++ b/rebar.config
|
||||
@@ -2,20 +2,20 @@
|
||||
|
||||
{erl_opts, [debug_info]}.
|
||||
|
||||
-{profiles, [{test, [{deps, [proper]}]}]}.
|
||||
+%%{profiles, [{test, [{deps, [proper]}]}]}.
|
||||
|
||||
{pre_hooks, [{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", ct,
|
||||
"bin/lfe bin/lfec"
|
||||
- " -o $REBAR_DEPS_DIR/lfe/test"
|
||||
+ " -o test"
|
||||
" test/*_SUITE.lfe"},
|
||||
{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", eunit,
|
||||
"bin/lfe bin/lfec"
|
||||
- " -o $REBAR_DEPS_DIR/lfe/ebin"
|
||||
+ " -o ebin"
|
||||
" test/clj-tests.lfe"},
|
||||
%% TODO: Test this on a win32 box
|
||||
%% {"win32", ct,
|
||||
%% "bin/lfe bin/lfec -o $REBAR_DEPS_DIR/lfe/test test/*_SUITE.lfe"}
|
||||
{"(linux|darwin|solaris|freebsd|netbsd|openbsd)", app_compile,
|
||||
- "bin/lfe bin/lfec -o $REBAR_DEPS_DIR/lfe/ebin src/*.lfe"}
|
||||
+ "bin/lfe bin/lfec -o ebin src/*.lfe"}
|
||||
%% TODO: equivalent win32 hook
|
||||
]}.
|
||||
93
pkgs/development/interpreters/lfe/generic-builder.nix
Normal file
93
pkgs/development/interpreters/lfe/generic-builder.nix
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
{ lib, fetchFromGitHub, erlang, makeWrapper, coreutils, bash, buildRebar3, buildHex }:
|
||||
|
||||
{ baseName ? "lfe"
|
||||
, version
|
||||
, maximumOTPVersion
|
||||
, sha256 ? null
|
||||
, rev ? version
|
||||
, src ? fetchFromGitHub { inherit rev sha256; owner = "rvirding"; repo = "lfe"; }
|
||||
, patches ? []
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
assertMsg makeBinPath optionalString
|
||||
getVersion versionAtLeast versionOlder versions;
|
||||
|
||||
mainVersion = versions.major (getVersion erlang);
|
||||
|
||||
proper = buildHex {
|
||||
name = "proper";
|
||||
version = "1.1.1-beta";
|
||||
|
||||
sha256 = "0hnkhs761yjynw9382w8wm4j3x0r7lllzavaq2kh9n7qy3zc1rdx";
|
||||
|
||||
configurePhase = ''
|
||||
${erlang}/bin/escript write_compile_flags include/compile_flags.hrl
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
assert (assertMsg (versionAtLeast maximumOTPVersion mainVersion)) ''
|
||||
LFE ${version} is supported on OTP <=${maximumOTPVersion}, not ${mainVersion}.
|
||||
'';
|
||||
|
||||
buildRebar3 {
|
||||
name = baseName;
|
||||
|
||||
inherit src version;
|
||||
|
||||
buildInputs = [ erlang makeWrapper ];
|
||||
beamDeps = [ proper ];
|
||||
patches = [ ./fix-rebar-config.patch ./dedup-ebins.patch ] ++ patches;
|
||||
doCheck = true;
|
||||
checkTarget = "travis";
|
||||
|
||||
makeFlags = [ "-e" "MANDB=''" "PREFIX=$$out"];
|
||||
|
||||
# These installPhase tricks are based on Elixir's Makefile.
|
||||
# TODO: Make, upload, and apply a patch.
|
||||
installPhase = optionalString (versionOlder version "1.3") ''
|
||||
local libdir=$out/lib/lfe
|
||||
local ebindir=$libdir/ebin
|
||||
local bindir=$libdir/bin
|
||||
|
||||
rm -Rf $ebindir
|
||||
install -m755 -d $ebindir
|
||||
install -m644 _build/default/lib/lfe/ebin/* $ebindir
|
||||
|
||||
install -m755 -d $bindir
|
||||
|
||||
for bin in bin/lfe{,c,doc,script}; do install -m755 $bin $bindir; done
|
||||
|
||||
install -m755 -d $out/bin
|
||||
for file in $bindir/*; do ln -sf $file $out/bin/; done
|
||||
'';
|
||||
|
||||
# Thanks again, Elixir.
|
||||
postFixup = ''
|
||||
# LFE binaries are shell scripts which run erl and lfe.
|
||||
# Add some stuff to PATH so the scripts can run without problems.
|
||||
for f in $out/bin/*; do
|
||||
wrapProgram $f \
|
||||
--prefix PATH ":" "${makeBinPath [ erlang coreutils bash ]}:$out/bin"
|
||||
substituteInPlace $f --replace "/usr/bin/env" "${coreutils}/bin/env"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "The best of Erlang and of Lisp; at the same time!";
|
||||
longDescription = ''
|
||||
LFE, Lisp Flavoured Erlang, is a lisp syntax front-end to the Erlang
|
||||
compiler. Code produced with it is compatible with "normal" Erlang
|
||||
code. An LFE evaluator and shell is also included.
|
||||
'';
|
||||
|
||||
homepage = "https://lfe.io";
|
||||
downloadPage = "https://github.com/rvirding/lfe/releases";
|
||||
|
||||
license = licenses.asl20;
|
||||
maintainers = teams.beam.members;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue