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
|
|
@ -0,0 +1,63 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, capnproto
|
||||
, sqlite
|
||||
, boost
|
||||
, zlib
|
||||
, rapidjson
|
||||
, pandoc
|
||||
}:
|
||||
let
|
||||
js.vue = fetchurl {
|
||||
url = "https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/vue.min.js";
|
||||
sha256 = "1hm5kci2g6n5ikrvp1kpkkdzimjgylv1xicg2vnkbvd9rb56qa99";
|
||||
};
|
||||
js.ansi_up = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/drudru/ansi_up/v4.0.4/ansi_up.js";
|
||||
sha256 = "1dx8wn38ds8d01kkih26fx1yrisg3kpz61qynjr4zil03ap0hrlr";
|
||||
};
|
||||
js.Chart = fetchurl {
|
||||
url = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js";
|
||||
sha256 = "1jh4h12qchsba03dx03mrvs4r8g9qfjn56xm56jqzgqf7r209xq9";
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "laminar";
|
||||
version = "1.2";
|
||||
outputs = [ "out" "doc" ];
|
||||
src = fetchFromGitHub {
|
||||
owner = "ohwgiles";
|
||||
repo = "laminar";
|
||||
rev = version;
|
||||
sha256 = "sha256-PLnfiWpelgKhs4FNry60sm6/QdhYs76FnZ/ZcRmb4Ok=";
|
||||
};
|
||||
patches = [ ./patches/no-network.patch ];
|
||||
nativeBuildInputs = [ cmake pandoc ];
|
||||
buildInputs = [ capnproto sqlite boost zlib rapidjson ];
|
||||
preBuild = ''
|
||||
mkdir -p js css
|
||||
cp ${js.vue} js/vue.min.js
|
||||
cp ${js.ansi_up} js/ansi_up.js
|
||||
cp ${js.Chart} js/Chart.min.js
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mv $out/usr/share/* $out/share/
|
||||
rmdir $out/usr/share $out/usr
|
||||
|
||||
mkdir -p $out/share/doc/laminar
|
||||
pandoc -s ../UserManual.md -o $out/share/doc/laminar/UserManual.html
|
||||
rm -rf $out/lib # remove upstream systemd units
|
||||
rm -rf $out/etc # remove upstream config file
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Lightweight and modular continuous integration service";
|
||||
homepage = "https://laminar.ohwg.net";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ kaction maralorn ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
Build system that downloads stuff from network is bad. Build system that
|
||||
does so unconditionally is twice as bad.
|
||||
|
||||
Required files are downloaded as separate fixed-output derivations and
|
||||
put into correct location before build phase starts.
|
||||
|
||||
--- laminar-1.1/CMakeLists.txt
|
||||
+++ laminar-1.1-new/CMakeLists.txt
|
||||
@@ -82,13 +82,6 @@
|
||||
COMMAND sh -c '( echo -n "\\#define INDEX_HTML_UNCOMPRESSED_SIZE " && wc -c < "${CMAKE_SOURCE_DIR}/src/resources/index.html" ) > index_html_size.h'
|
||||
DEPENDS src/resources/index.html)
|
||||
|
||||
-# Download 3rd-party frontend JS libs...
|
||||
-file(DOWNLOAD https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/vue.min.js
|
||||
- js/vue.min.js EXPECTED_MD5 fb192338844efe86ec759a40152fcb8e)
|
||||
-file(DOWNLOAD https://raw.githubusercontent.com/drudru/ansi_up/v4.0.4/ansi_up.js
|
||||
- js/ansi_up.js EXPECTED_MD5 b31968e1a8fed0fa82305e978161f7f5)
|
||||
-file(DOWNLOAD https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js
|
||||
- js/Chart.min.js EXPECTED_MD5 f6c8efa65711e0cbbc99ba72997ecd0e)
|
||||
# ...and compile them
|
||||
generate_compressed_bins(${CMAKE_BINARY_DIR} js/vue.min.js
|
||||
js/ansi_up.js js/Chart.min.js)
|
||||
@@ -139,12 +132,12 @@
|
||||
target_link_libraries(laminar-tests ${GTEST_LIBRARY} capnp-rpc capnp kj-http kj-async kj pthread sqlite3 z)
|
||||
endif()
|
||||
|
||||
-set(SYSTEMD_UNITDIR /lib/systemd/system CACHE PATH "Path to systemd unit files")
|
||||
-set(BASH_COMPLETIONS_DIR /usr/share/bash-completion/completions CACHE PATH "Path to bash completions directory")
|
||||
-set(ZSH_COMPLETIONS_DIR /usr/share/zsh/site-functions CACHE PATH "Path to zsh completions directory")
|
||||
+set(SYSTEMD_UNITDIR lib/systemd/system CACHE PATH "Path to systemd unit files")
|
||||
+set(BASH_COMPLETIONS_DIR usr/share/bash-completion/completions CACHE PATH "Path to bash completions directory")
|
||||
+set(ZSH_COMPLETIONS_DIR usr/share/zsh/site-functions CACHE PATH "Path to zsh completions directory")
|
||||
install(TARGETS laminard RUNTIME DESTINATION sbin)
|
||||
install(TARGETS laminarc RUNTIME DESTINATION bin)
|
||||
-install(FILES etc/laminar.conf DESTINATION /etc)
|
||||
+install(FILES etc/laminar.conf DESTINATION etc)
|
||||
install(FILES etc/laminarc-completion.bash DESTINATION ${BASH_COMPLETIONS_DIR} RENAME laminarc)
|
||||
install(FILES etc/laminarc-completion.zsh DESTINATION ${ZSH_COMPLETIONS_DIR} RENAME _laminarc)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue