diff --git a/.gitignore b/.gitignore index 1f8011a..22a3bf8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .session +modules/chataigne/squashfs-root diff --git a/configs/common.nix b/configs/common.nix index e9cf730..44a5a7b 100644 --- a/configs/common.nix +++ b/configs/common.nix @@ -174,7 +174,6 @@ swaynotificationcenter (input { package = "chataigne"; - output = "chataigne"; }) wlogout wpaperd @@ -285,67 +284,11 @@ environment.systemPackages = with pkgs; [ inputs.nvim-wrapped.packages.${stdenv.hostPlatform.system}.default - # (pkgs.symlinkJoin { - # name = "nvim-with-lsp"; - # paths = [ pkgs.neovim ]; - # buildInputs = [ pkgs.makeWrapper ]; - # postBuild = '' - # export TREE_SITTER_LIB_PATH="/run/current-system/sw/lib" - # wrapProgram $out/bin/nvim \ - # --prefix PATH : ${ - # pkgs.lib.makeBinPath [ - # # lsps - # pkgs.lua-language-server - # pkgs.vscode-langservers-extracted - # pkgs.emmet-ls - # pkgs.prettier - # pkgs.black - # pkgs.nixfmt - # pkgs.nil - # pkgs.python313Packages.python-lsp-server - # pkgs.typescript-language-server - # pkgs.tailwindcss-language-server - # pkgs.stylua - # pkgs.nixd - # - # # other shit - # pkgs.lua5_1 - # pkgs.tree-sitter - # pkgs.ripgrep - # pkgs.gcc - # pkgs.gnumake - # pkgs.imagemagick - # pkgs.luajitPackages.magick - # pkgs.ghostscript - # pkgs.luarocks - # (pkgs.texlive.combine { - # inherit (pkgs.texlive) - # scheme-basic - # varwidth - # preview - # mathtools - # amsfonts - # amscdx - # xcolor - # dvisvgm - # dvipng # for preview and export as html - # wrapfig - # standalone - # graphicxbox - # amsmath - # ulem - # hyperref - # capt-of - # ; - # }) - # ] - # } - # ''; - # }) vim unzip python310 # Its python like come on usbutils + curlWithGnuTls # Graphics Drivers mesa @@ -364,6 +307,7 @@ # Other things (from gnome) glib gnutls + liblzf appimage-run libnotify gsettings-desktop-schemas diff --git a/flake.lock b/flake.lock index 73dd1f8..dd8aa4e 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1771610171, - "narHash": "sha256-+DeInuhbm6a6PpHDNUS7pozDouq2+8xSDefoNaZLW0E=", + "lastModified": 1772292445, + "narHash": "sha256-4F1Q7U313TKUDDovCC96m/Za4wZcJ3yqtu4eSrj8lk8=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "7f9eb087703ec4acc6b288d02fa9ea3db803cd3d", + "rev": "1dbbba659c1cef0b0202ce92cadfe13bae550e8f", "type": "github" }, "original": { @@ -35,8 +35,7 @@ }, "chataigne": { "inputs": { - "nixpkgs": "nixpkgs", - "pinned-nixpkgs": "pinned-nixpkgs" + "nixpkgs": "nixpkgs" }, "locked": { "path": "./modules/chataigne", @@ -166,11 +165,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1772000104, - "narHash": "sha256-PKMU7+iiuNf8dacbkIG+OaABs5WomdnHf0uVmUDm/eQ=", + "lastModified": 1773279064, + "narHash": "sha256-BLcSfp2aNm+0oDoHbvTufBRS2XwKqbIeUOXD8t58efE=", "owner": "Mjoyufull", "repo": "fsel", - "rev": "e9da4e371997ee8479553433a5bb0b7da3df789a", + "rev": "7b38c6223eed6e509f98e066ff89f481bd1930d7", "type": "github" }, "original": { @@ -297,11 +296,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1772215399, - "narHash": "sha256-iD/OJ5f7cyYluA0aQgTPTYuY0l12oF/mowyzcR8IQOY=", + "lastModified": 1773316626, + "narHash": "sha256-BrDGYt2w2tSkCvjMtgcVGIAp3FWsV5Ycl4ongLZ/fLk=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "0002f148c9a4fe421a9d33c0faa5528cdc411e62", + "rev": "e8684034525829d58054c32da914d1713398fbb8", "type": "github" }, "original": { @@ -578,16 +577,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1771008912, - "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", - "owner": "NixOS", + "lastModified": 1773222311, + "narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "a82ccc39b39b621151d6732718e3e250109076fa", + "rev": "0590cd39f728e129122770c029970378a79d076a", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", + "owner": "nixos", + "ref": "nixos-25.11", "repo": "nixpkgs", "type": "github" } @@ -689,11 +688,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1771848320, - "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", + "lastModified": 1772198003, + "narHash": "sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fc6539b481e1d2569f25f8799236694180c0993", + "rev": "dd9b079222d43e1943b6ebd802f04fd959dc8e61", "type": "github" }, "original": { @@ -705,11 +704,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1771043024, - "narHash": "sha256-O1XDr7EWbRp+kHrNNgLWgIrB0/US5wvw9K6RERWAj6I=", + "lastModified": 1773222311, + "narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3aadb7ca9eac2891d52a9dec199d9580a6e2bf44", + "rev": "0590cd39f728e129122770c029970378a79d076a", "type": "github" }, "original": { @@ -753,11 +752,11 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1771008912, - "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", + "lastModified": 1769170682, + "narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a82ccc39b39b621151d6732718e3e250109076fa", + "rev": "c5296fdd05cfa2c187990dd909864da9658df755", "type": "github" }, "original": { @@ -805,23 +804,6 @@ "type": "github" } }, - "pinned-nixpkgs": { - "flake": false, - "locked": { - "lastModified": 1708756934, - "narHash": "sha256-WqpheJblJ901Svd5NmLJYLmZ3f4fYLkSOyx9i06+un0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5171d7b0a9fbaaf216c873622eb5115b6db97957", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5171d7b0a9fbaaf216c873622eb5115b6db97957", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat", @@ -832,11 +814,11 @@ ] }, "locked": { - "lastModified": 1771858127, - "narHash": "sha256-Gtre9YoYl3n25tJH2AoSdjuwcqij5CPxL3U3xysYD08=", + "lastModified": 1772024342, + "narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "49bbbfc218bf3856dfa631cead3b052d78248b83", + "rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476", "type": "github" }, "original": { @@ -903,11 +885,11 @@ "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1769361037, - "narHash": "sha256-dWnjQpGNKEwIMPNoUp765q2QlVRCX58KbNm0ZBrTL80=", + "lastModified": 1773139650, + "narHash": "sha256-lTzwHjwgzXpV0loeMShR6a/bhx6uJq+cM61av6rLF/A=", "owner": "AceSLS", "repo": "SLSsteam", - "rev": "6aae05be2fa2f8d5f1c5906658a3d41ad30d6352", + "rev": "d85028aef70128a17d26afb1f2af27d1375355c9", "type": "github" }, "original": { @@ -1019,11 +1001,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1770861617, - "narHash": "sha256-og1aBdwHGVqgxzsvL7jrOekIY+9/g+Q33MoF4540Lv0=", + "lastModified": 1773029731, + "narHash": "sha256-hyJUYQb51mQ9tozxMkMUNiJaeErjo+2codRSquvKuNY=", "owner": "way-edges", "repo": "way-edges", - "rev": "0376c84a2f698aa5e9600ed7566d64311361ff0a", + "rev": "dfcbee00286c57735db3b5786cfbc4f1d587503a", "type": "github" }, "original": { diff --git a/modules/chataigne/Chataigne-linux-x64-bleedingedge.AppImage b/modules/chataigne/Chataigne-linux-x64-1.10.3.AppImage similarity index 65% rename from modules/chataigne/Chataigne-linux-x64-bleedingedge.AppImage rename to modules/chataigne/Chataigne-linux-x64-1.10.3.AppImage index 3ac48d6..04c4965 100755 Binary files a/modules/chataigne/Chataigne-linux-x64-bleedingedge.AppImage and b/modules/chataigne/Chataigne-linux-x64-1.10.3.AppImage differ diff --git a/modules/chataigne/chataigne.nix b/modules/chataigne/chataigne.nix deleted file mode 100644 index 1a15fb2..0000000 --- a/modules/chataigne/chataigne.nix +++ /dev/null @@ -1,131 +0,0 @@ -{ pkgs, pinnedPkgs, ... }: - -let - # 1. Define the AppImage source. - appImageSrc = ./Chataigne-linux-x64-bleedingedge.AppImage; - - # 2a. Libraries pulled from the modern, current Nixpkgs (for small size). - modernLibs = with pkgs; [ - freetype - libxrandr - ]; - - # 2b. Libraries pulled from the older, pinned package set (ONLY the ones that failed). - pinnedCurlLibs = with pinnedPkgs; [ - curlWithGnuTls # This is the critical component for the CURL_GNUTLS_3 symbol. - alsa-lib - avahi - libglvnd - SDL2 - hidapi - curl - gnutls - ]; - - # 3. Combine the modern runtime dependencies with the pinned compatibility libraries. - appImageDeps = [ - pkgs.steam-run - pkgs.stdenv.cc.cc.lib # Ensures the modern C++ runtime is available - ] - ++ modernLibs - ++ pinnedCurlLibs; - - chataigneDesktopItem = { - desktopName = "Chataigne"; - name = "chataigne"; - exec = "chataigne"; # The name of the wrapper script in $out/bin - icon = "chataigne"; # The name of the icon file (without extension) - genericName = "Creative Control Software"; - comment = "Control and experiment with creative applications, hardware, and media."; - categories = [ - "AudioVideo" - "Development" - ]; - }; - -in - -# 4. Create the final runnable derivation -pkgs.stdenv.mkDerivation { - pname = "chataigne-runner"; - version = "1.0"; - - # --- Attributes needed for AppImage running (not compiling) --- - src = ./.; - dontUnpack = true; - dontBuild = true; - # -------------------------------------------------- - - # Inject the combined dependencies into the environment - buildInputs = appImageDeps; - - # The install phase creates an executable wrapper script, extracts the AppImage, - # and now handles the desktop file and icon. - installPhase = '' - mkdir -p $out/bin - - # --- STRATEGY: Extract AppImage contents to bypass FUSE, then fix LD_LIBRARY_PATH --- - echo "Extracting AppImage contents to bypass FUSE requirement..." - - # Use the absolute Nix Store path of the AppImage - ${appImageSrc} --appimage-extract - echo "appimage extracted" - - # 2. Check if extraction worked and move the content to $out - if [ ! -d "squashfs-root" ]; then - echo "Extraction failed. The AppImage may not support --appimage-extract." - exit 1 - fi - - # 2. CRITICAL FIX: Manually create and install the .desktop file - mkdir -p $out/share/applications - - # pkgs.lib.makeDesktopItem takes the metadata and creates a small derivation - # We copy the resulting .desktop file from that derivation's output path ($desktop_file_path) - local desktop_file_path="${pkgs.makeDesktopItem chataigneDesktopItem}" - - # The file is typically named $name.desktop inside the share/applications folder of the new derivation - cp $desktop_file_path/share/applications/chataigne.desktop $out/share/applications/ - - # Copy the extracted contents into the output directory - cp -r squashfs-root $out/ - - # --- DESKTOP ENTRY & ICON (NEW) --- - echo "Processing icon and desktop file..." - - # AppImages usually place the icon in squashfs-root/.DirIcon or similar - # We will assume it's in the root of the extracted content. - local icon_source="$out/squashfs-root/.DirIcon" - local icon_target="$out/share/icons/hicolor/128x128/apps/chataigne.png" # Standard location - - # Use the icon if it exists (AppImages often use a .png or .svg) - if [ -f "$icon_source" ]; then - mkdir -p "$(dirname "$icon_target")" - cp "$icon_source" "$icon_target" - else - echo "Warning: Could not find icon at $icon_source. Using default/no icon." - fi - # ---------------------------------- - - # 3. Create the 'chataigne' executable wrapper - cat > $out/bin/chataigne << EOF - #!${pkgs.stdenv.shell} - - # The LD_LIBRARY_PATH is created using all dependencies (excluding the wrapper 'steam-run'). - # This ensures the AppImage finds the pinned CURL library. - export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath (pkgs.lib.remove pkgs.steam-run appImageDeps)}:$LD_LIBRARY_PATH" - - # Use steam-run to launch the main execution script inside the extracted folder. - exec ${pkgs.steam-run}/bin/steam-run "$out/squashfs-root/AppRun" "\$@" - EOF - - chmod +x $out/bin/chataigne - ''; - - meta = { - description = "Declarative runner for the Chataigne AppImage, providing necessary dependencies."; - homepage = "https://chataigne.io/"; # Example: Add the actual homepage - license = pkgs.lib.licenses.unfree; # AppImages are often proprietary/unfree - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/modules/chataigne/flake.lock b/modules/chataigne/flake.lock index d9cf7b1..7c17385 100644 --- a/modules/chataigne/flake.lock +++ b/modules/chataigne/flake.lock @@ -2,41 +2,23 @@ "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" } }, - "pinned-nixpkgs": { - "flake": false, - "locked": { - "lastModified": 1708756934, - "narHash": "sha256-WqpheJblJ901Svd5NmLJYLmZ3f4fYLkSOyx9i06+un0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5171d7b0a9fbaaf216c873622eb5115b6db97957", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5171d7b0a9fbaaf216c873622eb5115b6db97957", - "type": "github" - } - }, "root": { "inputs": { - "nixpkgs": "nixpkgs", - "pinned-nixpkgs": "pinned-nixpkgs" + "nixpkgs": "nixpkgs" } } }, diff --git a/modules/chataigne/flake.nix b/modules/chataigne/flake.nix index 250f496..ecb8b72 100644 --- a/modules/chataigne/flake.nix +++ b/modules/chataigne/flake.nix @@ -1,51 +1,82 @@ { - description = "A flake for running the Chataigne AppImage with necessary patched dependencies."; + description = "Local wrapper for Chataigne AppImage"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # Modern Nixpkgs - - # Pinned Nixpkgs for compatibility (the commit that fixes the CURL_GNUTLS_3 issue) - pinned-nixpkgs = { - url = "github:NixOS/nixpkgs/5171d7b0a9fbaaf216c873622eb5115b6db97957"; - flake = false; # Treat as a tarball input, not a flake - }; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; }; outputs = - { - self, - nixpkgs, - pinned-nixpkgs, - ... - }: + { self, nixpkgs }: let - # Supported systems - supportedSystems = [ "x86_64-linux" ]; + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; - # The main package definition logic is imported as a function - chataigne-appimage-runner = import ./chataigne.nix; + # 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 + ]; - # Function to generate the package set for each system - forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system); + # 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; + }; + + # 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 { - packages = forAllSystems ( - system: - let - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - }; - pinnedPkgs = import pinned-nixpkgs { inherit system; }; - in - { - chataigne = chataigne-appimage-runner { - inherit pkgs pinnedPkgs; - }; + # packages.${system}.default = chataigne-bin; - # Also expose the default package for convenience - default = self.packages.${system}.chataigne; - } - ); + devShells.${system}.default = pkgs.mkShell { + # Packages you want available in your shell + buildInputs = [ + chataigne-bin + ]; + + # 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 + ]; + }; }; }