ce641f4048
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
59 lines
1.7 KiB
Nix
59 lines
1.7 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchurl
|
|
, 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.1";
|
|
src = fetchurl {
|
|
url = "https://github.com/ohwgiles/laminar/archive/${version}.tar.gz";
|
|
sha256 = "1lzfmfjygmbdr2n1q49kwwffw8frz5y6iczhdz5skwmzwg0chbsf";
|
|
};
|
|
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 ];
|
|
};
|
|
}
|