mirror of
https://codeberg.org/puppe/financier-nix.git
synced 2025-12-20 00:12:17 +01:00
The overlay has been removed and the package financier-dist is now always built with the Nixpkgs version from our flake inputs. Overlays can be applied to any version of Nixpkgs, but our package does not work with all versions of Nixpkgs. For example, we currently built our package with Node 12. The nodejs-12_x has been marked as insecure on the 21.05 branch in May 2022 breaking our build and consequently our module and all configurations that rely on it. Usually, it would be very bad to pin to an old Nixpkgs version as we miss potential security updates. But we build a static website and it is very unlikely that it has any security issues.
35 lines
1.1 KiB
Nix
35 lines
1.1 KiB
Nix
{
|
|
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;
|
|
};
|
|
};
|
|
}
|