tangled
alpha
login
or
join now
dunkirk.sh
/
dots
3
fork
atom
Kieran's opinionated (and probably slightly dumb) nix config
3
fork
atom
overview
issues
pulls
pipelines
feat: fix deploy rs
dunkirk.sh
2 months ago
494e595a
adb4d72b
verified
This commit was signed with the committer's
known signature
.
dunkirk.sh
SSH Key Fingerprint:
SHA256:DqcG0RXYExE26KiWo3VxJnsxswN1QNfTBvB+bdSpk80=
+49
-1
3 changed files
expand all
collapse all
unified
split
.github
workflows
deploy.yaml
flake.nix
patches
deploy-rs-nix-2.33.patch
+1
-1
.github/workflows/deploy.yaml
···
38
38
39
39
- name: Deploy all configurations
40
40
run: |
41
41
-
nix run github:serokell/deploy-rs -- \
41
41
+
nix run .#deploy-rs -- \
42
42
--skip-checks \
43
43
--remote-build \
44
44
--ssh-user kierank \
+23
flake.nix
···
130
130
}@inputs:
131
131
let
132
132
outputs = inputs.self.outputs;
133
133
+
133
134
unstable-overlays = {
134
135
nixpkgs.overlays = [
135
136
(final: prev: {
···
267
268
268
269
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;
269
270
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt-tree;
271
271
+
272
272
+
# Patched deploy-rs for Nix 2.33 compatibility
273
273
+
packages.x86_64-linux.deploy-rs = deploy-rs.packages.x86_64-linux.deploy-rs.overrideAttrs (oldAttrs: {
274
274
+
patches = (oldAttrs.patches or []) ++ [ ./patches/deploy-rs-nix-2.33.patch ];
275
275
+
});
276
276
+
packages.aarch64-linux.deploy-rs = deploy-rs.packages.aarch64-linux.deploy-rs.overrideAttrs (oldAttrs: {
277
277
+
patches = (oldAttrs.patches or []) ++ [ ./patches/deploy-rs-nix-2.33.patch ];
278
278
+
});
279
279
+
packages.aarch64-darwin.deploy-rs = deploy-rs.packages.aarch64-darwin.deploy-rs.overrideAttrs (oldAttrs: {
280
280
+
patches = (oldAttrs.patches or []) ++ [ ./patches/deploy-rs-nix-2.33.patch ];
281
281
+
});
282
282
+
283
283
+
# Dev shells with patched deploy-rs
284
284
+
devShells.aarch64-darwin.default = nixpkgs.legacyPackages.aarch64-darwin.mkShell {
285
285
+
packages = [ outputs.packages.aarch64-darwin.deploy-rs ];
286
286
+
};
287
287
+
devShells.x86_64-linux.default = nixpkgs.legacyPackages.x86_64-linux.mkShell {
288
288
+
packages = [ outputs.packages.x86_64-linux.deploy-rs ];
289
289
+
};
290
290
+
devShells.aarch64-linux.default = nixpkgs.legacyPackages.aarch64-linux.mkShell {
291
291
+
packages = [ outputs.packages.aarch64-linux.deploy-rs ];
292
292
+
};
270
293
271
294
# Deploy-rs configurations
272
295
deploy.nodes = {
+25
patches/deploy-rs-nix-2.33.patch
···
1
1
+
diff --git a/src/push.rs b/src/push.rs
2
2
+
index a206afc..68a421c 100644
3
3
+
--- a/src/push.rs
4
4
+
+++ b/src/push.rs
5
5
+
@@ -221,7 +221,8 @@ pub async fn build_profile(data: PushProfileData<'_>) -> Result<(), PushProfileE
6
6
+
let mut show_derivation_command = Command::new("nix");
7
7
+
8
8
+
show_derivation_command
9
9
+
- .arg("show-derivation")
10
10
+
+ .arg("derivation")
11
11
+
+ .arg("show")
12
12
+
.arg(&data.deploy_data.profile.profile_settings.path);
13
13
+
14
14
+
let show_derivation_output = show_derivation_command
15
15
+
@@ -241,6 +242,10 @@ pub async fn build_profile(data: PushProfileData<'_>) -> Result<(), PushProfileE
16
16
+
.map_err(PushProfileError::ShowDerivationParse)?;
17
17
+
18
18
+
let deriver_key = derivation_info
19
19
+
+ .get("derivations")
20
20
+
+ .ok_or(PushProfileError::ShowDerivationEmpty)?
21
21
+
+ .as_object()
22
22
+
+ .ok_or(PushProfileError::ShowDerivationEmpty)?
23
23
+
.keys()
24
24
+
.next()
25
25
+
.ok_or(PushProfileError::ShowDerivationEmpty)?;