From 580c212e7d8d8c80e460f54f92199ec1fa0c1df0 Mon Sep 17 00:00:00 2001 From: Philippe Loctaux
Date: Mon, 20 Nov 2023 22:31:38 +0100 Subject: [PATCH] nix: wrapper to launch ezidam with env variables --- flake.nix | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/flake.nix b/flake.nix index 7f9e07d..4953c73 100644 --- a/flake.nix +++ b/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 = {