From 7b08ecd14914dda894a86f18b3e9aa26380cfe4c Mon Sep 17 00:00:00 2001 From: Jashandeep Sohi Date: Mon, 11 Dec 2023 12:00:35 -0800 Subject: [PATCH] use octopilot upstream flake --- flake.lock | 23 +++---------- flake.nix | 2 +- octopilot/flake.lock | 81 -------------------------------------------- octopilot/flake.nix | 59 -------------------------------- 4 files changed, 5 insertions(+), 160 deletions(-) delete mode 100644 octopilot/flake.lock delete mode 100644 octopilot/flake.nix diff --git a/flake.lock b/flake.lock index b82817c..f38da78 100644 --- a/flake.lock +++ b/flake.lock @@ -381,33 +381,18 @@ "flake-parts": "flake-parts_3", "nixpkgs": [ "nixpkgs" - ], - "octopilot": "octopilot_2" - }, - "locked": { - "lastModified": 1, - "narHash": "sha256-RweJL6JX9OjVHZEt64hbqb0GcuGt/3LEqwDlvTP/PxM=", - "path": "octopilot", - "type": "path" + ] }, - "original": { - "path": "octopilot", - "type": "path" - } - }, - "octopilot_2": { - "flake": false, "locked": { - "lastModified": 1701682992, - "narHash": "sha256-OEtN4lpeLmA7rw0A4YpVg7FTHZPelOks9gg7AcXB4YU=", + "lastModified": 1702066730, + "narHash": "sha256-aQ1uWxiFhJGzlW/rEbD1MrTg1Pg//wcjsOs6e2sFAuA=", "owner": "dailymotion-oss", "repo": "octopilot", - "rev": "472d535bae959cf48011ab4d1749f3cbb25c7b84", + "rev": "741949026ec13b15543c112387579929127bcd2e", "type": "github" }, "original": { "owner": "dailymotion-oss", - "ref": "v1.6.0", "repo": "octopilot", "type": "github" } diff --git a/flake.nix b/flake.nix index 97e3ec3..287d912 100644 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,7 @@ }; octopilot = { - url = "path:octopilot"; + url = "github:dailymotion-oss/octopilot"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/octopilot/flake.lock b/octopilot/flake.lock deleted file mode 100644 index a5cd973..0000000 --- a/octopilot/flake.lock +++ /dev/null @@ -1,81 +0,0 @@ -{ - "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1701473968, - "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", - "type": "github" - }, - "original": { - "id": "flake-parts", - "type": "indirect" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1701436327, - "narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "91050ea1e57e50388fa87a3302ba12d188ef723a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1701253981, - "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "octopilot": { - "flake": false, - "locked": { - "lastModified": 1701682992, - "narHash": "sha256-OEtN4lpeLmA7rw0A4YpVg7FTHZPelOks9gg7AcXB4YU=", - "owner": "dailymotion-oss", - "repo": "octopilot", - "rev": "472d535bae959cf48011ab4d1749f3cbb25c7b84", - "type": "github" - }, - "original": { - "owner": "dailymotion-oss", - "ref": "v1.6.0", - "repo": "octopilot", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs", - "octopilot": "octopilot" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/octopilot/flake.nix b/octopilot/flake.nix deleted file mode 100644 index c3c14f2..0000000 --- a/octopilot/flake.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - description = "Automate your Gitops workflow, by automatically creating/merging GitHub Pull Requests "; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - - octopilot = { - type = "github"; - owner = "dailymotion-oss"; - repo = "octopilot"; - ref = "v1.6.0"; - flake = false; - }; - }; - - outputs = inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; - - perSystem = { config, self', inputs', pkgs, system, ... }: { - # Per-system attributes can be defined here. The self' and inputs' - # module parameters provide easy access to attributes of the same - # system. - - packages.default = let - original = import "${inputs.self}/flake.nix"; - in pkgs.buildGoModule rec { - pname = "octopilot"; - - version = original.inputs.octopilot.ref; - - src = inputs.octopilot; - - subPackages = [ "." ]; - - ldflags = [ - "-s" "-w" - "-X main.buildVersion=${version}-g${inputs.octopilot.shortRev}" - "-X main.buildCommit=${inputs.octopilot.rev}" - "-X main.buildDate=${inputs.octopilot.lastModifiedDate}" - ]; - - vendorHash = null; - - meta = { - inherit (original) description; - homepage = "https://github.com/dailymotion-oss/octopilot"; - }; - - }; - }; - flake = { - # The usual flake attributes can be defined here, including system- - # agnostic ones like nixosModule and system-enumerating ones, although - # those are more easily expressed in perSystem. - - }; - }; -}