nix: wrapper to launch ezidam with env variables
This commit is contained in:
parent
3b9f4792dc
commit
580c212e7d
1 changed files with 5 additions and 12 deletions
17
flake.nix
17
flake.nix
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue