From 7425480fc93264791f2a34743f7d2526204859fb Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Fri, 12 Apr 2024 18:04:56 +0200 Subject: [PATCH] Add python + maintainers --- README.md | 6 ++++ _sources/generated.json | 20 +++++++++++ _sources/generated.nix | 11 ++++++ maintainers/default.nix | 6 ++++ nvfetcher.toml | 4 +++ pkgs/default.nix | 6 ++-- pkgs/go/default.nix | 6 +++- pkgs/node/default.nix | 6 +++- pkgs/python/default.nix | 9 +++++ pkgs/python/mkdocs-render-swagger-plugin.nix | 35 ++++++++++++++++++++ 10 files changed, 105 insertions(+), 4 deletions(-) create mode 100644 maintainers/default.nix create mode 100644 pkgs/python/default.nix create mode 100644 pkgs/python/mkdocs-render-swagger-plugin.nix diff --git a/README.md b/README.md index db8d189..790e5f6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# My own flake with packages in dev before add it in nixpkgs +## Packages available + +- maildev : Node (Auto updated with nvfetcher) +- mkdocs-render-swagger-plugin : Python +- stripe-mock : Go (Auto updated with nvfetcher) # 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 index 901a9fa..cc7a8d0 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -19,6 +19,26 @@ }, "version": "v2.1.0" }, + "mkdocs-render-swagger-plugin": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "mkdocs-render-swagger-plugin", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "bharel", + "repo": "mkdocs-render-swagger-plugin", + "rev": "0.1.1", + "sha256": "sha256-d/zNH3fp3hRl7DEMHWPMu7kRObBOUnGbngmgGwo40mc=", + "type": "github" + }, + "version": "0.1.1" + }, "stripe-mock": { "cargoLocks": null, "date": null, diff --git a/_sources/generated.nix b/_sources/generated.nix index c1c12a0..9ef15bd 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -12,6 +12,17 @@ sha256 = "sha256-lTLhQ+gKQvfagKp0Ig+uOGwkUtzORaY1TzIkFOcoO3I="; }; }; + mkdocs-render-swagger-plugin = { + pname = "mkdocs-render-swagger-plugin"; + version = "0.1.1"; + src = fetchFromGitHub { + owner = "bharel"; + repo = "mkdocs-render-swagger-plugin"; + rev = "0.1.1"; + fetchSubmodules = false; + sha256 = "sha256-d/zNH3fp3hRl7DEMHWPMu7kRObBOUnGbngmgGwo40mc="; + }; + }; stripe-mock = { pname = "stripe-mock"; version = "v0.183.0"; diff --git a/maintainers/default.nix b/maintainers/default.nix new file mode 100644 index 0000000..e018512 --- /dev/null +++ b/maintainers/default.nix @@ -0,0 +1,6 @@ +{ + florian = { + email = "florian.richer@protonmail.com"; + name = "Florian RICHER"; + }; +} \ No newline at end of file diff --git a/nvfetcher.toml b/nvfetcher.toml index 987a10e..18aefb1 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -2,6 +2,10 @@ src.github = "maildev/maildev" fetch.github = "maildev/maildev" +[mkdocs-render-swagger-plugin] +src.github = "bharel/mkdocs-render-swagger-plugin" +fetch.github = "bharel/mkdocs-render-swagger-plugin" + [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 4511da6..ad39edd 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,10 +1,12 @@ { pkgs }: let + maintainers = import ../maintainers; sources = import ../_sources/generated.nix { inherit (pkgs) fetchgit fetchurl fetchFromGitHub dockerTools; }; packages = [ - (import ./go { inherit pkgs sources; }) - (import ./node { inherit pkgs sources; }) + (import ./go { inherit maintainers pkgs sources; }) + (import ./node { inherit maintainers pkgs sources; }) + # (import ./python { inherit maintainers pkgs sources; }) # Not work yet ]; in 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 b23fd8f..0757ce0 100644 --- a/pkgs/go/default.nix +++ b/pkgs/go/default.nix @@ -1,4 +1,8 @@ -{ pkgs, sources }: +{ + maintainers, + pkgs, + sources +}: { stripe-mock = pkgs.callPackage ./stripe-mock.nix { source = sources.stripe-mock; }; diff --git a/pkgs/node/default.nix b/pkgs/node/default.nix index d033f77..1784d5c 100644 --- a/pkgs/node/default.nix +++ b/pkgs/node/default.nix @@ -1,4 +1,8 @@ -{ pkgs, sources }: +{ + maintainers, + pkgs, + sources +}: { maildev = pkgs.callPackage ./maildev.nix { source = sources.maildev; }; diff --git a/pkgs/python/default.nix b/pkgs/python/default.nix new file mode 100644 index 0000000..8f72055 --- /dev/null +++ b/pkgs/python/default.nix @@ -0,0 +1,9 @@ +{ + maintainers, + pkgs, + sources +}: + +{ + mkdocs-render-swagger-plugin = pkgs.callPackage ./mkdocs-render-swagger-plugin.nix { inherit maintainers; source = sources.mkdocs-render-swagger-plugin; }; +} \ No newline at end of file diff --git a/pkgs/python/mkdocs-render-swagger-plugin.nix b/pkgs/python/mkdocs-render-swagger-plugin.nix new file mode 100644 index 0000000..da60eb2 --- /dev/null +++ b/pkgs/python/mkdocs-render-swagger-plugin.nix @@ -0,0 +1,35 @@ +{ lib +, buildPythonPackage +, source +, maintainers + +# dependencies +, mkdocs +, setuptools +}: + +buildPythonPackage { + inherit (source) pname version src; + + pyproject = true; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + mkdocs + ]; + + # No tests for python + doCheck = false; + + pythonImportsCheck = [ "mkdocs" ]; + + meta = with lib; { + description = "A plugin for MKDocs for rendering swagger & openapi schemas using SwaggerUI."; + homepage = "https://github.com/bharel/mkdocs-render-swagger-plugin"; + license = licenses.mit; + maintainers = [ maintainers.florian ]; + }; +}