Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 59 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 ant, 6 jdk, 7 makeWrapper, 8 stripJavaArchivesHook, 9}: 10 11stdenv.mkDerivation (finalAttrs: { 12 pname = "jdepend"; 13 version = "2.10"; 14 15 src = fetchFromGitHub { 16 owner = "clarkware"; 17 repo = "jdepend"; 18 rev = finalAttrs.version; 19 hash = "sha256-0/xGgAaJ7TTUHxShJbbcPzTODk4lDn+FOn5St5McrtM="; 20 }; 21 22 nativeBuildInputs = [ 23 ant 24 jdk 25 makeWrapper 26 stripJavaArchivesHook 27 ]; 28 29 buildPhase = '' 30 runHook preBuild 31 ant jar 32 runHook postBuild 33 ''; 34 35 installPhase = '' 36 runHook preInstall 37 38 install -Dm644 dist/jdepend-*.jar -t $out/share/jdepend 39 40 makeWrapper ${jdk.jre}/bin/java $out/bin/jdepend \ 41 --add-flags "-classpath $out/share/jdepend/jdepend-*.jar" 42 43 for type in "swingui" "textui" "xmlui"; do 44 makeWrapper $out/bin/jdepend $out/bin/jdepend-$type \ 45 --add-flags "jdepend.$type.JDepend" 46 done 47 48 runHook postInstall 49 ''; 50 51 meta = with lib; { 52 changelog = "https://github.com/clarkware/jdepend/blob/${finalAttrs.src.rev}/CHANGELOG.md"; 53 description = "Traverses Java class file directories and generates design quality metrics for each Java package"; 54 homepage = "http://www.clarkware.com/software/JDepend.html"; 55 license = licenses.bsd3; 56 maintainers = with maintainers; [ pSub ]; 57 platforms = platforms.linux; 58 }; 59})