Files
nixos/modules/chataigne/flake.nix
2026-03-12 18:00:53 +00:00

50 lines
1.3 KiB
Nix

{
description = "A flake to run a specific AppImage with custom dependencies";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
system = "x86_64-linux"; # Adjust if you're on a different architecture
pkgs = import nixpkgs { inherit system; };
# Define your AppImage wrapper here
myApp = pkgs.appimageTools.wrapType2 {
pname = "my-appimage-app";
version = "1.0.0";
# The source can be a local file or a URL
src = ./Chataigne-linux-x64-1.10.3.AppImage;
# Add specific dependencies the AppImage is missing
extraPkgs =
pkgs: with pkgs; [
lz4
libbsd
(curlWithGnuTls.override { gnutlsSupport = true; })
gnutls
libgnurl
openssl
];
};
in
{
# This allows you to run it via 'nix run'
apps.${system}.default = {
type = "app";
program = "${myApp}/bin/my-appimage-app";
};
# This allows you to add it to your shell via 'nix develop'
devShells.${system}.default = pkgs.mkShell {
buildInputs = [ myApp ];
};
# The package itself
packages.${system}.default = myApp;
};
}