4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl, makeWrapper, jre }:
|
|
|
|
let
|
|
version = "2020.2.6";
|
|
majorVersion = builtins.substring 0 6 version;
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "flexibee";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
url = "http://download.flexibee.eu/download/${majorVersion}/${version}/${pname}-${version}.tar.gz";
|
|
sha256 = "0vscz24sabk9xafywnx41rqhq6300ddsw1x95ibc7ghsgbkq80ja";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
prePatch = ''
|
|
substituteInPlace usr/sbin/flexibee-server \
|
|
--replace "/usr/share/flexibee" $out \
|
|
--replace "/var/run" "/run"
|
|
'';
|
|
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
cp -R usr/share/flexibee/ $out/
|
|
install -Dm755 usr/bin/flexibee $out/bin/flexibee
|
|
install -Dm755 usr/sbin/flexibee-server $out/bin/flexibee-server
|
|
wrapProgram $out/bin/flexibee --set JAVA_HOME "${jre}"
|
|
wrapProgram $out/bin/flexibee-server --set JAVA_HOME "${jre}"
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Client for an accouting economic system";
|
|
homepage = "https://www.flexibee.eu/";
|
|
license = licenses.unfree;
|
|
maintainers = [ maintainers.mmahut ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|