From 95b208d4a632afc4012b3666d17c8aa4c3697a1a Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 13 Sep 2024 15:09:45 -0500 Subject: [PATCH] add nph --- lib/default.nix | 8 +++++++- modules/languages/nim.nix | 12 +++++++----- pkgs/nph/default.nix | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 pkgs/nph/default.nix diff --git a/lib/default.nix b/lib/default.nix index 5ae2c8a..935e28d 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -3,7 +3,12 @@ let lib = nixpkgs.lib.extend (import ./extended.nix inputs); inherit (builtins) mapAttrs readDir listToAttrs; - inherit (lib) genAttrs pkgFromSystem pkgsFromSystem loadOverlays; + inherit (lib) + genAttrs + pkgFromSystem + pkgsFromSystem + loadOverlays + ; inherit (import ./find-modules.nix { inherit lib; }) findModulesList; inherit (import ./generators.nix { inherit lib self inputs; }) mkIso mkSystem; @@ -41,6 +46,7 @@ let oizys-nim = pkgs.callPackage ../pkgs/oizys-nim { }; oizys-go = pkgs.callPackage ../pkgs/oizys { }; nimlangserver = pkgs.callPackage ../pkgs/nimlangserver { }; + nph = pkgs.callPackage ../pkgs/nph { }; iso = mkIso.config.system.build.isoImage; roc = (pkgsFromSystem pkgs.system "roc").full; } diff --git a/modules/languages/nim.nix b/modules/languages/nim.nix index 78e43bf..b4d30aa 100644 --- a/modules/languages/nim.nix +++ b/modules/languages/nim.nix @@ -2,21 +2,23 @@ config, lib, pkgs, + flake, ... }: let inherit (lib) mkIfIn; cfg = config.oizys.languages; - nimlangserver = pkgs.callPackage ../../pkgs/nimlangserver { }; in { config = mkIfIn "nim" cfg { environment.systemPackages = - with pkgs; - [ + (with pkgs; [ nim nimble - ] - ++ [ nimlangserver ]; + ]) + ++ (with (flake.pkgs "self"); [ + nimlangserver + nph + ]); }; } diff --git a/pkgs/nph/default.nix b/pkgs/nph/default.nix new file mode 100644 index 0000000..2d8f263 --- /dev/null +++ b/pkgs/nph/default.nix @@ -0,0 +1,14 @@ +{ fetchFromGitHub, buildNimPackage }: +buildNimPackage (finalAttrs: { + pname = "nph"; + version = "0.6.0"; + src = fetchFromGitHub { + owner = "arnetheduck"; + repo = "nph"; + rev = "v${finalAttrs.version}"; + hash = "sha256-9t5VeGsxyytGdu7+Uv/J+x6bmeB5+eQapbyp30iPxqs="; + }; + + doCheck = false; +} +)