nix: wrapper to launch ezidam with env variables

This commit is contained in:
Philippe Loctaux 2023-11-20 22:31:38 +01:00
parent 3b9f4792dc
commit 580c212e7d

View file

@ -99,17 +99,10 @@
ezidamAssetStatic
];
ezidam = pkgs.stdenv.mkDerivation {
inherit ezidamBinary ezidamAssets;
name = metadata.pname;
phases = [ "unpackPhase" "installPhase" ];
dontUnpack = true;
installPhase = ''
mkdir -p $out
cp -rv $ezidamBinary $out
cp -rv $ezidamAssets $out
'';
};
# How to launch binary
ezidam = pkgs.writeShellScriptBin "ezidam" ''
EZIDAM_TEMPLATE_DIR=${ezidamAssetTemplate} EZIDAM_STATIC_DIR=${ezidamAssetStatic} ${ezidamBinary}/bin/ezidam
'';
# Docker image
dockerImage = pkgs.dockerTools.buildLayeredImage {
@ -142,7 +135,7 @@
{
apps.default = {
type = "app";
program = "${ezidamBinary}/bin/ezidam";
program = "${ezidam}/bin/ezidam";
};
packages = {