2024-05-28 15:33:44 +00:00
|
|
|
{
|
|
|
|
perSystem =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
let
|
|
|
|
nfpmConfig = pkgs.writeText "clan-nfpm-config.yaml" (
|
2024-05-28 15:33:44 +00:00
|
|
|
|
|
|
|
builtins.toJSON {
|
|
|
|
name = "clan-gui-installer";
|
|
|
|
contents = [
|
|
|
|
{
|
|
|
|
src = "${./gui-installer.sh}";
|
2024-06-05 09:23:12 +00:00
|
|
|
dst = "/usr/bin/clan-app";
|
2024-05-28 15:33:44 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|
2024-05-28 15:33:44 +00:00
|
|
|
);
|
|
|
|
installerFor =
|
|
|
|
packager:
|
|
|
|
pkgs.runCommand "gui-installer" { } ''
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
${pkgs.nfpm}/bin/nfpm package --config ${nfpmConfig} --packager ${packager}
|
|
|
|
mkdir $out
|
|
|
|
mv * $out/
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
{
|
|
|
|
packages.gui-installer-apk = installerFor "apk";
|
|
|
|
packages.gui-installer-archlinux = installerFor "archlinux";
|
|
|
|
packages.gui-installer-deb = installerFor "deb";
|
|
|
|
packages.gui-installer-rpm = installerFor "rpm";
|
|
|
|
};
|
|
|
|
}
|