From ebfe621f4c409312302500bd60e37bb8d754e0eb Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 19 Dec 2024 20:36:06 -0600 Subject: [PATCH] Simplify --- templates/elixir/nix/packages.nix | 33 +++++++++++++++---------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/templates/elixir/nix/packages.nix b/templates/elixir/nix/packages.nix index 42e6288..22bd52b 100644 --- a/templates/elixir/nix/packages.nix +++ b/templates/elixir/nix/packages.nix @@ -2,23 +2,22 @@ pkgs, self, ... -}: { - my-package = let - version = "1.0.0"; - src = ./.; - pname = "my-package"; - in - pkgs.beamPackages.mixRelease { - inherit pname version src; - mixFodDeps = pkgs.beamPackages.fetchMixDeps { - inherit version src; - pname = "mix-deps-${pname}"; - hash = pkgs.lib.fakeSha256; - }; - # buildInputs = with pkgs; []; - # HOME = "$(pwd)"; - # MIX_XDG = "$HOME"; +}: let + version = "1.0.0"; + src = ./.; + pname = "my-package"; +in { + ${pname} = pkgs.beamPackages.mixRelease { + inherit pname version src; + mixFodDeps = pkgs.beamPackages.fetchMixDeps { + inherit version src; + pname = "mix-deps-${pname}"; + hash = pkgs.lib.fakeSha256; }; + # buildInputs = with pkgs; []; + # HOME = "$(pwd)"; + # MIX_XDG = "$HOME"; + }; - default = self.packages.${pkgs.system}.my-package; + default = self.packages.${pkgs.system}.${pname}; }