Formatting (nixfmt)

This commit is contained in:
Martin Puppe 2021-07-31 16:58:29 +02:00
parent e71e35cb55
commit c0fd2b96a5
6 changed files with 32 additions and 41 deletions

View file

@ -1,13 +1,8 @@
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem}:
{ pkgs ? import <nixpkgs> { inherit system; }, system ? builtins.currentSystem
}:
let
derivations = import ./node2nix.nix {
inherit pkgs system;
};
in
derivations // {
let derivations = import ./node2nix.nix { inherit pkgs system; };
in derivations // {
package = derivations.package.overrideAttrs (oldAttrs: rec {
# Puppeteer (a dependency for testing) would try to download Chromium
# during installation. Downloading Chromium would not work though because

View file

@ -1,14 +1,11 @@
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem}:
{ pkgs ? import <nixpkgs> { inherit system; }, system ? builtins.currentSystem
}:
let
financier = (import ./default.nix { inherit pkgs system; }).package;
meta = import ./meta.nix;
in
pkgs.stdenv.mkDerivation {
in pkgs.stdenv.mkDerivation {
inherit (meta) version;
pname = "financier-dist";
src = "${financier}/lib/node_modules/financier";

View file

@ -1,4 +1,4 @@
{
fetchFinancier = { fetchgit, meta ? import ./meta.nix }:
fetchgit { inherit (meta) url rev sha256; };
}
fetchFinancier = { fetchgit, meta ? import ./meta.nix }:
fetchgit { inherit (meta) url rev sha256; };
}

View file

@ -1,9 +1,9 @@
rec {
version = "1.7.3";
nodeVersion = "12";
version = "1.7.3";
nodeVersion = "12";
# Arguments for fetchgit
url = "https://gitlab.com/mpuppe/financier.git";
rev = "83367cae265af4a036a05766c6f80ea22d1cc1ec";
sha256 = "0h7222j9fk4b3fkc7c6gbhl0xranpl5swapkwibb0aba0g6fykfg";
}
# Arguments for fetchgit
url = "https://gitlab.com/mpuppe/financier.git";
rev = "83367cae265af4a036a05766c6f80ea22d1cc1ec";
sha256 = "0h7222j9fk4b3fkc7c6gbhl0xranpl5swapkwibb0aba0g6fykfg";
}

View file

@ -3,9 +3,8 @@ with lib;
let
cfg = config.services.financier;
financier-dist = import ./dist.nix { inherit pkgs system; };
in
{
imports = [];
in {
imports = [ ];
options.services.financier = {
enable = mkEnableOption "Financier";

View file

@ -1,14 +1,14 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> { } }:
let
meta = import ./meta.nix;
src = (import ./helpers.nix).fetchFinancier { inherit (pkgs) fetchgit; inherit meta; };
in
pkgs.mkShell {
shellHook = ''
export FINANCIER_SRC="${src}"
export FINANCIER_NODE_VERSION="${meta.nodeVersion}"
'';
buildInputs = with pkgs; [
nodePackages.node2nix
];
}
meta = import ./meta.nix;
src = (import ./helpers.nix).fetchFinancier {
inherit (pkgs) fetchgit;
inherit meta;
};
in pkgs.mkShell {
shellHook = ''
export FINANCIER_SRC="${src}"
export FINANCIER_NODE_VERSION="${meta.nodeVersion}"
'';
buildInputs = with pkgs; [ nodePackages.node2nix ];
}