From a508ec48cefad630e6bd66a1708dd5ec2c203e41 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sat, 14 Sep 2024 11:14:03 -0500 Subject: [PATCH] overlays aren't worth the trouble --- lib/default.nix | 5 +- modules/languages/nim.nix | 2 +- overlays/nimble/default.nix | 13 -- overlays/nimlangserver/default.nix | 14 -- overlays/nimlangserver/lock.json | 220 ----------------------- pkgs/default.nix | 6 + pkgs/nim/nimble/default.nix | 20 +++ pkgs/nim/nimble/lock.json | 28 +++ pkgs/{ => nim}/nimlangserver/default.nix | 0 pkgs/{ => nim}/nimlangserver/lock.json | 0 pkgs/{ => nim}/nph/default.nix | 0 11 files changed, 58 insertions(+), 250 deletions(-) delete mode 100644 overlays/nimble/default.nix delete mode 100644 overlays/nimlangserver/default.nix delete mode 100644 overlays/nimlangserver/lock.json create mode 100644 pkgs/default.nix create mode 100644 pkgs/nim/nimble/default.nix create mode 100644 pkgs/nim/nimble/lock.json rename pkgs/{ => nim}/nimlangserver/default.nix (100%) rename pkgs/{ => nim}/nimlangserver/lock.json (100%) rename pkgs/{ => nim}/nph/default.nix (100%) diff --git a/lib/default.nix b/lib/default.nix index 1a4946f..cd4d74b 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -45,8 +45,8 @@ let default = oizys-nim; oizys-nim = pkgs.callPackage ../pkgs/oizys-nim { }; oizys-go = pkgs.callPackage ../pkgs/oizys { }; - nimlangserver = pkgs.callPackage ../pkgs/nimlangserver { }; - nph = pkgs.callPackage ../pkgs/nph { }; + # nimlangserver = pkgs.callPackage ../pkgs/nimlangserver { }; + # nph = pkgs.callPackage ../pkgs/nph { }; iso = mkIso.config.system.build.isoImage; # roc = (pkgsFromSystem pkgs.system "roc").full; } @@ -55,6 +55,7 @@ let "f1multiviewer" "tsm" ]) + // (import ../pkgs { inherit pkgs; }) ); devShells = forAllSystems (pkgs: { diff --git a/modules/languages/nim.nix b/modules/languages/nim.nix index b4d30aa..f157e9a 100644 --- a/modules/languages/nim.nix +++ b/modules/languages/nim.nix @@ -14,11 +14,11 @@ in environment.systemPackages = (with pkgs; [ nim - nimble ]) ++ (with (flake.pkgs "self"); [ nimlangserver nph + nimble ]); }; } diff --git a/overlays/nimble/default.nix b/overlays/nimble/default.nix deleted file mode 100644 index 8478efa..0000000 --- a/overlays/nimble/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ ... }: -(final: prev: { - nimble = prev.nimble.overrideNimAttrs rec { - version = "0.16.0"; - - src = final.fetchFromGitHub { - owner = "nim-lang"; - repo = "nimble"; - rev = "v${version}"; - hash = "sha256-nsQAUe+soRkWAFPYP5LftBCvQdkC1SpiIORscDsPQB4="; - }; - }; -}) diff --git a/overlays/nimlangserver/default.nix b/overlays/nimlangserver/default.nix deleted file mode 100644 index d4ef4cc..0000000 --- a/overlays/nimlangserver/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: -(final: prev: { - nimlangserver = prev.nimlangserver.overrideNimAttrs rec { - version = "1.4.0"; - - lockFile = ./lock.json; - src = final.fetchFromGitHub { - owner = "nim-lang"; - repo = "langserver"; - rev = "v${version}"; - hash = "sha256-mh+p8t8/mbZvgsJ930lXkcBdUjjioZoNyNZzwywAiUI="; - }; - }; -}) diff --git a/overlays/nimlangserver/lock.json b/overlays/nimlangserver/lock.json deleted file mode 100644 index c536d82..0000000 --- a/overlays/nimlangserver/lock.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "depends": [ - { - "method": "fetchzip", - "path": "/nix/store/l4zs1l1yw4yhf1f8q7r5x5z2szjygr6d-source", - "rev": "ba143e029f35fd9b4cd3d89d007cc834d0d5ba3c", - "sha256": "1lv3l9c4ifqzlfgpwpvpq2z3994zz1nirg8f59xrnfb7zgbv8l3i", - "srcDir": "", - "url": "https://github.com/status-im/nim-chronos/archive/ba143e029f35fd9b4cd3d89d007cc834d0d5ba3c.tar.gz", - "subDir": "", - "packages": [ - "chronos" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/q42j4w2f70qfihcrpzgl3fspxihfsadb-source", - "rev": "c0ae9e10a9238883d18226fa28a5435c4d305e45", - "sha256": "0dxhjg5nf4sc4ga2zrxqcmr1v3ki9irkl603x0y3pz5sd8jdi731", - "srcDir": "", - "url": "https://github.com/status-im/nim-stint/archive/c0ae9e10a9238883d18226fa28a5435c4d305e45.tar.gz", - "subDir": "", - "packages": [ - "stint" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/jmgpadmdabybhij1srd81xfr873zgfmm-source", - "rev": "5065d2cf18dcb9812e25cc0e2c50eb357bde04cf", - "sha256": "069fw3h9cjn0hab9vhfri8ibld7yihb8ggyg1nv5vxz6i3x026m5", - "srcDir": "", - "url": "https://github.com/status-im/nim-http-utils/archive/5065d2cf18dcb9812e25cc0e2c50eb357bde04cf.tar.gz", - "subDir": "", - "packages": [ - "httputils" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/wdj38hf9hdyb1skgb6v0z00kxkdmnq04-source", - "rev": "b178f47527074964f76c395ad0dfc81cf118f379", - "sha256": "1ir20z9m4wmm0bs2dd2qiq75w0x3skv0yj7sqp6bqfh98ni44xdc", - "srcDir": "", - "url": "https://github.com/status-im/nim-unittest2/archive/b178f47527074964f76c395ad0dfc81cf118f379.tar.gz", - "subDir": "", - "packages": [ - "unittest2" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/yad26q3iv3r2lw9xs655kyx3hvflxi1p-source", - "rev": "2c3ae3137f3c9cb48134285bd4a47186fa51f0e8", - "sha256": "09pkxzsnahljkqyp540v1wwiqcnbkz5ji5bz9q9cwn3axpmqc3v7", - "srcDir": "", - "url": "https://github.com/status-im/nim-websock/archive/2c3ae3137f3c9cb48134285bd4a47186fa51f0e8.tar.gz", - "subDir": "", - "packages": [ - "websock" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/siwfngb840kcdjdviy5rhlpvdpkw14sk-source", - "rev": "8bfd753649aa7e870ec45e93f1453d3bfcf66733", - "sha256": "0hvs4kfr4aais7ixvh9d7na2r2zjnvaw3m3rpklafn9qld2wpaav", - "srcDir": "src", - "url": "https://github.com/status-im/news/archive/8bfd753649aa7e870ec45e93f1453d3bfcf66733.tar.gz", - "subDir": "", - "packages": [ - "news" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/ss096qz8svm5my0mjhk3imyrc2nm2x0y-source", - "rev": "4d541ec43454809904fc4c3c0a7436410ad597d2", - "sha256": "1a5x0fsxxkqpambz9q637dz0jrzv9q1jb3cya12k6106vc65lyf8", - "srcDir": "", - "url": "https://github.com/status-im/nim-serialization/archive/4d541ec43454809904fc4c3c0a7436410ad597d2.tar.gz", - "subDir": "", - "packages": [ - "serialization" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/90rwcr71bq13cid74v4aazikv2s924r1-source", - "rev": "d9400ddea08341a65102cffdb693d3a7131efef4", - "sha256": "0gkmh63izhp0bxyfmwfvyp81bxnzwnc3r7nxr5a05xpl8crk85w2", - "srcDir": "", - "url": "https://github.com/status-im/nim-stew/archive/d9400ddea08341a65102cffdb693d3a7131efef4.tar.gz", - "subDir": "", - "packages": [ - "stew" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/4nj341ypj07hjvxv0462wpnywhkj02b5-source", - "rev": "422971502bd641703bf78a27cb20429e77fcfb8b", - "sha256": "0snzh904f8f3wn33liy6817q9ccx8mvsl88blhr49qh69mzbgnba", - "srcDir": "", - "url": "https://github.com/status-im/nim-faststreams/archive/422971502bd641703bf78a27cb20429e77fcfb8b.tar.gz", - "subDir": "", - "packages": [ - "faststreams" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/qkwz2w5haw8px691c6gkklvxxp38j9d3-source", - "rev": "2f95909c767605e06670dc70f5cffd6b9284f192", - "sha256": "1qdq9wpm6xahqczmvdn3a7yvvrw5x42ylvzmbybdwjzd8vmgg0zv", - "srcDir": "", - "url": "https://github.com/zevv/with/archive/2f95909c767605e06670dc70f5cffd6b9284f192.tar.gz", - "subDir": "", - "packages": [ - "with" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/hn5r1ywl4qzzjl9zj62w5m6f8bqkjn8q-source", - "rev": "dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34", - "sha256": "0fi59m8yvayzlh1ajbl98ddy43i3ikjqh3s5px16y0s3cidg4fai", - "srcDir": "", - "url": "https://github.com/status-im/nim-testutils/archive/dfc4c1b39f9ded9baf6365014de2b4bfb4dafc34.tar.gz", - "subDir": "", - "packages": [ - "testutils" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/szg3jxcg0bf6zv224nyisqhnibkd2pxw-source", - "rev": "c8a5cbe26917e6716b1597dae2d08166f3ce789a", - "sha256": "1l1y4psbcd5w68j1zz172rlwsk7jxbwlr14r2kwnkj7xc7lfwlnx", - "srcDir": "", - "url": "https://github.com/yyoncho/nim-json-rpc/archive/c8a5cbe26917e6716b1597dae2d08166f3ce789a.tar.gz", - "subDir": "", - "packages": [ - "json_rpc" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/dnj20qh97ylf57nka9wbxs735wbw7yxv-source", - "rev": "4014ef939b51e02053c2e16dd3481d47bc9267dd", - "sha256": "1kgqr2lqaffglc1fgbanwcvhkqcbbd20d5b6w4lf0nksfl9c357a", - "srcDir": "", - "url": "https://github.com/cheatfate/nimcrypto/archive/4014ef939b51e02053c2e16dd3481d47bc9267dd.tar.gz", - "subDir": "", - "packages": [ - "nimcrypto" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/drj65wylnxdbv4jqhymf7biiyjfb75v8-source", - "rev": "9372f27a25d0718d3527afad6cc936f6a853f86e", - "sha256": "152zbyqx12fmmjl4wn6kqqk1jzp1ywm4xvjd28ll9037f1pyd5ic", - "srcDir": "", - "url": "https://github.com/status-im/nim-bearssl/archive/9372f27a25d0718d3527afad6cc936f6a853f86e.tar.gz", - "subDir": "", - "packages": [ - "bearssl" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/h0xl7qnw7bh513rb24k1n805x3n1rimw-source", - "rev": "d9394dc7286064902d825bbc1203d03d7218633a", - "sha256": "102m7jaxjip24a6hrnk0nvfb0vmdx5zq4m9i4xyzq8m782xyqp94", - "srcDir": "", - "url": "https://github.com/status-im/nim-json-serialization/archive/d9394dc7286064902d825bbc1203d03d7218633a.tar.gz", - "subDir": "", - "packages": [ - "json_serialization" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/ffz78k6z9wf8vj2kv1jdj5dq2rxf61j7-source", - "rev": "2a2681b60289aaf7895b7056f22616081eb1a882", - "sha256": "0n8awgrmn9f6vd7ibv1jlyxk61lrs7hc51fghilrw6g6xq5w9rxq", - "srcDir": "", - "url": "https://github.com/status-im/nim-chronicles/archive/2a2681b60289aaf7895b7056f22616081eb1a882.tar.gz", - "subDir": "", - "packages": [ - "chronicles" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/51nf7pb5cwg2n441ka6w6g6c4hdjsdj4-source", - "rev": "bb01d965a2ad0f08eaff6a53874f028ddbab4909", - "sha256": "0v4n7maskd07qsx8rsr9v0bs7nzbncmvxsn7j9jsk9azcy803v49", - "srcDir": "", - "url": "https://github.com/nickysn/asynctools/archive/bb01d965a2ad0f08eaff6a53874f028ddbab4909.tar.gz", - "subDir": "", - "packages": [ - "asynctools" - ] - }, - { - "method": "fetchzip", - "path": "/nix/store/br78rad2jnl6zka2q89qi6pkfiyn10fv-source", - "rev": "f34ca261efd90f118dc1647beefd2f7a69b05d93", - "sha256": "1k8y7m1ry1z8jm8hj8pa3vlqprshaa59cdwq2a4acrfw9ks5w482", - "srcDir": "", - "url": "https://github.com/status-im/nim-zlib/archive/f34ca261efd90f118dc1647beefd2f7a69b05d93.tar.gz", - "subDir": "", - "packages": [ - "zlib" - ] - } - ] -} \ No newline at end of file diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..73091cc --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: +{ + nph = pkgs.callPackage ./nim/nph { }; + nimlangserver = pkgs.callPackage ./nim/nimlangserver { }; + nimble = pkgs.callPackage ./nim/nimble { }; +} diff --git a/pkgs/nim/nimble/default.nix b/pkgs/nim/nimble/default.nix new file mode 100644 index 0000000..0c8d04a --- /dev/null +++ b/pkgs/nim/nimble/default.nix @@ -0,0 +1,20 @@ +{ + fetchFromGitHub, + buildNimPackage, + # deps + openssl, + +}: +buildNimPackage (finalAttrs: { + pname = "nimble"; + version = "0.16.1"; + src = fetchFromGitHub { + owner = "nim-lang"; + repo = "nimble"; + rev = "v${finalAttrs.version}"; + hash = "sha256-sa0irAZjQRZLduEMBPf7sHlY1FigBJTR/vIH4ihii/w="; + }; + buildInputs = [ openssl ]; + lockFile = ./lock.json; + doCheck = false; +}) diff --git a/pkgs/nim/nimble/lock.json b/pkgs/nim/nimble/lock.json new file mode 100644 index 0000000..14fde9f --- /dev/null +++ b/pkgs/nim/nimble/lock.json @@ -0,0 +1,28 @@ +{ + "depends": [ + { + "method": "fetchzip", + "path": "/nix/store/6aph9sfwcws7pd2725fwjnibdfrv7qmw-source", + "rev": "f8f6bd34bfa3fe12c64b919059ad856a96efcba0", + "sha256": "11m1rb6rzk70kvskppf97ddzgf5fnh9crjziqc6hib0jgsm5d615", + "srcDir": "src", + "url": "https://github.com/nim-lang/checksums/archive/f8f6bd34bfa3fe12c64b919059ad856a96efcba0.tar.gz", + "subDir": "", + "packages": [ + "checksums" + ] + }, + { + "method": "fetchzip", + "path": "/nix/store/lwg9fm34h5xv0dvxij9r5m2y6pn1zsvx-source", + "rev": "faf1617f44d7632ee9601ebc13887644925dcc01", + "sha256": "1dxbc41wbvkpdp6q3qz1r38lpn32447qkkgyh2s12ym6bx4ynni4", + "srcDir": "src", + "url": "https://github.com/nim-lang/sat/archive/faf1617f44d7632ee9601ebc13887644925dcc01.tar.gz", + "subDir": "", + "packages": [ + "sat" + ] + } + ] +} diff --git a/pkgs/nimlangserver/default.nix b/pkgs/nim/nimlangserver/default.nix similarity index 100% rename from pkgs/nimlangserver/default.nix rename to pkgs/nim/nimlangserver/default.nix diff --git a/pkgs/nimlangserver/lock.json b/pkgs/nim/nimlangserver/lock.json similarity index 100% rename from pkgs/nimlangserver/lock.json rename to pkgs/nim/nimlangserver/lock.json diff --git a/pkgs/nph/default.nix b/pkgs/nim/nph/default.nix similarity index 100% rename from pkgs/nph/default.nix rename to pkgs/nim/nph/default.nix