diff --git a/README.md b/README.md new file mode 100644 index 0000000..db8d189 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ + + +# https://github.com/berberman/nvfetcher?tab=readme-ov-file#installation \ No newline at end of file diff --git a/_sources/generated.json b/_sources/generated.json new file mode 100644 index 0000000..901a9fa --- /dev/null +++ b/_sources/generated.json @@ -0,0 +1,42 @@ +{ + "maildev": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "maildev", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "maildev", + "repo": "maildev", + "rev": "v2.1.0", + "sha256": "sha256-lTLhQ+gKQvfagKp0Ig+uOGwkUtzORaY1TzIkFOcoO3I=", + "type": "github" + }, + "version": "v2.1.0" + }, + "stripe-mock": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "stripe-mock", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "stripe", + "repo": "stripe-mock", + "rev": "v0.183.0", + "sha256": "sha256-hdcINPrlE4bjSCOUJG64Ok1gz+jwYhf2RzT+eBK7dPM=", + "type": "github" + }, + "version": "v0.183.0" + } +} \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix new file mode 100644 index 0000000..c1c12a0 --- /dev/null +++ b/_sources/generated.nix @@ -0,0 +1,26 @@ +# This file was generated by nvfetcher, please do not modify it manually. +{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }: +{ + maildev = { + pname = "maildev"; + version = "v2.1.0"; + src = fetchFromGitHub { + owner = "maildev"; + repo = "maildev"; + rev = "v2.1.0"; + fetchSubmodules = false; + sha256 = "sha256-lTLhQ+gKQvfagKp0Ig+uOGwkUtzORaY1TzIkFOcoO3I="; + }; + }; + stripe-mock = { + pname = "stripe-mock"; + version = "v0.183.0"; + src = fetchFromGitHub { + owner = "stripe"; + repo = "stripe-mock"; + rev = "v0.183.0"; + fetchSubmodules = false; + sha256 = "sha256-hdcINPrlE4bjSCOUJG64Ok1gz+jwYhf2RzT+eBK7dPM="; + }; + }; +} diff --git a/nvfetcher.toml b/nvfetcher.toml new file mode 100644 index 0000000..987a10e --- /dev/null +++ b/nvfetcher.toml @@ -0,0 +1,7 @@ +[maildev] +src.github = "maildev/maildev" +fetch.github = "maildev/maildev" + +[stripe-mock] +src.github = "stripe/stripe-mock" +fetch.github = "stripe/stripe-mock" \ No newline at end of file diff --git a/pkgs/default.nix b/pkgs/default.nix index f064f38..4511da6 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,9 +1,10 @@ { pkgs }: let - sources = [ - (import ./go { inherit pkgs; }) - (import ./node { inherit pkgs; }) + sources = import ../_sources/generated.nix { inherit (pkgs) fetchgit fetchurl fetchFromGitHub dockerTools; }; + packages = [ + (import ./go { inherit pkgs sources; }) + (import ./node { inherit pkgs sources; }) ]; in -pkgs.lib.foldl (a: b: a // b) {} sources \ No newline at end of file +pkgs.lib.foldl (a: b: a // b) {} packages \ No newline at end of file diff --git a/pkgs/go/default.nix b/pkgs/go/default.nix index bfae28e..b23fd8f 100644 --- a/pkgs/go/default.nix +++ b/pkgs/go/default.nix @@ -1,5 +1,5 @@ -{ pkgs }: +{ pkgs, sources }: { - stripeMock = pkgs.callPackage ./stripe-mock.nix { }; + stripe-mock = pkgs.callPackage ./stripe-mock.nix { source = sources.stripe-mock; }; } \ No newline at end of file diff --git a/pkgs/go/stripe-mock.nix b/pkgs/go/stripe-mock.nix index 560a678..8c1e38f 100644 --- a/pkgs/go/stripe-mock.nix +++ b/pkgs/go/stripe-mock.nix @@ -1,17 +1,11 @@ { lib, buildGoModule, - fetchFromGitHub, + source, }: buildGoModule { - pname = "stripe-mock"; - version = "v0.183.0"; + inherit (source) pname version src; + vendorHash = null; - src = fetchFromGitHub { - owner = "stripe"; - repo = "stripe-mock"; - rev = "v0.183.0"; - sha256 = "hdcINPrlE4bjSCOUJG64Ok1gz+jwYhf2RzT+eBK7dPM="; - }; } \ No newline at end of file diff --git a/pkgs/node/default.nix b/pkgs/node/default.nix index a53264b..d033f77 100644 --- a/pkgs/node/default.nix +++ b/pkgs/node/default.nix @@ -1,5 +1,5 @@ -{ pkgs }: +{ pkgs, sources }: { - maildev = pkgs.callPackage ./maildev.nix {}; + maildev = pkgs.callPackage ./maildev.nix { source = sources.maildev; }; } \ No newline at end of file diff --git a/pkgs/node/maildev.nix b/pkgs/node/maildev.nix index 06ab690..1ff8d63 100644 --- a/pkgs/node/maildev.nix +++ b/pkgs/node/maildev.nix @@ -1,22 +1,18 @@ { lib, buildNpmPackage, - fetchFromGitHub, + source, # Dependencies nodejs_18, }: buildNpmPackage { - pname = "maildev"; - version = "v2.1.0"; + inherit (source) src pname version; + nodejs = nodejs_18; dontNpmBuild = true; - src = fetchFromGitHub { - owner = "maildev"; - repo = "maildev"; - rev = "v2.1.0"; - sha256 = "lTLhQ+gKQvfagKp0Ig+uOGwkUtzORaY1TzIkFOcoO3I="; - }; + + # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/javascript.section.md#prefetch-npm-deps-javascript-buildnpmpackage-prefetch-npm-deps npmDepsHash = "sha256-2JGA9x5t17EoE7JZeYhorsKfTXM1jSgOWBp/Npzn0d4="; } \ No newline at end of file