Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 makeWrapper, 6 jre, 7}: 8 9let 10 version = "2021.2.1"; 11 majorVersion = builtins.substring 0 6 version; 12in 13 14stdenv.mkDerivation rec { 15 pname = "flexibee"; 16 inherit version; 17 18 src = fetchurl { 19 url = "http://download.flexibee.eu/download/${majorVersion}/${version}/${pname}-${version}.tar.gz"; 20 sha256 = "sha256-WorRyfjWucV8UhAjvuW+22CRzPcz5tjXF7Has4wrLMI="; 21 }; 22 23 nativeBuildInputs = [ makeWrapper ]; 24 25 prePatch = '' 26 substituteInPlace usr/sbin/flexibee-server \ 27 --replace "/usr/share/flexibee" $out \ 28 --replace "/var/run" "/run" 29 ''; 30 31 installPhase = '' 32 runHook preInstall 33 cp -R usr/share/flexibee/ $out/ 34 install -Dm755 usr/bin/flexibee $out/bin/flexibee 35 install -Dm755 usr/sbin/flexibee-server $out/bin/flexibee-server 36 wrapProgram $out/bin/flexibee --set JAVA_HOME "${jre}" 37 wrapProgram $out/bin/flexibee-server --set JAVA_HOME "${jre}" 38 runHook postInstall 39 ''; 40 41 meta = with lib; { 42 description = "Client for an accouting economic system"; 43 homepage = "https://www.flexibee.eu/"; 44 license = licenses.unfree; 45 maintainers = [ maintainers.mmahut ]; 46 platforms = [ "x86_64-linux" ]; 47 }; 48}