From 46cfb325bbbed0791cb7bd13c86d06a1d5ad90d5 Mon Sep 17 00:00:00 2001 From: AG Date: Fri, 24 Oct 2025 09:51:40 +0200 Subject: [PATCH] flake compat --- flake.nix | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..30ca8c7 --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +aospkgs/flake.nix { + description = "AOSPKGS: Nix package repository for Apache Hop and related packages"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs"; + + outputs = + { self, nixpkgs }: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + ]; + forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system); + in + { + packages = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + apache-hop = pkgs.callPackage ./pkgs/apache-hop { }; + } + ); + + defaultPackage = forAllSystems (system: self.packages.${system}.apache-hop); + + overlay = final: prev: { + apache-hop = final.callPackage ./pkgs/apache-hop { }; + }; + + devShells = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + default = pkgs.mkShell { + packages = [ self.packages.${system}.apache-hop ]; + }; + } + ); + }; +}