Files
nixpkgs/pkgs/by-name/fr/freerouting/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

82 lines
1.9 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
makeBinaryWrapper,
makeDesktopItem,
jdk,
gradle,
copyDesktopItems,
jre,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "freerouting";
version = "2.1.0";
src = fetchFromGitHub {
owner = "freerouting";
repo = "freerouting";
tag = "v${finalAttrs.version}";
hash = "sha256-K4fwbvSPuKAAnIcTDBSAI1/6HuCB7c9rCGTJcyAj5dQ=";
};
gradleBuildTask = "executableJar";
nativeBuildInputs = [
makeBinaryWrapper
jdk
gradle
copyDesktopItems
];
mitmCache = gradle.fetchDeps {
inherit (finalAttrs) pname;
data = ./deps.json;
};
__darwinAllowLocalNetworking = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/freerouting}
cp build/libs/freerouting-executable.jar $out/share/freerouting
makeWrapper ${lib.getExe jre} $out/bin/freerouting \
--add-flags "-jar $out/share/freerouting/freerouting-executable.jar"
install -Dm644 ${finalAttrs.src}/design/icon/freerouting_icon_256x256_v1.png \
$out/share/icons/hicolor/256x256/apps/freerouting.png
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = finalAttrs.pname;
exec = "freerouting";
icon = "freerouting";
desktopName = "Freerouting";
comment = finalAttrs.meta.description;
categories = [
"Electricity"
"Engineering"
"Graphics"
];
})
];
meta = {
description = "Advanced PCB auto-router";
homepage = "https://www.freerouting.org";
changelog = "https://github.com/freerouting/freerouting/releases/tag/v${finalAttrs.version}";
longDescription = ''
Freerouting is an advanced autorouter for all PCB programs that support
the standard Specctra or Electra DSN interface. '';
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ srounce ];
platforms = with lib.platforms; linux ++ darwin;
mainProgram = "freerouting";
};
})