diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 41 |
1 files changed, 25 insertions, 16 deletions
@@ -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 | } |