Reformatted with nixfmt
This commit is contained in:
parent
f51256c3ae
commit
3f16537322
80 changed files with 1454 additions and 992 deletions
|
@ -7,7 +7,8 @@
|
|||
nodejs,
|
||||
breakpointHook,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
pname = "teslamate";
|
||||
version = "1.28.2";
|
||||
|
||||
|
@ -23,29 +24,29 @@
|
|||
|
||||
overrides = (
|
||||
final: prev:
|
||||
(lib.mapAttrs
|
||||
(_: value:
|
||||
value.override {
|
||||
appConfigPath = src + "/config";
|
||||
})
|
||||
prev)
|
||||
// {
|
||||
ex_cldr = prev.ex_cldr.overrideAttrs (old: rec {
|
||||
# Copied from https://github.com/NixOS/nixpkgs/blob/d8fd23629b3910e8bdbd313e29532d3e33dd73d5/pkgs/servers/mobilizon/default.nix#L34-L47
|
||||
version = "2.37.5";
|
||||
# We have to use the GitHub sources, as it otherwise tries to download
|
||||
# the locales at build time.
|
||||
src = fetchFromGitHub {
|
||||
owner = "elixir-cldr";
|
||||
repo = "cldr";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-T5Qvuo+xPwpgBsqHNZYnTCA4loToeBn1LKTMsDcCdYs=";
|
||||
};
|
||||
postInstall = ''
|
||||
cp $src/priv/cldr/locales/* $out/lib/erlang/lib/ex_cldr-${old.version}/priv/cldr/locales/
|
||||
'';
|
||||
});
|
||||
(lib.mapAttrs (
|
||||
_: value:
|
||||
value.override {
|
||||
appConfigPath = src + "/config";
|
||||
}
|
||||
) prev)
|
||||
// {
|
||||
ex_cldr = prev.ex_cldr.overrideAttrs (old: rec {
|
||||
# Copied from https://github.com/NixOS/nixpkgs/blob/d8fd23629b3910e8bdbd313e29532d3e33dd73d5/pkgs/servers/mobilizon/default.nix#L34-L47
|
||||
version = "2.37.5";
|
||||
# We have to use the GitHub sources, as it otherwise tries to download
|
||||
# the locales at build time.
|
||||
src = fetchFromGitHub {
|
||||
owner = "elixir-cldr";
|
||||
repo = "cldr";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-T5Qvuo+xPwpgBsqHNZYnTCA4loToeBn1LKTMsDcCdYs=";
|
||||
};
|
||||
postInstall = ''
|
||||
cp $src/priv/cldr/locales/* $out/lib/erlang/lib/ex_cldr-${old.version}/priv/cldr/locales/
|
||||
'';
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -54,7 +55,7 @@
|
|||
inherit version;
|
||||
src = "${src}/assets";
|
||||
npmDepsHash = "sha256-h92i/cRf4I0c4vUc6oBt5T4yvM0JNQMkoDy2YHcVWS4=";
|
||||
patches = [./deploy_output.patch];
|
||||
patches = [ ./deploy_output.patch ];
|
||||
dontNpmBuild = true;
|
||||
installPhase = ''
|
||||
runHook preinstall
|
||||
|
@ -74,20 +75,25 @@
|
|||
'';
|
||||
};
|
||||
in
|
||||
beamPackages.mixRelease {
|
||||
inherit pname version src mixNixDeps;
|
||||
beamPackages.mixRelease {
|
||||
inherit
|
||||
pname
|
||||
version
|
||||
src
|
||||
mixNixDeps
|
||||
;
|
||||
|
||||
nativeBuildInputs = [nodejs];
|
||||
nativeBuildInputs = [ nodejs ];
|
||||
|
||||
preBuild = ''
|
||||
mkdir -p priv/static/assets
|
||||
# assets patched to write to scripts/deploy_output
|
||||
cp -r ${assets}/scripts/deploy_output ./priv/static/assets
|
||||
'';
|
||||
preBuild = ''
|
||||
mkdir -p priv/static/assets
|
||||
# assets patched to write to scripts/deploy_output
|
||||
cp -r ${assets}/scripts/deploy_output ./priv/static/assets
|
||||
'';
|
||||
|
||||
postBuild = ''
|
||||
# for external task you need a workaround for the no deps check flag
|
||||
# https://github.com/phoenixframework/phoenix/issues/2690
|
||||
mix do deps.loadpaths --no-deps-check phx.digest, release --overwrite
|
||||
'';
|
||||
}
|
||||
postBuild = ''
|
||||
# for external task you need a workaround for the no deps check flag
|
||||
# https://github.com/phoenixframework/phoenix/issues/2690
|
||||
mix do deps.loadpaths --no-deps-check phx.digest, release --overwrite
|
||||
'';
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue