From 8553a02ca652d3f7e88f8005e39eb2279b01230a Mon Sep 17 00:00:00 2001 From: voidarc Date: Thu, 12 Mar 2026 19:02:00 +0000 Subject: [PATCH] fixed chataigne flake --- modules/chataigne/flake.lock | 12 ++--- modules/chataigne/flake.nix | 89 ++++++++++++++++++++++++------------ 2 files changed, 67 insertions(+), 34 deletions(-) diff --git a/modules/chataigne/flake.lock b/modules/chataigne/flake.lock index a53683d..7c17385 100644 --- a/modules/chataigne/flake.lock +++ b/modules/chataigne/flake.lock @@ -2,16 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1773122722, - "narHash": "sha256-FIqHByVqxCprNjor1NqF80F2QQoiiyqanNNefdlvOg4=", - "owner": "NixOS", + "lastModified": 1773222311, + "narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "62dc67aa6a52b4364dd75994ec00b51fbf474e50", + "rev": "0590cd39f728e129122770c029970378a79d076a", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", + "owner": "nixos", + "ref": "nixos-25.11", "repo": "nixpkgs", "type": "github" } diff --git a/modules/chataigne/flake.nix b/modules/chataigne/flake.nix index 137cdcd..ecb8b72 100644 --- a/modules/chataigne/flake.nix +++ b/modules/chataigne/flake.nix @@ -1,49 +1,82 @@ { - description = "A flake to run a specific AppImage with custom dependencies"; + description = "Local wrapper for Chataigne AppImage"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; }; outputs = { self, nixpkgs }: let - system = "x86_64-linux"; # Adjust if you're on a different architecture + system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; - # Define your AppImage wrapper here - myApp = pkgs.appimageTools.wrapType2 { - pname = "my-appimage-app"; - version = "1.0.0"; + # The libraries you requested + deps = with pkgs; [ + curlFull + gnutls + libxrandr + alsa-lib + freetype + avahi + libglvnd + curl + SDL2 + hidapi + libpulseaudio + lz4 + openssl + libcap + libxcrypt + libgcrypt + libbsd + zlib + glib + ]; - # The source can be a local file or a URL + # Wrap the local AppImage file + chataigne-bin = pkgs.appimageTools.wrapType2 { + pname = "chataigne"; + version = "1.10.3"; + # This points to the file in the same directory as flake.nix src = ./Chataigne-linux-x64-1.10.3.AppImage; + extraPkgs = pkgs: deps; + }; - # Add specific dependencies the AppImage is missing - extraPkgs = - pkgs: with pkgs; [ - lz4 - libbsd - (curlWithGnuTls.override { gnutlsSupport = true; }) - gnutls - libgnurl - openssl - ]; + # Create the Desktop Entry + chataigne-desktop = pkgs.makeDesktopItem { + name = "chataigne"; + exec = "chataigne"; + icon = "chataigne"; + comment = "Modular machine for art and technology"; + desktopName = "Chataigne"; + categories = [ + "AudioVideo" + "Development" + ]; }; in { - # This allows you to run it via 'nix run' - apps.${system}.default = { - type = "app"; - program = "${myApp}/bin/my-appimage-app"; - }; + # packages.${system}.default = chataigne-bin; - # This allows you to add it to your shell via 'nix develop' devShells.${system}.default = pkgs.mkShell { - buildInputs = [ myApp ]; - }; + # Packages you want available in your shell + buildInputs = [ + chataigne-bin + ]; - # The package itself - packages.${system}.default = myApp; + # Environmental variables or shell hooks + shellHook = '' + echo "something" + ''; + }; + # This allows you to run 'nix run' or install it via system config + packages.${system}.default = pkgs.symlinkJoin { + name = "chataigne"; + paths = [ + chataigne-bin + chataigne-desktop + ]; + }; }; }