53 lines
1.5 KiB
Nix
53 lines
1.5 KiB
Nix
|
|
{
|
||
|
|
flake-file.inputs = {
|
||
|
|
nix-alien.url = "github:thiagokokada/nix-alien";
|
||
|
|
};
|
||
|
|
|
||
|
|
den.aspects = {
|
||
|
|
fhs-compatible = {
|
||
|
|
nixos =
|
||
|
|
{ inputs, pkgs, ... }:
|
||
|
|
{
|
||
|
|
environment.systemPackages = with pkgs; [
|
||
|
|
steam-run
|
||
|
|
appimage-run
|
||
|
|
inputs.nix-alien.packages.${pkgs.system}.nix-alien
|
||
|
|
# FHS environtment
|
||
|
|
(
|
||
|
|
let
|
||
|
|
base = pkgs.appimageTools.defaultFhsEnvArgs;
|
||
|
|
in
|
||
|
|
pkgs.buildFHSEnv (
|
||
|
|
base
|
||
|
|
// {
|
||
|
|
name = "fhs";
|
||
|
|
targetPkgs =
|
||
|
|
pkgs:
|
||
|
|
(base.targetPkgs pkgs)
|
||
|
|
++ (with pkgs; [
|
||
|
|
pkg-config
|
||
|
|
ncurses
|
||
|
|
# feel free to add more packages here if needed
|
||
|
|
]);
|
||
|
|
profile = "export FHS=1";
|
||
|
|
runScript = "bash";
|
||
|
|
extraOutputsToInstall = [ "dev" ];
|
||
|
|
}
|
||
|
|
)
|
||
|
|
)
|
||
|
|
];
|
||
|
|
# autoload appimage
|
||
|
|
boot.binfmt.registrations.appimage = {
|
||
|
|
wrapInterpreterInShell = false;
|
||
|
|
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||
|
|
recognitionType = "magic";
|
||
|
|
offset = 0;
|
||
|
|
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
|
||
|
|
magicOrExtension = ''\x7fELF....AI\x02'';
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|