on master help sign in
build(nix): fetch submodules lazily
6dddd5cYusuf Bera Ertan
flake.lock+9−28
@@ -31,24 +31,6 @@
31 "type": "github"
31 "type": "github"
32 }
32 }
33 },
33 },
34− "helix": {
35− "flake": false,
36− "locked": {
37− "lastModified": 1624077450,
38− "narHash": "sha256-gcL519tetuEv0N+oBP8X3U4bPjwcAgzbPdgwW19qeVI=",
39− "ref": "master",
40− "rev": "1c2585202145467f0fde7ad9c571e462081c3656",
41− "revCount": 894,
42− "submodules": true,
43− "type": "git",
44− "url": "https://github.com/helix-editor/helix.git"
45− },
46− "original": {
47− "submodules": true,
48− "type": "git",
49− "url": "https://github.com/helix-editor/helix.git"
50− }
51− },
52 "nixCargoIntegration": {
34 "nixCargoIntegration": {
53 "inputs": {
35 "inputs": {
54 "devshell": "devshell",
36 "devshell": "devshell",
@@ -58,11 +40,11 @@
58 "rustOverlay": "rustOverlay"
40 "rustOverlay": "rustOverlay"
59 },
41 },
60 "locked": {
42 "locked": {
61− "lastModified": 1624070370,
43+ "lastModified": 1624244973,
62− "narHash": "sha256-sfFqfmerCYvk0jDeP1gfuskz7AaqDsgV8aiQrEUGdsc=",
44+ "narHash": "sha256-h+b4CwPjyibgwMYAeBaT5qBnxI0fsmGf66k23FqEH5Y=",
63 "owner": "yusdacra",
45 "owner": "yusdacra",
64 "repo": "nix-cargo-integration",
46 "repo": "nix-cargo-integration",
65− "rev": "85e6c1ba4c0e3e6dec5a7d1f65bcc036d2ea6ae3",
47+ "rev": "00f5df6d8e7eeeac2764b7fa2c57e2e81f5d47cd",
66 "type": "github"
48 "type": "github"
67 },
49 },
68 "original": {
50 "original": {
@@ -73,11 +55,11 @@
73 },
55 },
74 "nixpkgs": {
56 "nixpkgs": {
75 "locked": {
57 "locked": {
76− "lastModified": 1623580589,
58+ "lastModified": 1624024598,
77− "narHash": "sha256-Ayp1cjXpwFCkAiWUE46rj9APTltsiEBdIs2+cj+U7+c=",
59+ "narHash": "sha256-X++38oH5MKEmPW4/2WdMaHQvwJzO8pJfbnzMD7DbG1E=",
78 "owner": "nixos",
60 "owner": "nixos",
79 "repo": "nixpkgs",
61 "repo": "nixpkgs",
80− "rev": "fa0326ce5233f7d592271df52c9d0812bec47b84",
62+ "rev": "33d42ad7cf2769ce6364ed4e52afa8e9d1439d58",
81 "type": "github"
63 "type": "github"
82 },
64 },
83 "original": {
65 "original": {
@@ -90,7 +72,6 @@
90 "root": {
72 "root": {
91 "inputs": {
73 "inputs": {
92 "flakeCompat": "flakeCompat",
74 "flakeCompat": "flakeCompat",
93− "helix": "helix",
94 "nixCargoIntegration": "nixCargoIntegration",
75 "nixCargoIntegration": "nixCargoIntegration",
95 "nixpkgs": "nixpkgs"
76 "nixpkgs": "nixpkgs"
96 }
77 }
@@ -98,11 +79,11 @@
98 "rustOverlay": {
79 "rustOverlay": {
99 "flake": false,
80 "flake": false,
100 "locked": {
81 "locked": {
101− "lastModified": 1624069337,
82+ "lastModified": 1624242197,
102− "narHash": "sha256-9mTcx7osE4biF2Hm/GU19s1T3+KvphWj4QaUcJh39lU=",
83+ "narHash": "sha256-J0+j4DYFaE0O0marb4QN/S1bUhpGwAjQ4O04kIYKcb8=",
103 "owner": "oxalica",
84 "owner": "oxalica",
104 "repo": "rust-overlay",
85 "repo": "rust-overlay",
105− "rev": "67dc2a9543a7c24591e6cb102ad0121c3a704aab",
86+ "rev": "df5d330f34b64194d64dcbafb91e82e01a89a229",
106 "type": "github"
87 "type": "github"
107 },
88 },
108 "original": {
89 "original": {
flake.nix+22−15
@@ -11,15 +11,9 @@
11 url = "github:edolstra/flake-compat";
11 url = "github:edolstra/flake-compat";
12 flake = false;
12 flake = false;
13 };
13 };
14− helix = {
15− url = "https://github.com/helix-editor/helix.git";
16− type = "git";
17− flake = false;
18− submodules = true;
19− };
20 };
14 };
21
15
22− outputs = inputs@{ nixCargoIntegration, helix, ... }:
16+ outputs = inputs@{ self, nixCargoIntegration, ... }:
23 nixCargoIntegration.lib.makeOutputs {
17 nixCargoIntegration.lib.makeOutputs {
24 root = ./.;
18 root = ./.;
25 buildPlatform = "crate2nix";
19 buildPlatform = "crate2nix";
@@ -29,18 +23,31 @@
29 defaultOutputs = { app = "hx"; package = "helix"; };
23 defaultOutputs = { app = "hx"; package = "helix"; };
30 overrides = {
24 overrides = {
31 crateOverrides = common: _: {
25 crateOverrides = common: _: {
26+ helix-term = prev: {
27+ # link languages and theme toml files since helix-term expects them (for tests)
28+ preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml} ..";
32− helix-term = prev: { buildInputs = (prev.buildInputs or [ ]) ++ [ common.cCompiler.cc.lib ]; };
29+ buildInputs = (prev.buildInputs or [ ]) ++ [ common.cCompiler.cc.lib ];
30+ };
33 # link runtime since helix-core expects it because of embed_runtime feature
31 # link runtime since helix-core expects it because of embed_runtime feature
34 helix-core = _: { preConfigure = "ln -s ${common.root + "/runtime"} ../runtime"; };
32 helix-core = _: { preConfigure = "ln -s ${common.root + "/runtime"} ../runtime"; };
35 # link languages and theme toml files since helix-view expects them
33 # link languages and theme toml files since helix-view expects them
36 helix-view = _: { preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml} .."; };
34 helix-view = _: { preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml} .."; };
37− helix-syntax = prev: {
35+ helix-syntax = prev:
36+ let
37+ helix = common.pkgs.fetchgit {
38+ url = "https://github.com/helix-editor/helix.git";
39+ rev = "9fd17d4ff5b81211317da1a28d2b30442a512ffc";
40+ fetchSubmodules = true;
41+ sha256 = "sha256-y652sn/tCc1XoKr3YxDZv6bS2Cmr6+9K/wzzNAMFZJw=";
42+ };
43+ in
44+ {
38− src = common.pkgs.runCommand prev.src.name { } ''
45+ src = common.pkgs.runCommand prev.src.name { } ''
39− mkdir -p $out
46+ mkdir -p $out
40− ln -s ${prev.src}/* $out
47+ ln -s ${prev.src}/* $out
41− ln -sf ${helix}/helix-syntax/languages $out
48+ ln -sf ${helix}/helix-syntax/languages $out
42− '';
49+ '';
43− };
50+ };
44 };
51 };
45 shell = common: prev: {
52 shell = common: prev: {
46 packages = prev.packages ++ (with common.pkgs; [ lld_10 lldb ]);
53 packages = prev.packages ++ (with common.pkgs; [ lld_10 lldb ]);