nixpkgs/pkgs/applications/misc/projectlibre/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

80 lines
1.8 KiB
Nix
Raw Normal View History

2024-04-25 12:05:46 +00:00
{
lib,
stdenv,
fetchgit,
ant,
jdk,
stripJavaArchivesHook,
makeWrapper,
jre,
coreutils,
which,
2024-03-11 12:21:00 +00:00
}:
2024-04-25 12:05:46 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "projectlibre";
2024-04-25 12:05:46 +00:00
version = "1.9.3";
src = fetchgit {
url = "https://git.code.sf.net/p/projectlibre/code";
2024-04-25 12:05:46 +00:00
rev = "20814e88dc83694f9fc6780c2550ca5c8a87aa16"; # version 1.9.3 was not tagged
hash = "sha256-yXgYyy3jWxYMXKsNCRWdO78gYRmjKpO9U5WWU6PtwMU=";
};
2024-03-11 12:21:00 +00:00
nativeBuildInputs = [
ant
jdk
2024-03-11 21:09:33 +00:00
stripJavaArchivesHook
2024-03-11 12:21:00 +00:00
makeWrapper
];
2024-04-25 12:05:46 +00:00
runtimeDeps = [
jre
coreutils
which
];
env.JAVA_TOOL_OPTIONS = "-Dfile.encoding=UTF8";
buildPhase = ''
2024-03-11 12:21:00 +00:00
runHook preBuild
2024-04-25 12:05:46 +00:00
ant -f projectlibre_build/build.xml
2024-03-11 12:21:00 +00:00
runHook postBuild
'';
installPhase = ''
2024-03-11 12:21:00 +00:00
runHook preInstall
mkdir -p $out/share/{projectlibre/samples,doc/projectlibre}
2024-04-25 12:05:46 +00:00
pushd projectlibre_build
2024-03-11 12:21:00 +00:00
cp -R dist/* $out/share/projectlibre
cp -R license $out/share/doc/projectlibre
cp -R resources/samples/* $out/share/projectlibre/samples
install -Dm644 resources/projectlibre.desktop -t $out/share/applications
install -Dm644 resources/projectlibre.png -t $out/share/pixmaps
install -Dm755 resources/projectlibre -t $out/bin
popd
substituteInPlace $out/bin/projectlibre \
--replace-fail "/usr/share/projectlibre" "$out/share/projectlibre"
wrapProgram $out/bin/projectlibre \
2024-04-25 12:05:46 +00:00
--prefix PATH : ${lib.makeBinPath finalAttrs.runtimeDeps}
2024-03-11 12:21:00 +00:00
runHook postInstall
'';
2024-03-11 12:21:00 +00:00
meta = {
2018-03-18 20:58:13 +00:00
description = "Project-Management Software similar to MS-Project";
2024-03-11 12:21:00 +00:00
homepage = "https://www.projectlibre.com/";
license = lib.licenses.cpal10;
mainProgram = "projectlibre";
2024-04-25 12:05:46 +00:00
maintainers = with lib.maintainers; [
Mogria
tomasajt
];
2024-03-11 12:21:00 +00:00
platforms = jre.meta.platforms;
};
2024-04-25 12:05:46 +00:00
})