aux-search/frontend/default.nix
github-actions[bot] af6a59015c
flake.lock: Update (#606)
* flake.lock: Update

Flake lock file updates:

• Updated input 'flake-utils':
    'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
  → 'github:numtide/flake-utils/93a2b84fc4b70d9e089d029deacc3583435c2ed6' (2023-03-15)
• Updated input 'nixos-org-configurations':
    'github:NixOS/nixos-org-configurations/3ce43a1fb5181a0e33b1f67d36fa0f3affa6bc6c' (2023-01-24)
  → 'github:NixOS/nixos-org-configurations/48c9b1cff22edd2a7342eb0ff7034dcad3d99e38' (2023-03-16)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c07552f6f7d4eead7806645ec03f7f1eb71ba6bd' (2023-01-10)
  → 'github:NixOS/nixpkgs/ac718d02867a84b42522a0ece52d841188208f2c' (2023-03-15)
• Updated input 'npmlock2nix':
    'github:nix-community/npmlock2nix/eeed152290ec2425f96c5e74e469c40b621e1468' (2022-10-22)
  → 'github:nix-community/npmlock2nix/9197bbf397d76059a76310523d45df10d2e4ca81' (2023-01-11)

* use v1 api

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rok Garbas <rok@floxdev.com>
2023-03-27 09:01:04 +02:00

46 lines
1.1 KiB
Nix

{ pkgs ? import <nixpkgs> { }
, nixosChannels
, version
}:
pkgs.npmlock2nix.v1.build {
src = ./.;
installPhase = ''
mkdir $out
cp -R dist/* $out/
cp netlify.toml $out/
'';
postConfigure = pkgs.elmPackages.fetchElmDeps {
elmPackages = import ./elm-srcs.nix;
elmVersion = pkgs.elmPackages.elm.version;
registryDat = ./registry.dat;
};
ELASTICSEARCH_MAPPING_SCHEMA_VERSION = version;
NIXOS_CHANNELS = builtins.toJSON nixosChannels;
buildCommands = [
"HOME=$PWD npm run prod"
];
buildInputs =
(with pkgs; [
nodejs
elm2nix
]) ++
(with pkgs.elmPackages; [
elm
elm-format
elm-language-server
elm-test
]);
node_modules_attrs = {
sourceOverrides = {
elm = sourceIngo: drv: drv.overrideAttrs (old: {
postPatch = ''
sed -i -e "s|download(|//download(|" install.js
sed -i -e "s|request(|//request(|" download.js
sed -i -e "s|var version|return; var version|" download.js
cp ${pkgs.elmPackages.elm}/bin/elm bin/elm
'';
});
};
};
}