Skip to content

Commit

Permalink
lceda: init at v2.2.27.1
Browse files Browse the repository at this point in the history
Signed-off-by: Qiming Chu <[email protected]>
  • Loading branch information
Emin017 committed Dec 22, 2024
1 parent 8ec437d commit 9259f34
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 0 deletions.
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

gtkwave4 = pkgs.callPackage ./pkgs/gtkwave4 {};
xfel = pkgs.callPackage ./pkgs/xfel {};
lceda-pro = pkgs.callPackage ./pkgs/lceda-pro {};
# some-qt5-package = pkgs.libsForQt5.callPackage ./pkgs/some-qt5-package { };
# ...
}
121 changes: 121 additions & 0 deletions pkgs/lceda-pro/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
lib,
stdenv,
fetchurl,
dpkg,
alsa-lib,
gtk3,
nss,
unzip,
glib,
nspr,
dbus,
atk,
cups,
libdrm,
pango,
cairo,
xorg,
atkmm,
libGL,
mesa,
expat,
libxkbcommon,
xcbutilwm,
xcbutilimage,
xcbutilkeysyms,
xcbutilrenderutil,
makeWrapper,
}:
let
source-url = "https://image.lceda.cn/files/lceda-pro-linux-x64-2.2.27.1.zip";
lceda-pro-runtime-xorg = with xorg; [
libX11
libXt
libXext
libSM
libICE
libxshmfence
libXi
libXft
libXcursor
libXfixes
libXScrnSaver
libXcomposite
libXdamage
libXtst
libXrandr
libxcb
];
lceda-pro-runtime = [
dpkg
alsa-lib
gtk3
nss
unzip
glib
nspr
dbus
atk
atkmm
cups
libdrm
pango
cairo
pango
xcbutilwm
xcbutilimage
xcbutilkeysyms
xcbutilrenderutil
libxkbcommon
libGL
mesa
expat
] ++ lceda-pro-runtime-xorg;
in
stdenv.mkDerivation {
pname = "lceda-pro";
version = "2.2.27.1";

src = fetchurl {
url = source-url;
hash = "sha256-ejMfevAjMl9PN+UpJd2/TCF0ZaktQR+PRCgFE3pz59E=";
};

nativeBuildInputs = [ unzip makeWrapper ];

unpackPhase = ''
runHook preUnpack
unzip $src
runHook postUnpack
'';

installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r . $out/opt
chmod +x $out/opt/lceda-pro/lceda-pro
chmod +x $out/opt/lceda-pro/chrome-sandbox
chmod +x $out/opt/lceda-pro/chrome_crashpad_handler
wrapProgram $out/opt/lceda-pro/lceda-pro \
--set LD_LIBRARY_PATH ${lib.makeLibraryPath lceda-pro-runtime}
ln -s $out/opt/lceda-pro/lceda-pro $out/bin/lceda-pro
runHook postInstall
'';

meta = with lib; {
description = "A browser-based, user-friendly, powerful Electronics Design Automation tool";
homepage = "https://lceda.cn/";
license = licenses.unfree;
platforms = [
"x86_64-linux"
];
mainProgram = "lceda-pro";
};
}
19 changes: 19 additions & 0 deletions release.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> { } }:

let
ci = import ./ci.nix { inherit pkgs; };
filterFree = pkg: pkg.meta.license.free or true;
freePkgs = builtins.filter filterFree ci.buildPkgs;

listToJobset = prefix: list: builtins.listToAttrs (
builtins.genList (i:
let
pkg = builtins.elemAt list i;
name = "${prefix}-${pkg.name}";
in { inherit name; value = pkg; }
) (builtins.length list)
);
in
{
release-pkgs = listToJobset "free" freePkgs;
}

0 comments on commit 9259f34

Please sign in to comment.