about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/graphics/stegsolve/default.nix
blob: 3f147ab0decabb4bd9ec5a251b5143479611c507 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{ lib
, stdenvNoCC
, fetchurl
, jre
, makeWrapper
, copyDesktopItems
, makeDesktopItem
}:

stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "stegsolve";
  version = "1.3";

  src = fetchurl {
    # No versioned binary is published :(
    url = "https://web.archive.org/web/20230319054116if_/http://www.caesum.com/handbook/Stegsolve.jar";
    sha256 = "0np5zb28sg6yzkp1vic80pm8iiaamvjpbf5dxmi9kwvqcrh4jyq0";
  };

  dontUnpack = true;

  desktopItems = [
    (makeDesktopItem {
      type = "Application";
      name = finalAttrs.pname;
      desktopName = "Stegsolve";
      comment = "A steganographic image analyzer, solver and data extractor for challanges";
      exec = finalAttrs.pname;
      categories = [ "Graphics" ];
    })
  ];

  nativeBuildInputs = [ makeWrapper copyDesktopItems ];

  installPhase = ''
    runHook preInstall

    export JAR=$out/share/java/stegsolve/stegsolve.jar
    install -D $src $JAR
    makeWrapper ${jre}/bin/java $out/bin/stegsolve \
      --add-flags "-jar $JAR"

    runHook postInstall
  '';

  meta = with lib; {
    description = "A steganographic image analyzer, solver and data extractor for challanges";
    homepage = "https://www.wechall.net/forum/show/thread/527/Stegsolve_1.3/";
    sourceProvenance = with sourceTypes; [ binaryBytecode ];
    license = {
      fullName = "Cronos License";
      url = "http://www.caesum.com/legal.php";
      free = false;
      redistributable = true;
    };
    maintainers = with maintainers; [ emilytrau ];
    platforms = platforms.all;
  };
})