More strictly control what goes into elm.nix

This commit is contained in:
Danila Fedorin 2023-11-30 04:22:02 +00:00
parent cd2d6366b0
commit 524796d74f
2 changed files with 16 additions and 14 deletions

10
elm.nix
View File

@ -1,6 +1,4 @@
{ pkgs }:
with pkgs;
{ lib, stdenv, elm, fetchElmDeps, uglify-js, }:
let
mkDerivation =
@ -15,10 +13,10 @@ let
stdenv.mkDerivation {
inherit name src;
buildInputs = [ elmPackages.elm ]
++ lib.optional outputJavaScript nodePackages.uglify-js;
buildInputs = [ elm ]
++ lib.optional outputJavaScript uglify-js;
buildPhase = pkgs.elmPackages.fetchElmDeps {
buildPhase = fetchElmDeps {
elmPackages = import srcs;
elmVersion = "0.19.1";
inherit registryDat;

View File

@ -6,13 +6,17 @@
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
bergamot-elm = import ./elm.nix { inherit pkgs; };
in
{
packages = { inherit bergamot-elm; };
defaultPackage = bergamot-elm;
}
let
pkgs = import nixpkgs { inherit system; };
bergamot-elm = import ./elm.nix {
inherit (pkgs) lib stdenv;
inherit (pkgs.elmPackages) fetchElmDeps elm;
inherit (pkgs.nodePackages) uglify-js;
};
in
{
packages = { inherit bergamot-elm; };
defaultPackage = bergamot-elm;
}
);
}