1
0
Fork 0

Begin work

This commit is contained in:
Florian RICHER 2024-04-11 17:15:11 +02:00
commit 0d79b3a472
7 changed files with 136 additions and 0 deletions

61
flake.lock Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1712757991,
"narHash": "sha256-kR7C7Fqt3JP40h0mzmSZeWI5pk1iwqj4CSeGjnUbVHc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d6b3ddd253c578a7ab98f8011e59990f21dc3932",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

20
flake.nix Normal file
View file

@ -0,0 +1,20 @@
{
description = "Standard packages";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
packages = import ./pkgs {
inherit (nixpkgs) lib;
inherit pkgs;
};
});
}

6
pkgs/default.nix Normal file
View file

@ -0,0 +1,6 @@
{ lib, pkgs, ... }:
{
goPackages = import ./go { inherit lib pkgs; };
nodePackages = import ./node { inherit lib pkgs; };
}

5
pkgs/go/default.nix Normal file
View file

@ -0,0 +1,5 @@
{ pkgs, ... }:
{
stripeMock = pkgs.callPackage ./stripe-mock.nix { };
}

17
pkgs/go/stripe-mock.nix Normal file
View file

@ -0,0 +1,17 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "stripe-mock";
version = "v0.183.0";
vendorHash = null;
src = fetchFromGitHub {
owner = "stripe";
repo = "stripe-mock";
rev = "v0.183.0";
sha256 = "hdcINPrlE4bjSCOUJG64Ok1gz+jwYhf2RzT+eBK7dPM=";
};
}

5
pkgs/node/default.nix Normal file
View file

@ -0,0 +1,5 @@
{ pkgs, ... }:
{
maildev = pkgs.callPackage ./maildev.nix {};
}

22
pkgs/node/maildev.nix Normal file
View file

@ -0,0 +1,22 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
# Dependencies
nodejs_18,
}:
buildNpmPackage {
pname = "maildev";
version = "v2.1.0";
nodejs = nodejs_18;
dontNpmBuild = true;
src = fetchFromGitHub {
owner = "maildev";
repo = "maildev";
rev = "v2.1.0";
sha256 = "lTLhQ+gKQvfagKp0Ig+uOGwkUtzORaY1TzIkFOcoO3I=";
};
npmDepsHash = "sha256-2JGA9x5t17EoE7JZeYhorsKfTXM1jSgOWBp/Npzn0d4=";
}