financier-nix/flake.nix
Martin Puppe 6bc8e28f0f Use the upstream version of financier
The upstream version has been updated, and it has been switched to Yarn.
This makes it simple to build it without the need of our own fork.

We need a small fix for yarn2nix for the time being though. See
<https://github.com/financier-io/financier/pull/5> for details.
2022-06-10 12:30:13 +02:00

38 lines
1 KiB
Nix

{
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.financier = {
url = "github:puppe/financier/fix-yarn2nix";
flake = false;
};
outputs = inputs@{ self, nixpkgs, ... }:
inputs.flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
packages = {
financier-dist = pkgs.mkYarnPackage {
name = "financier-dist";
src = "${inputs.financier}";
buildPhase = ''
yarn --offline build
'';
distPhase = "true";
installPhase = ''
cp -r dist "$out/"
'';
configurePhase = "ln -s $node_modules node_modules";
};
};
defaultPackage = self.packages.${system}.financier-dist;
}) // {
nixosModule = { pkgs, lib, ... }: {
imports = [ ./module.nix ];
services.financier.package =
lib.mkDefault self.packages.${pkgs.system}.financier-dist;
};
};
}