Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 79 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchgit, 5 6 ant, 7 jdk, 8 makeWrapper, 9 stripJavaArchivesHook, 10 11 coreutils, 12 jre, 13 which, 14}: 15 16stdenv.mkDerivation (finalAttrs: { 17 pname = "projectlibre"; 18 version = "1.9.8"; 19 20 src = fetchgit { 21 url = "https://git.code.sf.net/p/projectlibre/code"; 22 rev = "0530be227f4a10c5545cce8d3db20ac5a4d76a66"; # version 1.9.8 was not tagged 23 hash = "sha256-eGoPtHy1XfPLnJXNDOMcek4spNKkNyZdby0IsZFZfME="; 24 }; 25 26 nativeBuildInputs = [ 27 ant 28 jdk 29 makeWrapper 30 stripJavaArchivesHook 31 ]; 32 33 runtimeDeps = [ 34 jre 35 coreutils 36 which 37 ]; 38 39 buildPhase = '' 40 runHook preBuild 41 ant -f projectlibre_build/build.xml 42 runHook postBuild 43 ''; 44 45 installPhase = '' 46 runHook preInstall 47 48 mkdir -p $out/share/{projectlibre/samples,doc/projectlibre} 49 50 pushd projectlibre_build 51 cp -R dist/* $out/share/projectlibre 52 cp -R license $out/share/doc/projectlibre 53 cp -R resources/samples/* $out/share/projectlibre/samples 54 install -Dm644 resources/projectlibre.desktop -t $out/share/applications 55 install -Dm644 resources/projectlibre.png -t $out/share/pixmaps 56 install -Dm755 resources/projectlibre -t $out/bin 57 popd 58 59 substituteInPlace $out/bin/projectlibre \ 60 --replace-fail "/usr/share/projectlibre" "$out/share/projectlibre" 61 62 wrapProgram $out/bin/projectlibre \ 63 --prefix PATH : ${lib.makeBinPath finalAttrs.runtimeDeps} 64 65 runHook postInstall 66 ''; 67 68 meta = { 69 description = "Project-Management Software similar to MS-Project"; 70 homepage = "https://www.projectlibre.com/"; 71 license = lib.licenses.cpal10; 72 mainProgram = "projectlibre"; 73 maintainers = with lib.maintainers; [ 74 Mogria 75 tomasajt 76 ]; 77 platforms = jre.meta.platforms; 78 }; 79})