From 1b78a1dc58565342918bd55a3265e62df2a544df Mon Sep 17 00:00:00 2001 From: sinavir Date: Tue, 24 Sep 2024 11:54:59 +0200 Subject: [PATCH] Really fix nixeries --- nix/mkdocs-terminal.nix | 47 +++++++++++++++++++++++++++++++ {npins => nix/npins}/default.nix | 0 {npins => nix/npins}/sources.json | 0 nix/shell.nix | 9 ++++++ shell.nix | 10 +------ 5 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 nix/mkdocs-terminal.nix rename {npins => nix/npins}/default.nix (100%) rename {npins => nix/npins}/sources.json (100%) create mode 100644 nix/shell.nix mode change 100644 => 120000 shell.nix diff --git a/nix/mkdocs-terminal.nix b/nix/mkdocs-terminal.nix new file mode 100644 index 0000000..9059118 --- /dev/null +++ b/nix/mkdocs-terminal.nix @@ -0,0 +1,47 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatch-nodejs-version, + hatch-requirements-txt, + hatchling, + jinja2, + markdown, + mkdocs, + pygments, + pymdown-extensions, +}: + +buildPythonPackage rec { + pname = "mkdocs-terminal"; + version = "4.6.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ntno"; + repo = "mkdocs-terminal"; + rev = version; + hash = "sha256-Njfv1cBcF/5xW6QdgOvqVjp0JjXDUC0m20YdqYdooHo="; + }; + + build-system = [ + hatch-nodejs-version + hatch-requirements-txt + hatchling + ]; + + dependencies = [ + jinja2 + markdown + mkdocs + pygments + pymdown-extensions + ]; + + meta = { + description = "Monospace theme for MkDocs"; + homepage = "https://github.com/ntno/mkdocs-terminal"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/npins/default.nix b/nix/npins/default.nix similarity index 100% rename from npins/default.nix rename to nix/npins/default.nix diff --git a/npins/sources.json b/nix/npins/sources.json similarity index 100% rename from npins/sources.json rename to nix/npins/sources.json diff --git a/nix/shell.nix b/nix/shell.nix new file mode 100644 index 0000000..ab6ed83 --- /dev/null +++ b/nix/shell.nix @@ -0,0 +1,9 @@ +{ pkgs ? import (import ./npins).nixpkgs {} }: +pkgs.mkShell { + packages = [ + (pkgs.python3.withPackages (ps: [ + ps.mkdocs + (ps.callPackage ./mkdocs-terminal.nix {}) + ])) + ]; +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 6bf6444..0000000 --- a/shell.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs ? import (import ./npins).nixpkgs {} }: -pkgs.mkShell { - packages = [ - (pkgs.python3.withPackages (ps: [ - ps.mkdocs - ps.mkdocs-terminal - ])) - ]; -} diff --git a/shell.nix b/shell.nix new file mode 120000 index 0000000..0b3d425 --- /dev/null +++ b/shell.nix @@ -0,0 +1 @@ +nix/shell.nix \ No newline at end of file