fixed chataigne flake

This commit is contained in:
2026-03-12 19:02:00 +00:00
parent e3650d5adb
commit 8553a02ca6
2 changed files with 67 additions and 34 deletions

View File

@@ -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
];
};
};
}