diff options
author | Minijackson <minijackson@riseup.net> | 2021-06-28 09:45:09 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2021-06-28 09:45:09 +0200 |
commit | a9b09341f7dfee811e4ae684d361ad75af255df6 (patch) | |
tree | 3f14adedb7ce45010c54acfd942420d04cc27091 | |
parent | 238d9f14525621d6c83258027c5cb627a8f497af (diff) | |
download | robotnix-config-a9b09341f7dfee811e4ae684d361ad75af255df6.tar.gz robotnix-config-a9b09341f7dfee811e4ae684d361ad75af255df6.zip |
hydra: try hydra jobs with build products
-rw-r--r-- | flake.lock | 23 | ||||
-rw-r--r-- | flake.nix | 41 |
2 files changed, 45 insertions, 19 deletions
@@ -3,7 +3,7 @@ | |||
3 | "androidPkgs": { | 3 | "androidPkgs": { |
4 | "inputs": { | 4 | "inputs": { |
5 | "flake-utils": "flake-utils", | 5 | "flake-utils": "flake-utils", |
6 | "nixpkgs": "nixpkgs" | 6 | "nixpkgs": "nixpkgs_2" |
7 | }, | 7 | }, |
8 | "locked": { | 8 | "locked": { |
9 | "lastModified": 1623960850, | 9 | "lastModified": 1623960850, |
@@ -37,6 +37,22 @@ | |||
37 | }, | 37 | }, |
38 | "nixpkgs": { | 38 | "nixpkgs": { |
39 | "locked": { | 39 | "locked": { |
40 | "lastModified": 1624656607, | ||
41 | "narHash": "sha256-jWVM6RP8WdRV1l0Z36hA/y6kl9BmasYVa9TpKkjRMLI=", | ||
42 | "owner": "NixOS", | ||
43 | "repo": "nixpkgs", | ||
44 | "rev": "b72bde7c4a1f9c9bf1a161f0c267186ce3c6483c", | ||
45 | "type": "github" | ||
46 | }, | ||
47 | "original": { | ||
48 | "owner": "NixOS", | ||
49 | "ref": "nixos-21.05", | ||
50 | "repo": "nixpkgs", | ||
51 | "type": "github" | ||
52 | } | ||
53 | }, | ||
54 | "nixpkgs_2": { | ||
55 | "locked": { | ||
40 | "lastModified": 1614989413, | 56 | "lastModified": 1614989413, |
41 | "narHash": "sha256-g503bGSdVhLu2cKR5sHG8XetLFrVUzAL3+mrnQJpmdY=", | 57 | "narHash": "sha256-g503bGSdVhLu2cKR5sHG8XetLFrVUzAL3+mrnQJpmdY=", |
42 | "owner": "NixOS", | 58 | "owner": "NixOS", |
@@ -51,7 +67,7 @@ | |||
51 | "type": "github" | 67 | "type": "github" |
52 | } | 68 | } |
53 | }, | 69 | }, |
54 | "nixpkgs_2": { | 70 | "nixpkgs_3": { |
55 | "locked": { | 71 | "locked": { |
56 | "lastModified": 1623617138, | 72 | "lastModified": 1623617138, |
57 | "narHash": "sha256-zd03k0aZWdE+JjZjVbsQGCKmc1C4HIwIbW7MbI9ym6s=", | 73 | "narHash": "sha256-zd03k0aZWdE+JjZjVbsQGCKmc1C4HIwIbW7MbI9ym6s=", |
@@ -70,7 +86,7 @@ | |||
70 | "robotnix": { | 86 | "robotnix": { |
71 | "inputs": { | 87 | "inputs": { |
72 | "androidPkgs": "androidPkgs", | 88 | "androidPkgs": "androidPkgs", |
73 | "nixpkgs": "nixpkgs_2" | 89 | "nixpkgs": "nixpkgs_3" |
74 | }, | 90 | }, |
75 | "locked": { | 91 | "locked": { |
76 | "lastModified": 1624762178, | 92 | "lastModified": 1624762178, |
@@ -88,6 +104,7 @@ | |||
88 | }, | 104 | }, |
89 | "root": { | 105 | "root": { |
90 | "inputs": { | 106 | "inputs": { |
107 | "nixpkgs": "nixpkgs", | ||
91 | "robotnix": "robotnix" | 108 | "robotnix": "robotnix" |
92 | } | 109 | } |
93 | } | 110 | } |
@@ -1,9 +1,10 @@ | |||
1 | { | 1 | { |
2 | description = "A basic example robotnix configuration"; | 2 | description = "A basic example robotnix configuration"; |
3 | 3 | ||
4 | inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05"; | ||
4 | inputs.robotnix.url = "github:danielfullmer/robotnix"; | 5 | inputs.robotnix.url = "github:danielfullmer/robotnix"; |
5 | 6 | ||
6 | outputs = { self, robotnix }: | 7 | outputs = { self, nixpkgs, robotnix }: |
7 | let | 8 | let |
8 | common = { | 9 | common = { |
9 | apps = { | 10 | apps = { |
@@ -47,21 +48,29 @@ | |||
47 | # Build other outputs with (for example): "nix build .#robotnixConfigurations.dailydriver.ota" | 48 | # Build other outputs with (for example): "nix build .#robotnixConfigurations.dailydriver.ota" |
48 | defaultPackage.x86_64-linux = self.robotnixConfigurations.fp3.img; | 49 | defaultPackage.x86_64-linux = self.robotnixConfigurations.fp3.img; |
49 | 50 | ||
50 | hydraJobs.robotnixConfigurations = { | 51 | hydraJobs.robotnixConfigurations = with nixpkgs.legacyPackages.x86_64-linux; { |
51 | fp3 = { | 52 | fp3 = with self.robotnixConfigurations.fp3; |
52 | inherit (self.robotnixConfigurations.fp3) | 53 | runCommandLocal |
53 | bootImg | 54 | "hydra-fp3-products-${config.buildNumber}" |
54 | factoryImg | 55 | { } |
55 | img | 56 | '' |
56 | ota; | 57 | mkdir -p $out/nix-support |
57 | }; | 58 | echo "file bootImg ${bootImg}" >> $out/nix-support/hydra-build-products |
58 | fp2 = { | 59 | echo "file factoryImg ${factoryImg}" >> $out/nix-support/hydra-build-products |
59 | inherit (self.robotnixConfigurations.fp2) | 60 | echo "file img ${img}" >> $out/nix-support/hydra-build-products |
60 | bootImg | 61 | echo "file ota ${ota}" >> $out/nix-support/hydra-build-products |
61 | factoryImg | 62 | ''; |
62 | img | 63 | fp2 = with self.robotnixConfigurations.fp2; |
63 | ota; | 64 | runCommandLocal |
64 | }; | 65 | "hydra-fp2-products-${config.buildNumber}" |
66 | { } | ||
67 | '' | ||
68 | mkdir -p $out/nix-support | ||
69 | echo "file bootImg ${bootImg}" >> $out/nix-support/hydra-build-products | ||
70 | echo "file factoryImg ${factoryImg}" >> $out/nix-support/hydra-build-products | ||
71 | echo "file img ${img}" >> $out/nix-support/hydra-build-products | ||
72 | echo "file ota ${ota}" >> $out/nix-support/hydra-build-products | ||
73 | ''; | ||
65 | }; | 74 | }; |
66 | }; | 75 | }; |
67 | } | 76 | } |