nixpkgs/pkgs/applications/science/logic/logisim-evolution/default.nix

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

50 lines
1.4 KiB
Nix
Raw Normal View History

2021-07-25 11:39:49 +02:00
{ lib, stdenv, fetchurl, jre, makeWrapper, copyDesktopItems, makeDesktopItem, unzip }:
stdenv.mkDerivation rec {
pname = "logisim-evolution";
2021-12-07 13:21:37 +01:00
version = "3.7.2";
2021-07-25 11:39:49 +02:00
src = fetchurl {
url = "https://github.com/logisim-evolution/logisim-evolution/releases/download/v${version}/logisim-evolution-${version}-all.jar";
2021-12-07 13:21:37 +01:00
sha256 = "sha256-RI+ioOHj13UAGuPzseAAy3oQBQYkja/ucjj4QMeRZhw=";
2021-07-25 11:39:49 +02:00
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper copyDesktopItems unzip ];
desktopItems = [
(makeDesktopItem {
name = pname;
desktopName = "Logisim-evolution";
exec = "logisim-evolution";
icon = "logisim-evolution";
comment = meta.description;
categories = [ "Education" ];
2021-07-25 11:39:49 +02:00
})
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
makeWrapper ${jre}/bin/java $out/bin/logisim-evolution --add-flags "-jar $src"
2021-11-08 11:23:32 +01:00
# Create icons
unzip $src "resources/logisim/img/*"
for size in 16 32 48 128 256; do
install -D "./resources/logisim/img/logisim-icon-$size.png" "$out/share/icons/hicolor/''${size}x''${size}/apps/logisim-evolution.png"
done
2021-07-25 11:39:49 +02:00
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/logisim-evolution/logisim-evolution";
description = "Digital logic designer and simulator";
2022-02-11 05:45:03 +01:00
maintainers = with maintainers; [ emilytrau ];
2021-07-25 11:39:49 +02:00
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}