mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-27 08:04:14 +00:00
571c71e6f7
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.
68 lines
1.9 KiB
Nix
68 lines
1.9 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, jre
|
|
, makeBinaryWrapper
|
|
, copyDesktopItems
|
|
, makeDesktopItem
|
|
, desktopToDarwinBundle
|
|
, unzip
|
|
}:
|
|
|
|
let
|
|
icon = fetchurl {
|
|
url = "https://github.com/logisim-evolution/logisim-evolution/raw/9e0afa3cd6a8bfa75dab61830822cde83c70bb4b/artwork/logisim-evolution-icon.svg";
|
|
hash = "sha256-DNRimhNFt6jLdjqv7o2cNz38K6XnevxD0rGymym3xBs=";
|
|
};
|
|
in
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "logisim-evolution";
|
|
version = "3.8.0";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/logisim-evolution/logisim-evolution/releases/download/v${finalAttrs.version}/logisim-evolution-${finalAttrs.version}-all.jar";
|
|
hash = "sha256-TFm+fa3CMp0OMhnKBc6cLIWGQbIG/OpOOCG7ea7wbCw=";
|
|
};
|
|
dontUnpack = true;
|
|
|
|
nativeBuildInputs = [
|
|
makeBinaryWrapper
|
|
copyDesktopItems
|
|
unzip
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
desktopToDarwinBundle
|
|
];
|
|
|
|
desktopItems = [
|
|
(makeDesktopItem {
|
|
name = "logisim-evolution";
|
|
desktopName = "Logisim-evolution";
|
|
exec = "logisim-evolution";
|
|
icon = "logisim-evolution";
|
|
comment = finalAttrs.meta.description;
|
|
categories = [ "Education" ];
|
|
})
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin
|
|
makeWrapper ${jre}/bin/java $out/bin/logisim-evolution --add-flags "-jar $src"
|
|
install -Dm444 ${icon} $out/share/icons/hicolor/scalable/apps/logisim-evolution.svg
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/logisim-evolution/logisim-evolution/releases/tag/v${finalAttrs.version}";
|
|
homepage = "https://github.com/logisim-evolution/logisim-evolution";
|
|
description = "Digital logic designer and simulator";
|
|
mainProgram = "logisim-evolution";
|
|
maintainers = with lib.maintainers; [ emilytrau ];
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
license = lib.licenses.gpl3Only;
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|