mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-01-18 09:01:39 +01:00
first try of packaging circuitjs
This commit is contained in:
parent
0921151c6e
commit
98dcbcd724
4 changed files with 77 additions and 4 deletions
|
@ -179,11 +179,11 @@
|
|||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1684305980,
|
||||
"narHash": "sha256-vd4SKXX1KZfSX6n3eoguJw/vQ+sBL8XGdgfxjEgLpKc=",
|
||||
"lastModified": 1684385584,
|
||||
"narHash": "sha256-O7y0gK8OLIDqz+LaHJJyeu09IGiXlZIS3+JgEzGmmJA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e6e389917a8c778be636e67a67ec958f511cc55d",
|
||||
"rev": "48a0fb7aab511df92a17cf239c37f2bd2ec9ae3a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
}@attrs: {
|
||||
packages.x86_64-linux.iso = self.nixosConfigurations.iso.config.system.build.isoImage;
|
||||
packages.x86_64-linux.jmri = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/jmri { };
|
||||
# packages.x86_64-linux.circuitjs = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/circuitjs { };
|
||||
hydraJobs = self.packages;
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
||||
nixosConfigurations = {
|
||||
|
|
72
pkgs/circuitjs/default.nix
Normal file
72
pkgs/circuitjs/default.nix
Normal file
|
@ -0,0 +1,72 @@
|
|||
{ stdenv, fetchurl, makeWrapper, wrapGAppsHook, lib, libX11, libXext, gtk3-x11, dbus, nspr, alsa-lib, glib, expat, gdk-pixbuf, mesa, xorg, nss, cups, ffmpeg, cairo, pango, at-spi2-atk, atk, at-spi2-core, libdrm, ... }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "circuitjs";
|
||||
version = "2.8.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.falstad.com/circuit/offline/circuitjs1-linux64.tgz";
|
||||
hash = "sha256-dyIEuDA7FRwHCok41wcJAr8eqksJSOdChafPPh0Q3zM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
|
||||
|
||||
sourceRoot = ".";
|
||||
dontBuild = true;
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
libPath = lib.makeLibraryPath [
|
||||
libX11
|
||||
libXext
|
||||
alsa-lib
|
||||
xorg.libXi
|
||||
xorg.libXrender
|
||||
xorg.libXfixes
|
||||
xorg.libXtst
|
||||
xorg.libXcomposite
|
||||
xorg.libXcursor
|
||||
xorg.libXrandr
|
||||
xorg.libXdamage
|
||||
xorg.libxcb
|
||||
xorg.libXScrnSaver
|
||||
nss
|
||||
ffmpeg.lib
|
||||
cups
|
||||
pango
|
||||
cairo
|
||||
nspr
|
||||
atk
|
||||
libdrm
|
||||
glib
|
||||
dbus
|
||||
gtk3-x11
|
||||
mesa
|
||||
expat
|
||||
gdk-pixbuf
|
||||
];
|
||||
|
||||
# wrapProgramShell $out/opt/circuitjs1 \
|
||||
# "''${gappsWrapperArgs[@]}" \
|
||||
# --prefix LD_LIBRARY_PATH : ${libPath}:$out/lib \
|
||||
installPhase = ''
|
||||
mkdir -p $out/
|
||||
cp -r circuitjs1 $out/opt
|
||||
mkdir -p $out/lib
|
||||
cp circuitjs1/lib* $out/lib
|
||||
mkdir -p $out/bin
|
||||
ln -sf $out/opt/circuitjs1 $out/bin/circuitjs1
|
||||
|
||||
patchelf \
|
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "${libPath}":$out/lib \
|
||||
$out/bin/circuitjs1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
# inherit homepage;
|
||||
description = "Falstad circuit simulator";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
# license = licenses.unfree;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.therealr5 ];
|
||||
};
|
||||
}
|
|
@ -38,7 +38,7 @@
|
|||
# yubikey and password stuff
|
||||
yubikey-manager
|
||||
yubikey-manager-qt
|
||||
# yubioath-flutter # broken, TODO fix
|
||||
yubioath-flutter
|
||||
bitwarden
|
||||
|
||||
# misc
|
||||
|
|
Loading…
Reference in a new issue