diff --git a/pkgs/applications/terminal-emulators/nimmm/default.nix b/pkgs/applications/terminal-emulators/nimmm/default.nix index bb09fa776b62..0e0d75ab8012 100644 --- a/pkgs/applications/terminal-emulators/nimmm/default.nix +++ b/pkgs/applications/terminal-emulators/nimmm/default.nix @@ -1,30 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, nim, termbox, pcre }: +{ lib, nimPackages, fetchFromGitHub, nim, termbox, pcre }: -let - noise = fetchFromGitHub { - owner = "jangko"; - repo = "nim-noise"; - rev = "v0.1.14"; - sha256 = "0wndiphznfyb1pac6zysi3bqljwlfwj6ziarcwnpf00sw2zni449"; - }; - - nimbox = fetchFromGitHub { - owner = "dom96"; - repo = "nimbox"; - rev = "6a56e76c01481176f16ae29b7d7c526bd83f229b"; - sha256 = "15x1sdfxa1xcqnr68705jfnlv83lm0xnp2z9iz3pgc4bz5vwn4x1"; - }; - - lscolors = fetchFromGitHub { - owner = "joachimschmidt557"; - repo = "nim-lscolors"; - rev = "v0.3.3"; - sha256 = "0526hqh46lcfsvymb67ldsc8xbfn24vicn3b8wrqnh6mag8wynf4"; - }; - -in stdenv.mkDerivation rec { +nimPackages.buildNimPackage rec { pname = "nimmm"; version = "0.2.0"; + nimBinOnly = true; src = fetchFromGitHub { owner = "joachimschmidt557"; @@ -33,17 +12,8 @@ in stdenv.mkDerivation rec { sha256 = "168n61avphbxsxfq8qzcnlqx6wgvz5yrjvs14g25cg3k46hj4xqg"; }; - nativeBuildInputs = [ nim ]; - buildInputs = [ termbox pcre ]; - - buildPhase = '' - export HOME=$TMPDIR; - nim -p:${noise} -p:${nimbox} -p:${lscolors}/src c -d:release src/nimmm.nim - ''; - - installPhase = '' - install -Dt $out/bin src/nimmm - ''; + buildInputs = [ termbox pcre ] + ++ (with nimPackages; [ noise nimbox lscolors ]); meta = with lib; { description = "Terminal file manager written in nim"; diff --git a/pkgs/development/nim-packages/lscolors/default.nix b/pkgs/development/nim-packages/lscolors/default.nix new file mode 100644 index 000000000000..5a72c46e4c50 --- /dev/null +++ b/pkgs/development/nim-packages/lscolors/default.nix @@ -0,0 +1,8 @@ +{ fetchFromGitHub }: + +fetchFromGitHub { + owner = "joachimschmidt557"; + repo = "nim-lscolors"; + rev = "v0.3.3"; + sha256 = "0526hqh46lcfsvymb67ldsc8xbfn24vicn3b8wrqnh6mag8wynf4"; +} diff --git a/pkgs/development/nim-packages/nimbox/default.nix b/pkgs/development/nim-packages/nimbox/default.nix new file mode 100644 index 000000000000..53663c642810 --- /dev/null +++ b/pkgs/development/nim-packages/nimbox/default.nix @@ -0,0 +1,8 @@ +{ fetchFromGitHub }: + +fetchFromGitHub { + owner = "dom96"; + repo = "nimbox"; + rev = "6a56e76c01481176f16ae29b7d7c526bd83f229b"; + sha256 = "15x1sdfxa1xcqnr68705jfnlv83lm0xnp2z9iz3pgc4bz5vwn4x1"; +} diff --git a/pkgs/development/nim-packages/noise/default.nix b/pkgs/development/nim-packages/noise/default.nix new file mode 100644 index 000000000000..7931467dbbd5 --- /dev/null +++ b/pkgs/development/nim-packages/noise/default.nix @@ -0,0 +1,8 @@ +{ fetchFromGitHub }: + +fetchFromGitHub { + owner = "jangko"; + repo = "nim-noise"; + rev = "v0.1.14"; + sha256 = "0wndiphznfyb1pac6zysi3bqljwlfwj6ziarcwnpf00sw2zni449"; +} diff --git a/pkgs/top-level/nim-packages.nix b/pkgs/top-level/nim-packages.nix index 7e4d5a8987e3..a1cefc4fd817 100644 --- a/pkgs/top-level/nim-packages.nix +++ b/pkgs/top-level/nim-packages.nix @@ -26,12 +26,18 @@ lib.makeScope newScope (self: karax = callPackage ../development/nim-packages/karax { }; + lscolors = callPackage ../development/nim-packages/lscolors { }; + markdown = callPackage ../development/nim-packages/markdown { }; nimcrypto = callPackage ../development/nim-packages/nimcrypto { }; + nimbox = callPackage ../development/nim-packages/nimbox { }; + nimsimd = callPackage ../development/nim-packages/nimsimd { }; + noise = callPackage ../development/nim-packages/noise { }; + packedjson = callPackage ../development/nim-packages/packedjson { }; pixie = callPackage ../development/nim-packages/pixie { };