on master help sign in
use latest nix-cargo-integration which depends on dream2nix (#1758)
f31e85aMichael Davis
flake.lock+119−10
@@ -1,12 +1,35 @@
1{
1{
2 "nodes": {
2 "nodes": {
3+ "crane": {
4+ "flake": false,
5+ "locked": {
6+ "lastModified": 1644785799,
7+ "narHash": "sha256-VpAJO1L0XeBvtCuNGK4IDKp6ENHIpTrlaZT7yfBCvwo=",
8+ "owner": "ipetkov",
9+ "repo": "crane",
10+ "rev": "fc7a94f841347c88f2cb44217b2a3faa93e2a0b2",
11+ "type": "github"
12+ },
13+ "original": {
14+ "owner": "ipetkov",
15+ "repo": "crane",
16+ "type": "github"
17+ }
18+ },
3 "devshell": {
19 "devshell": {
20+ "inputs": {
21+ "flake-utils": "flake-utils",
22+ "nixpkgs": [
23+ "nixCargoIntegration",
24+ "nixpkgs"
25+ ]
26+ },
4 "locked": {
27 "locked": {
5− "lastModified": 1641980203,
28+ "lastModified": 1646322147,
6− "narHash": "sha256-RiWJ3+6V267Ji+P54K1Xrj1Nsah9BfG/aLfIhqgVyBY=",
29+ "narHash": "sha256-XwrdjThHPq/APV7B6mXJwYvN/3RmsjX1W4zPgjvCp0A=",
7 "owner": "numtide",
30 "owner": "numtide",
8 "repo": "devshell",
31 "repo": "devshell",
9− "rev": "d897c1ddb4eab66cc2b783c7868d78555b9880ad",
32+ "rev": "2cc45675b223a35ca1d8af6383752c3d4b66f484",
10 "type": "github"
33 "type": "github"
11 },
34 },
12 "original": {
35 "original": {
@@ -15,7 +38,73 @@
15 "type": "github"
38 "type": "github"
16 }
39 }
17 },
40 },
41+ "dream2nix": {
42+ "inputs": {
43+ "alejandra": [
44+ "nixCargoIntegration",
45+ "nixpkgs"
46+ ],
47+ "crane": "crane",
48+ "flake-utils-pre-commit": [
49+ "nixCargoIntegration",
50+ "nixpkgs"
51+ ],
52+ "gomod2nix": [
53+ "nixCargoIntegration",
54+ "nixpkgs"
55+ ],
56+ "mach-nix": [
57+ "nixCargoIntegration",
58+ "nixpkgs"
59+ ],
60+ "nixpkgs": [
61+ "nixCargoIntegration",
62+ "nixpkgs"
63+ ],
64+ "node2nix": [
65+ "nixCargoIntegration",
66+ "nixpkgs"
67+ ],
68+ "poetry2nix": [
69+ "nixCargoIntegration",
70+ "nixpkgs"
71+ ],
72+ "pre-commit-hooks": [
73+ "nixCargoIntegration",
74+ "nixpkgs"
75+ ]
76+ },
77+ "locked": {
78+ "lastModified": 1646647374,
79+ "narHash": "sha256-sFGoE9LbHfP5t8NGcNkX4sPVq9kp8+ae8ODnW5eOkzo=",
80+ "owner": "nix-community",
81+ "repo": "dream2nix",
82+ "rev": "76412363073ea1252700eb48901849cf8480e138",
83+ "type": "github"
84+ },
85+ "original": {
86+ "owner": "nix-community",
87+ "ref": "main",
88+ "repo": "dream2nix",
89+ "type": "github"
90+ }
91+ },
18 "flake-utils": {
92 "flake-utils": {
93+ "locked": {
94+ "lastModified": 1642700792,
95+ "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
96+ "owner": "numtide",
97+ "repo": "flake-utils",
98+ "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
99+ "type": "github"
100+ },
101+ "original": {
102+ "owner": "numtide",
103+ "repo": "flake-utils",
104+ "type": "github"
105+ }
106+ },
107+ "flake-utils_2": {
19 "locked": {
108 "locked": {
20 "lastModified": 1637014545,
109 "lastModified": 1637014545,
21 "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
110 "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
@@ -30,9 +119,28 @@
30 "type": "github"
119 "type": "github"
31 }
120 }
32 },
121 },
122+ "helix": {
123+ "flake": false,
124+ "locked": {
125+ "lastModified": 1646500939,
126+ "narHash": "sha256-M0QvrRuluDkBWUfd5CYwvj9WtgalKlm5stJUAwnhrwI=",
127+ "ref": "master",
128+ "rev": "7633c5acd30258fc9caca926bfaa264d07d508ec",
129+ "revCount": 2438,
130+ "submodules": true,
131+ "type": "git",
132+ "url": "https://github.com/helix-editor/helix.git"
133+ },
134+ "original": {
135+ "submodules": true,
136+ "type": "git",
137+ "url": "https://github.com/helix-editor/helix.git"
138+ }
139+ },
33 "nixCargoIntegration": {
140 "nixCargoIntegration": {
34 "inputs": {
141 "inputs": {
35 "devshell": "devshell",
142 "devshell": "devshell",
143+ "dream2nix": "dream2nix",
36 "nixpkgs": [
144 "nixpkgs": [
37 "nixpkgs"
145 "nixpkgs"
38 ],
146 ],
@@ -41,11 +149,11 @@
41 ]
149 ]
42 },
150 },
43 "locked": {
151 "locked": {
44− "lastModified": 1642054253,
152+ "lastModified": 1646681124,
45− "narHash": "sha256-kHh9VmaB7gbS6pheheC4x0uT84LEmhfbsbWEQJgU2E4=",
153+ "narHash": "sha256-1ytR1z6RyBbxhk0LiO18QBH6Mu1JfAEWuUVBdbD4Bw8=",
46 "owner": "yusdacra",
154 "owner": "yusdacra",
47 "repo": "nix-cargo-integration",
155 "repo": "nix-cargo-integration",
48− "rev": "f8fa9af990195a3f63fe2dde84aa187e193da793",
156+ "rev": "3b08d21177cecd5d69bdf76400a6145a021d1e49",
49 "type": "github"
157 "type": "github"
50 },
158 },
51 "original": {
159 "original": {
@@ -56,11 +164,11 @@
56 },
164 },
57 "nixpkgs": {
165 "nixpkgs": {
58 "locked": {
166 "locked": {
59− "lastModified": 1641887635,
167+ "lastModified": 1646254136,
60− "narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=",
168+ "narHash": "sha256-8nQx02tTzgYO21BP/dy5BCRopE8OwE8Drsw98j+Qoaw=",
61 "owner": "nixos",
169 "owner": "nixos",
62 "repo": "nixpkgs",
170 "repo": "nixpkgs",
63− "rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88",
171+ "rev": "3e072546ea98db00c2364b81491b893673267827",
64 "type": "github"
172 "type": "github"
65 },
173 },
66 "original": {
174 "original": {
@@ -72,6 +180,7 @@
72 },
180 },
73 "root": {
181 "root": {
74 "inputs": {
182 "inputs": {
183+ "helix": "helix",
75 "nixCargoIntegration": "nixCargoIntegration",
184 "nixCargoIntegration": "nixCargoIntegration",
76 "nixpkgs": "nixpkgs",
185 "nixpkgs": "nixpkgs",
77 "rust-overlay": "rust-overlay"
186 "rust-overlay": "rust-overlay"
@@ -79,7 +188,7 @@
79 },
188 },
80 "rust-overlay": {
189 "rust-overlay": {
81 "inputs": {
190 "inputs": {
82− "flake-utils": "flake-utils",
191+ "flake-utils": "flake-utils_2",
83 "nixpkgs": [
192 "nixpkgs": [
84 "nixpkgs"
193 "nixpkgs"
85 ]
194 ]
flake.nix+29−52
@@ -12,68 +12,45 @@
12 inputs.nixpkgs.follows = "nixpkgs";
12 inputs.nixpkgs.follows = "nixpkgs";
13 inputs.rustOverlay.follows = "rust-overlay";
13 inputs.rustOverlay.follows = "rust-overlay";
14 };
14 };
15+ # NOTE: the flake looks like it is hanging when it pulls this input because
16+ # the submodules take a long time to clone. This will be fixed in #1659.
17+ helix = {
18+ url = "https://github.com/helix-editor/helix.git";
19+ type = "git";
20+ submodules = true;
21+ flake = false;
22+ };
15 };
23 };
16
24
17− outputs = inputs@{ self, nixCargoIntegration, ... }:
25+ outputs = inputs@{ nixCargoIntegration, helix, ... }:
18 nixCargoIntegration.lib.makeOutputs {
26 nixCargoIntegration.lib.makeOutputs {
19 root = ./.;
27 root = ./.;
20− buildPlatform = "crate2nix";
21 renameOutputs = { "helix-term" = "helix"; };
28 renameOutputs = { "helix-term" = "helix"; };
22 # Set default app to hx (binary is from helix-term release build)
29 # Set default app to hx (binary is from helix-term release build)
23 # Set default package to helix-term release build
30 # Set default package to helix-term release build
24− defaultOutputs = { app = "hx"; package = "helix"; };
31+ defaultOutputs = {
32+ app = "hx";
33+ package = "helix";
34+ };
25 overrides = {
35 overrides = {
26 crateOverrides = common: _: rec {
36 crateOverrides = common: _: rec {
27− # link languages and theme toml files since helix-core/helix-view expects them
37+ helix-term = prev: {
28− helix-core = _: { preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml,base16_theme.toml} .."; };
38+ buildInputs = (prev.buildInputs or [ ]) ++ [ common.cCompiler.cc.lib ];
29− helix-view = _: { preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml,base16_theme.toml} .."; };
39+ nativeBuildInputs = (prev.nativeBuildInputs or [ ]) ++ [ common.pkgs.makeWrapper ];
30− helix-syntax = prev: {
40+ preConfigure = ''
31− src =
41+ ${prev.preConfigure}
32− let
42+ rm -r helix-syntax/languages
33− pkgs = common.pkgs;
43+ ln -s ${helix}/helix-syntax/languages helix-syntax/languages
34− helix = pkgs.fetchgit {
35− url = "https://github.com/helix-editor/helix.git";
36− rev = "d62ad8b595a4f901b9c5dba1bb6e8f70ece395bf";
37− fetchSubmodules = true;
38− sha256 = "sha256-X0N2clg2DQQ2bwyBrZVeaXLoSKaQ7NALydnd2eJzECg=";
39− };
40− in
41− pkgs.runCommand prev.src.name { } ''
42− mkdir -p $out
43− ln -s ${prev.src}/* $out
44− ln -sf ${helix}/helix-syntax/languages $out
44+ ln -s "$PWD/helix-syntax/languages" languages
45− '';
46− preConfigure = "mkdir -p ../runtime/grammars";
45+ mkdir -p runtime/grammars
46+ '';
47− postInstall = "cp -r ../runtime $out/runtime";
47+ postInstall = ''
48+ ${prev.postInstall or ""}
49+ mkdir -p $out/lib
50+ cp -r runtime $out/lib
51+ wrapProgram "$out/bin/hx" --set HELIX_RUNTIME "$out/lib/runtime"
52+ '';
48 };
53 };
49− helix-term = prev:
50− let
51− inherit (common) pkgs lib;
52− helixSyntax = lib.buildCrate {
53− root = self;
54− memberName = "helix-syntax";
55− defaultCrateOverrides = {
56− helix-syntax = helix-syntax;
57− };
58− release = false;
59− };
60− runtimeDir = pkgs.runCommand "helix-runtime" { } ''
61− mkdir -p $out
62− ln -s ${common.root}/runtime/* $out
63− ln -sf ${helixSyntax}/runtime/grammars $out
64− '';
65− in
66− {
67− # link languages and theme toml files since helix-term expects them (for tests)
68− preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml,base16_theme.toml} ..";
69− buildInputs = (prev.buildInputs or [ ]) ++ [ common.cCompiler.cc.lib ];
70− nativeBuildInputs = [ pkgs.makeWrapper ];
71− postFixup = ''
72− if [ -f "$out/bin/hx" ]; then
73− wrapProgram "$out/bin/hx" --set HELIX_RUNTIME "${runtimeDir}"
74− fi
75− '';
76− };
77 };
54 };
78 shell = common: prev: {
55 shell = common: prev: {
79 packages = prev.packages ++ (with common.pkgs; [ lld_13 lldb cargo-tarpaulin cargo-flamegraph ]);
56 packages = prev.packages ++ (with common.pkgs; [ lld_13 lldb cargo-tarpaulin cargo-flamegraph ]);