2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, capnproto
|
|
|
|
, sqlite
|
|
|
|
, boost
|
|
|
|
, zlib
|
|
|
|
, rapidjson
|
|
|
|
, pandoc
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
js.vue = fetchurl {
|
2021-02-16 17:04:54 +00:00
|
|
|
url = "https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/vue.min.js";
|
|
|
|
sha256 = "1hm5kci2g6n5ikrvp1kpkkdzimjgylv1xicg2vnkbvd9rb56qa99";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
js.vue-router = fetchurl {
|
|
|
|
url =
|
2021-02-16 17:04:54 +00:00
|
|
|
"https://cdnjs.cloudflare.com/ajax/libs/vue-router/3.4.8/vue-router.min.js";
|
|
|
|
sha256 = "0418waib896ywwxkxliip75zp94k3s9wld51afrqrcq70axld0c9";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
js.ansi_up = fetchurl {
|
|
|
|
url = "https://raw.githubusercontent.com/drudru/ansi_up/v1.3.0/ansi_up.js";
|
|
|
|
sha256 = "1993dywxqi2ylnxybwk7m0s0bg2bq7kfllpyr0s8ck6chd0p8i6r";
|
|
|
|
};
|
|
|
|
js.Chart = fetchurl {
|
|
|
|
url = "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.min.js";
|
|
|
|
sha256 = "1jh4h12qchsba03dx03mrvs4r8g9qfjn56xm56jqzgqf7r209xq9";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2021-04-08 16:26:57 +00:00
|
|
|
pname = "laminar";
|
2021-02-16 17:04:54 +00:00
|
|
|
version = "1.0";
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ohwgiles/laminar/archive/${version}.tar.gz";
|
2021-02-16 17:04:54 +00:00
|
|
|
sha256 = "11m6h3rdmj2rsmsryy7r40gqccj4gg1cnqwy6blscs87gx4s423g";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
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.vue-router} js/vue-router.min.js
|
|
|
|
cp ${js.ansi_up} js/ansi_up.js
|
|
|
|
cp ${js.Chart} js/Chart.min.js
|
|
|
|
'';
|
2021-02-16 17:04:54 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
postInstall = ''
|
2021-02-16 17:04:54 +00:00
|
|
|
mv $out/usr/share/* $out/share/
|
|
|
|
rmdir $out/usr/share $out/usr
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
mkdir -p $out/share/doc/laminar
|
|
|
|
pandoc -s ../UserManual.md -o $out/share/doc/laminar/UserManual.html
|
2021-02-16 17:04:54 +00:00
|
|
|
rm -rf $out/lib # remove upstream systemd units
|
|
|
|
rm -rf $out/etc # remove upstream config file
|
|
|
|
'';
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Lightweight and modular continuous integration service";
|
|
|
|
homepage = "https://laminar.ohwg.net";
|
2021-04-22 02:08:21 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-09-25 04:45:31 +00:00
|
|
|
platforms = platforms.linux;
|
2021-02-16 17:04:54 +00:00
|
|
|
maintainers = with maintainers; [ kaction maralorn ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|