mirror of
https://codeberg.org/puppe/financier-nix.git
synced 2025-12-20 00:12:17 +01:00
Use nix flake functionality for development
This commit is contained in:
parent
8c56307c55
commit
dd5f51d9cc
10 changed files with 61 additions and 25 deletions
32
flake.nix
32
flake.nix
|
|
@ -1,8 +1,22 @@
|
|||
{
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
let overlay = import ./overlay.nix;
|
||||
in flake-utils.lib.eachDefaultSystem (system:
|
||||
inputs.financier = {
|
||||
url = "gitlab:mpuppe/financier";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }:
|
||||
let
|
||||
financierVersion = "1.7.3";
|
||||
nodeVersion = "12";
|
||||
|
||||
overlay = final: prev: {
|
||||
financier-dist = import ./dist.nix {
|
||||
inherit financierVersion;
|
||||
inherit (prev) pkgs system;
|
||||
};
|
||||
};
|
||||
in inputs.flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
|
|
@ -11,8 +25,18 @@
|
|||
in {
|
||||
packages = { inherit (pkgs) financier-dist; };
|
||||
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}"
|
||||
'';
|
||||
};
|
||||
}) // {
|
||||
inherit overlay;
|
||||
nixosModule = import ./module.nix;
|
||||
nixosModule = {
|
||||
imports = [ ./module.nix ];
|
||||
nixpkgs.overlays = [ self.overlay ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue