From fecda1751806039ea47fba56fd2a3bd9cf11e8b5 Mon Sep 17 00:00:00 2001 From: sefidel Date: Tue, 20 Feb 2024 05:48:01 +0900 Subject: project: Initial commit --- flake.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f025190 --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "Custom shared packages that doesn't fit in the upstream nixpkgs"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs"; + inputs.flake-parts.url = "github:hercules-ci/flake-parts"; + inputs.flake-compat.url = "github:edolstra/flake-compat"; + inputs.flake-compat.flake = false; + + outputs = { self, flake-parts, ... } @ inputs: + flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux" ]; + + perSystem = { lib, system, ... }: + let + pkgs = import inputs.nixpkgs { inherit system; }; + + pkgsFor = pkgs: overlays: + import pkgs { + inherit system overlays; + }; + exoticPkgs = (pkgsFor inputs.nixpkgs [ self.overlays.default ]).exoticPackages; + in + { + _module.args.pkgs = pkgs; + + packages = exoticPkgs; + }; + + flake = { + overlays.default = final: prev: { + exoticPackages = import ./pkgs { pkgs = prev; }; + }; + + hydraJobs = { + inherit (self) packages; + }; + }; + }; +} -- cgit 1.4.1