nixpkgs/pkgs/by-name/st/stegsolve/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

61 lines
1.5 KiB
Nix

{ 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 = "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;
mainProgram = "stegsolve";
};
})