mirror of
https://codeberg.org/puppe/financier-nix.git
synced 2025-12-20 00:12:17 +01:00
Formatting (nixfmt)
This commit is contained in:
parent
e71e35cb55
commit
c0fd2b96a5
6 changed files with 32 additions and 41 deletions
13
default.nix
13
default.nix
|
|
@ -1,13 +1,8 @@
|
||||||
{pkgs ? import <nixpkgs> {
|
{ pkgs ? import <nixpkgs> { inherit system; }, system ? builtins.currentSystem
|
||||||
inherit system;
|
}:
|
||||||
}, system ? builtins.currentSystem}:
|
|
||||||
|
|
||||||
let
|
let derivations = import ./node2nix.nix { inherit pkgs system; };
|
||||||
derivations = import ./node2nix.nix {
|
in derivations // {
|
||||||
inherit pkgs system;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
derivations // {
|
|
||||||
package = derivations.package.overrideAttrs (oldAttrs: rec {
|
package = derivations.package.overrideAttrs (oldAttrs: rec {
|
||||||
# Puppeteer (a dependency for testing) would try to download Chromium
|
# Puppeteer (a dependency for testing) would try to download Chromium
|
||||||
# during installation. Downloading Chromium would not work though because
|
# during installation. Downloading Chromium would not work though because
|
||||||
|
|
|
||||||
9
dist.nix
9
dist.nix
|
|
@ -1,14 +1,11 @@
|
||||||
{pkgs ? import <nixpkgs> {
|
{ pkgs ? import <nixpkgs> { inherit system; }, system ? builtins.currentSystem
|
||||||
inherit system;
|
}:
|
||||||
}, system ? builtins.currentSystem}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
financier = (import ./default.nix { inherit pkgs system; }).package;
|
financier = (import ./default.nix { inherit pkgs system; }).package;
|
||||||
meta = import ./meta.nix;
|
meta = import ./meta.nix;
|
||||||
|
|
||||||
in
|
in pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
inherit (meta) version;
|
inherit (meta) version;
|
||||||
pname = "financier-dist";
|
pname = "financier-dist";
|
||||||
src = "${financier}/lib/node_modules/financier";
|
src = "${financier}/lib/node_modules/financier";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
fetchFinancier = { fetchgit, meta ? import ./meta.nix }:
|
fetchFinancier = { fetchgit, meta ? import ./meta.nix }:
|
||||||
fetchgit { inherit (meta) url rev sha256; };
|
fetchgit { inherit (meta) url rev sha256; };
|
||||||
}
|
}
|
||||||
12
meta.nix
12
meta.nix
|
|
@ -1,9 +1,9 @@
|
||||||
rec {
|
rec {
|
||||||
version = "1.7.3";
|
version = "1.7.3";
|
||||||
nodeVersion = "12";
|
nodeVersion = "12";
|
||||||
|
|
||||||
# Arguments for fetchgit
|
# Arguments for fetchgit
|
||||||
url = "https://gitlab.com/mpuppe/financier.git";
|
url = "https://gitlab.com/mpuppe/financier.git";
|
||||||
rev = "83367cae265af4a036a05766c6f80ea22d1cc1ec";
|
rev = "83367cae265af4a036a05766c6f80ea22d1cc1ec";
|
||||||
sha256 = "0h7222j9fk4b3fkc7c6gbhl0xranpl5swapkwibb0aba0g6fykfg";
|
sha256 = "0h7222j9fk4b3fkc7c6gbhl0xranpl5swapkwibb0aba0g6fykfg";
|
||||||
}
|
}
|
||||||
|
|
@ -3,9 +3,8 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.financier;
|
cfg = config.services.financier;
|
||||||
financier-dist = import ./dist.nix { inherit pkgs system; };
|
financier-dist = import ./dist.nix { inherit pkgs system; };
|
||||||
in
|
in {
|
||||||
{
|
imports = [ ];
|
||||||
imports = [];
|
|
||||||
|
|
||||||
options.services.financier = {
|
options.services.financier = {
|
||||||
enable = mkEnableOption "Financier";
|
enable = mkEnableOption "Financier";
|
||||||
|
|
|
||||||
24
shell.nix
24
shell.nix
|
|
@ -1,14 +1,14 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
{ pkgs ? import <nixpkgs> { } }:
|
||||||
let
|
let
|
||||||
meta = import ./meta.nix;
|
meta = import ./meta.nix;
|
||||||
src = (import ./helpers.nix).fetchFinancier { inherit (pkgs) fetchgit; inherit meta; };
|
src = (import ./helpers.nix).fetchFinancier {
|
||||||
in
|
inherit (pkgs) fetchgit;
|
||||||
pkgs.mkShell {
|
inherit meta;
|
||||||
shellHook = ''
|
};
|
||||||
export FINANCIER_SRC="${src}"
|
in pkgs.mkShell {
|
||||||
export FINANCIER_NODE_VERSION="${meta.nodeVersion}"
|
shellHook = ''
|
||||||
'';
|
export FINANCIER_SRC="${src}"
|
||||||
buildInputs = with pkgs; [
|
export FINANCIER_NODE_VERSION="${meta.nodeVersion}"
|
||||||
nodePackages.node2nix
|
'';
|
||||||
];
|
buildInputs = with pkgs; [ nodePackages.node2nix ];
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue