feat: learningml

This commit is contained in:
2026-03-21 20:50:14 +01:00
parent a9568196bf
commit 4acb66cff3
5 changed files with 130 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
let
username = "usuario";
learningml-desktop = pkgs.callPackage ./pkgs/learningml-desktop.nix { };
in
{
imports =
@@ -103,6 +104,7 @@ in
# using appimage because it seems to be one major version up
cura-appimage
arduino-ide
learningml-desktop
# python stuff goes here
(python314.withPackages (ps: with ps; [

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1773821835,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@@ -0,0 +1,97 @@
# this file has been ai generated
{ lib, stdenv, fetchurl, autoPatchelfHook, makeWrapper, xdg-utils, alsa-lib
, atk, at-spi2-atk, cairo, cups, dbus, expat, fontconfig, freetype
, gdk-pixbuf, glib, gtk3, libdrm, libnotify, libsecret, libuuid, mesa, nspr
, nss, pango, systemd, xorg }:
stdenv.mkDerivation (finalAttrs: {
pname = "learningml-desktop";
version = "1.4.3";
src = fetchurl {
url = "https://github.com/LearningML-Education/learningml-desktop-releases/releases/download/${finalAttrs.version}/learningml-desktop_${finalAttrs.version}_amd64.deb";
hash = "sha256-08r5l5daq6nn3xqdaxfqvhs55dv398x43pd1nmblixd1pipgw767";
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
buildInputs = [
alsa-lib
atk
at-spi2-atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gtk3
libdrm
libnotify
libsecret
libuuid
mesa
nspr
nss
pango
systemd
xdg-utils
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
xorg.libXrender
xorg.libXScrnSaver
xorg.libXtst
xorg.libxcb
];
sourceRoot = ".";
unpackPhase = ''
runHook preUnpack
ar x "$src"
tar xf data.tar.xz
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/libexec/learningml-desktop $out/share
cp -r opt/LearningMLDesktop/* $out/libexec/learningml-desktop/
cp -r usr/share/icons $out/share/
install -Dm644 \
usr/share/applications/learningml-desktop.desktop \
$out/share/applications/learningml-desktop.desktop
makeWrapper \
$out/libexec/learningml-desktop/learningml-desktop \
$out/bin/learningml-desktop \
--add-flags "--no-sandbox"
substituteInPlace $out/share/applications/learningml-desktop.desktop \
--replace-fail "/opt/LearningMLDesktop/learningml-desktop" "$out/bin/learningml-desktop"
runHook postInstall
'';
meta = with lib; {
description = "Desktop version of LearningML";
homepage = "https://github.com/LearningML-Education/learningml-desktop-releases";
license = licenses.cc0;
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "learningml-desktop";
};
})

3
readme.md Normal file
View File

@@ -0,0 +1,3 @@
# configuración lab ordenadores [REDACTED]
## Por qué NixOS?

View File

@@ -8,4 +8,4 @@ if [ $? -ne 0 ]; then
exit 1
fi
nixos-rebuild switch --flake .#
nixos-rebuild switch --flake path:.#nixos