2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchurl
|
2022-01-03 16:56:52 +00:00
|
|
|
, fetchFromGitHub
|
2020-09-25 04:45:31 +00:00
|
|
|
, 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.ansi_up = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "https://raw.githubusercontent.com/drudru/ansi_up/v4.0.4/ansi_up.js";
|
|
|
|
sha256 = "1dx8wn38ds8d01kkih26fx1yrisg3kpz61qynjr4zil03ap0hrlr";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
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";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.2";
|
2022-05-18 14:49:53 +00:00
|
|
|
outputs = [ "out" "doc" ];
|
2022-01-03 16:56:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ohwgiles";
|
|
|
|
repo = "laminar";
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-PLnfiWpelgKhs4FNry60sm6/QdhYs76FnZ/ZcRmb4Ok=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
patches = [ ./patches/no-network.patch ];
|
2022-11-04 12:27:35 +00:00
|
|
|
|
|
|
|
# We need both binary from "capnproto" and library files.
|
|
|
|
nativeBuildInputs = [ cmake pandoc capnproto ];
|
2020-09-25 04:45:31 +00:00
|
|
|
buildInputs = [ capnproto sqlite boost zlib rapidjson ];
|
2022-11-04 12:27:35 +00:00
|
|
|
cmakeFlags = [ "-DLAMINAR_VERSION=${version}" ];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
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
|
|
|
|
'';
|
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
|
|
|
};
|
|
|
|
}
|