{ inputs.flake-utils.url = "github:numtide/flake-utils"; inputs.financier = { url = "git+https://codeberg.org/puppe/financier.git?ref=mpuppe"; flake = false; }; outputs = inputs@{ self, nixpkgs, ... }: let financierVersion = (builtins.fromJSON (builtins.readFile "${inputs.financier}/package.json")).version; nodeVersion = "12"; in inputs.flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; in { packages = { financier-dist = pkgs.callPackage ./dist.nix { inherit financierVersion; }; }; defaultPackage = self.packages.${system}.financier-dist; devShell = pkgs.mkShell { packages = with pkgs; [ nodePackages.node2nix ]; shellHook = '' export FINANCIER_SRC="${inputs.financier}" export FINANCIER_NODE_VERSION="${nodeVersion}" ''; }; }) // { nixosModule = { pkgs, lib, ... }: { imports = [ ./module.nix ]; services.financier.package = lib.mkDefault self.packages.${pkgs.system}.financier-dist; }; }; }